* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1a5c38;
    --primary-light: #2d8a56;
    --primary-dark: #0f3d24;
    --accent: #f4a261;
    --bg: #fafbfc;
    --bg-dark: #1a1a2e;
    --text: #2d3748;
    --text-light: #718096;
    --white: #ffffff;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --radius: 12px;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navigation */
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: center;
}

.nav-logo {
    height: 28px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-light);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
    background: rgba(26, 92, 56, 0.08);
}

/* Sections */
.section {
    display: none;
    flex: 1;
    min-height: calc(100vh - 64px);
}

.section.active {
    display: flex;
}

/* Hero */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
    width: 100%;
    background: linear-gradient(135deg, #f0f7f4 0%, #e8f5e9 50%, #f1f8e9 100%);
}

.hero-logo {
    height: 80px;
    width: auto;
    margin-bottom: 2rem;
}

/* Fact Sheet */
.fact-sheet {
    max-width: 800px;
    width: 100%;
    margin-bottom: 2.5rem;
}

.fact-headline {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
}

.facts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.fact-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid rgba(26, 92, 56, 0.1);
}

.fact-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}

.fact-label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.25rem;
    line-height: 1.4;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.875rem 2rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: rgba(26, 92, 56, 0.05);
    transform: translateY(-1px);
}

/* Presentation */
.presentation-container {
    display: flex;
    width: 100%;
    height: calc(100vh - 64px);
}

.deck-sidebar {
    width: 280px;
    background: var(--white);
    border-right: 1px solid #e2e8f0;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.deck-sidebar h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.deck-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.deck-item {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #e2e8f0;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.deck-item:hover {
    border-color: var(--primary);
    background: rgba(26, 92, 56, 0.04);
}

.deck-item.active {
    border-color: var(--primary);
    background: rgba(26, 92, 56, 0.08);
    color: var(--primary);
}

.deck-item.dragging {
    opacity: 0.4;
}

.deck-item.drag-over {
    border-color: var(--accent);
    background: rgba(244, 162, 97, 0.1);
    border-style: dashed;
}

.deck-drag-handle {
    cursor: grab;
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1;
    user-select: none;
    padding: 0.25rem;
}

.deck-drag-handle:active {
    cursor: grabbing;
}

.deck-info {
    flex: 1;
    min-width: 0;
}

.deck-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.deck-item .deck-type {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.upload-area {
    margin-top: 1rem;
    border: 2px dashed #cbd5e0;
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.upload-area:hover {
    border-color: var(--primary);
    background: rgba(26, 92, 56, 0.04);
}

.upload-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.upload-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(26, 92, 56, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--primary);
}

/* Slide Viewer */
.slide-viewer {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: #f1f5f9;
}

.slide-display {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 960px;
}

.slide-display canvas {
    max-width: 100%;
    max-height: calc(100vh - 200px);
    box-shadow: var(--shadow-lg);
    border-radius: 4px;
}

.slide-display img {
    max-width: 100%;
    max-height: calc(100vh - 200px);
    box-shadow: var(--shadow-lg);
    border-radius: 4px;
    object-fit: contain;
}

.empty-state {
    color: var(--text-light);
    font-size: 1.1rem;
}

.slide-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.btn-control {
    padding: 0.5rem 1.25rem;
    border: 1px solid #e2e8f0;
    background: var(--white);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-control:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-fullscreen {
    margin-left: 1rem;
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.btn-fullscreen:hover {
    background: var(--primary-light);
    color: var(--white);
}

.slide-counter {
    font-weight: 500;
    color: var(--text-light);
    min-width: 60px;
    text-align: center;
}

/* Game */
.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    width: 100%;
    background: linear-gradient(180deg, #87CEEB 0%, #98D8C8 100%);
    position: relative;
}

.game-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.game-subtitle {
    color: var(--text);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

#gameCanvas {
    border: 3px solid var(--primary-dark);
    border-radius: 8px;
    background: #87CEEB;
    cursor: pointer;
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    z-index: 10;
}

.game-overlay.hidden {
    display: none;
}

.game-start-screen {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.game-start-screen h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.game-start-screen p {
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.game-start-screen .btn {
    margin-top: 1rem;
}

.game-score {
    position: absolute;
    top: 120px;
    right: calc(50% - 220px);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    z-index: 5;
}

/* Fullscreen mode */
.fullscreen .nav {
    display: none;
}

.fullscreen .presentation-container {
    height: 100vh;
}

.fullscreen .deck-sidebar {
    display: none;
}

.presentation-container:fullscreen {
    background: #f1f5f9;
}

.presentation-container:fullscreen .deck-sidebar {
    display: none;
}

.presentation-container:fullscreen .slide-viewer {
    height: 100vh;
}

.presentation-container:fullscreen .slide-display canvas {
    max-height: calc(100vh - 100px);
}

.presentation-container:fullscreen .slide-display img {
    max-height: calc(100vh - 100px);
}

/* Keyboard shortcut hint */
.keyboard-hint {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.75rem;
    opacity: 0.6;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    .presentation-container {
        flex-direction: column;
    }
    .deck-sidebar {
        width: 100%;
        height: auto;
        max-height: 200px;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }
    .nav-links {
        gap: 0;
    }
    .nav-link {
        padding: 0.5rem 0.5rem;
        font-size: 0.85rem;
    }
}
