/* =============================================
   ALGORITMEJUNGELEN - Jungle Theme CSS
   ============================================= */

:root {
    /* Jungle Color Palette - Fresh & Natural */
    --jungle-deep: #0d1f12;
    --jungle-dark: #152419;
    --jungle-medium: #1e3524;
    --jungle-light: #2a4a32;
    --jungle-accent: #3d6b4a;
    --jungle-highlight: #52a86b;
    --jungle-glow: #7ed99a;
    
    /* Artifact Colors - Ape theme */
    --ape-brown: #8b5a2b;
    --ape-glow: #c4915a;
    --orangutan-orange: #e85d04;
    --orangutan-glow: #ff8c42;
    
    /* Text Colors */
    --text-light: #e8f5eb;
    --text-muted: #9fc4a8;
    
    /* Accents */
    --vine-green: #3cb371;
    --leaf-shadow: rgba(0, 50, 20, 0.5);
    
    /* Other */
    --shadow: rgba(0, 0, 0, 0.4);
    --radius: 10px;
    --transition: 0.3s ease;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(82, 168, 107, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(61, 107, 74, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(46, 139, 87, 0.1) 0%, transparent 70%),
        linear-gradient(180deg, var(--jungle-deep) 0%, var(--jungle-dark) 30%, var(--jungle-medium) 100%);
    background-attachment: fixed;
    color: var(--text-light);
    min-height: 100vh;
    line-height: 1.6;
}

/* =============================================
   HEADER
   ============================================= */

.jungle-header {
    background: 
        linear-gradient(180deg, rgba(30, 53, 36, 0.95) 0%, rgba(21, 36, 25, 0.98) 100%);
    padding: 2rem;
    text-align: center;
    border-bottom: 3px solid var(--jungle-accent);
    box-shadow: 0 8px 32px var(--shadow), inset 0 -2px 20px var(--leaf-shadow);
    position: relative;
}

/* Header Buttons Container */
.header-buttons {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    gap: 0.5rem;
}

/* Story, FAQ & Timer Buttons */
.story-button,
.faq-button,
.timer-button {
    background: linear-gradient(180deg, #f4e4bc 0%, #d4c089 100%);
    border: 2px solid #8b5a2b;
    color: #3d2914;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: Georgia, 'Times New Roman', serif;
    transition: var(--transition);
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.story-button:hover,
.faq-button:hover,
.timer-button:hover {
    background: linear-gradient(180deg, #f9efd0 0%, #e8d5a3 100%);
    border-color: #5a3d1a;
    transform: translateY(-1px);
    box-shadow: 3px 3px 12px rgba(0, 0, 0, 0.4);
}

.timer-button.active {
    background: linear-gradient(180deg, #ffcccc 0%, #ff9999 100%);
    border-color: #cc4444;
    animation: timer-pulse 2s ease-in-out infinite;
}

@keyframes timer-pulse {
    0%, 100% { box-shadow: 2px 2px 8px rgba(204, 68, 68, 0.3); }
    50% { box-shadow: 2px 2px 16px rgba(204, 68, 68, 0.6); }
}

/* Angry Monkey Modal */
.angry-monkey-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.angry-monkey-modal.open {
    display: flex;
}

.angry-monkey-content {
    background: linear-gradient(180deg, #4a1a1a 0%, #2a0a0a 100%);
    border: 3px solid #ff4444;
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    max-width: 400px;
    animation: angry-shake 0.5s ease-in-out;
    box-shadow: 0 0 60px rgba(255, 68, 68, 0.4);
}

@keyframes angry-shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.angry-monkey-emoji {
    font-size: 5rem;
    margin-bottom: 1rem;
    animation: angry-bounce 0.5s ease-in-out infinite alternate;
}

@keyframes angry-bounce {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}

.angry-monkey-content h2 {
    color: #ff6666;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.angry-monkey-content p {
    color: #ffaaaa;
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.angry-tip {
    font-size: 0.9rem;
    color: #aaffaa !important;
    background: rgba(100, 200, 100, 0.1);
    padding: 0.75rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.angry-dismiss {
    margin-top: 1.5rem;
    background: linear-gradient(180deg, #66cc66 0%, #44aa44 100%);
    border: 2px solid #228822;
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
}

.angry-dismiss:hover {
    background: linear-gradient(180deg, #88ee88 0%, #66cc66 100%);
    transform: scale(1.05);
}

/* Story Modal */
.story-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    overflow-y: auto;
    padding: 2rem;
}

.story-modal.open {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.story-content {
    background: 
        linear-gradient(135deg, rgba(139, 90, 43, 0.1) 0%, transparent 50%),
        linear-gradient(225deg, rgba(139, 90, 43, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 10% 10%, rgba(139, 90, 43, 0.12) 0%, transparent 40%),
        radial-gradient(ellipse at 90% 90%, rgba(139, 90, 43, 0.1) 0%, transparent 40%),
        linear-gradient(180deg, #f7edd0 0%, #f0e2b8 50%, #e5d5a0 100%);
    border: 3px solid #a07040;
    border-radius: 6px;
    max-width: 800px;
    width: 100%;
    padding: 3rem;
    position: relative;
    margin: 2rem 0;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.4),
        inset 0 0 30px rgba(139, 90, 43, 0.15);
}

.story-content::before {
    content: '🧭';
    position: absolute;
    top: 0.5rem;
    right: 2.5rem;
    font-size: 1.5rem;
    opacity: 0.6;
}

.story-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    border-radius: 4px;
    box-shadow: 
        inset 3px 3px 10px rgba(139, 90, 43, 0.3),
        inset -3px -3px 10px rgba(139, 90, 43, 0.2);
}

.story-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #5a3d1a;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.story-close:hover {
    color: #2d1f0d;
}

.story-content h2 {
    color: #2d1f0d;
    margin-bottom: 1.5rem;
    text-align: center;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.5rem;
    border-bottom: 2px solid #8b5a2b;
    padding-bottom: 1rem;
}

.story-content h3 {
    color: #4a3520;
    margin: 2.5rem 0 1rem;
    font-size: 1.2rem;
    font-family: Georgia, 'Times New Roman', serif;
    border-left: 3px solid #8b5a2b;
    padding-left: 0.75rem;
    background: rgba(139, 90, 43, 0.08);
    padding: 0.5rem 0.75rem;
    border-radius: 0 4px 4px 0;
}

.story-text p {
    color: #2a1a0a;
    margin-bottom: 1.25rem;
    line-height: 1.9;
    font-size: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.story-intro, .story-ending {
    text-align: center;
    font-size: 1.1rem;
    color: #2d1f0d !important;
    padding: 1.5rem;
    background: rgba(139, 90, 43, 0.12);
    border-radius: 6px;
    border: 1px dashed #a07040;
    font-style: italic;
    line-height: 1.8;
    margin: 1rem 0;
}

.story-text strong {
    color: #1a5a2e;
    font-weight: 600;
    background: rgba(26, 90, 46, 0.1);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
}

.story-text ul {
    margin: 1rem 0 1rem 1.5rem;
    color: #2a1a0a;
}

.story-text li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.story-text em {
    color: #5a3d1a;
    font-style: italic;
}

/* FAQ Modal */
.faq-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    overflow-y: auto;
    padding: 2rem;
}

.faq-modal.open {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.faq-content {
    background: var(--jungle-dark);
    border: 2px solid var(--jungle-moss);
    border-radius: 12px;
    max-width: 700px;
    width: 100%;
    padding: 2rem;
    position: relative;
    margin: 2rem 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.faq-content h2 {
    color: var(--jungle-glow);
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.faq-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.faq-close:hover {
    color: var(--text-light);
}

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

.faq-item {
    background: var(--jungle-deep);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(126, 217, 154, 0.2);
}

.faq-question {
    padding: 1rem;
    font-weight: 600;
    color: var(--jungle-glow);
    cursor: pointer;
    transition: var(--transition);
}

.faq-question:hover {
    background: rgba(126, 217, 154, 0.1);
}

.faq-answer {
    padding: 0 1rem 1rem 1rem;
    color: var(--text-light);
    line-height: 1.7;
    display: none;
}

.faq-item.open .faq-answer {
    display: block;
}

.faq-item.open .faq-question {
    background: rgba(126, 217, 154, 0.15);
    border-bottom: 1px solid rgba(126, 217, 154, 0.2);
}

.faq-answer p {
    margin-bottom: 0.75rem;
}

.faq-answer ol,
.faq-answer ul {
    margin: 0.5rem 0 0.75rem 1.5rem;
}

.faq-answer li {
    margin-bottom: 0.3rem;
}

.faq-answer strong {
    color: var(--jungle-glow);
}

.faq-answer em {
    color: var(--text-muted);
}

.jungle-header h1 {
    font-size: 2.5rem;
    color: var(--jungle-glow);
    text-shadow: 0 0 20px rgba(126, 217, 154, 0.4), 2px 2px 4px var(--shadow);
    margin-bottom: 0.5rem;
}

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

/* Dual Progress Bars */
.dual-progress {
    max-width: 600px;
    margin: 0 auto 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.progress-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-icon {
    font-size: 2rem;
    min-width: 2.5rem;
    text-align: center;
}

.progress-wrapper {
    flex: 1;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

.progress-text {
    font-weight: bold;
}

.progress-bar {
    height: 20px;
    background: var(--jungle-dark);
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--jungle-accent);
    box-shadow: inset 0 2px 4px var(--shadow);
}

.progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 8px;
    transition: width 0.5s ease;
}

/* Discovered (ape) progress bar */
.discovered-bar {
    border-color: var(--ape-brown);
}

.discovered-fill {
    background: linear-gradient(90deg, var(--ape-brown) 0%, var(--ape-glow) 100%);
    box-shadow: 0 0 10px rgba(196, 145, 90, 0.4);
}

.progress-row:first-child .progress-text {
    color: var(--ape-glow);
}

/* Mastered (orangutan) progress bar */
.mastered-bar {
    border-color: var(--orangutan-orange);
}

.mastered-fill {
    background: linear-gradient(90deg, var(--orangutan-orange) 0%, var(--orangutan-glow) 100%);
    box-shadow: 0 0 10px rgba(255, 140, 66, 0.4);
}

.progress-row:last-child .progress-text {
    color: var(--orangutan-glow);
}

/* Trophies */
.trophy-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.trophy-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.trophy-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    min-width: 120px;
    text-align: right;
}

.trophies {
    display: flex;
    gap: 1rem;
}

.trophy {
    font-size: 2.5rem;
    padding: 0.5rem;
    border-radius: 50%;
    background: var(--jungle-dark);
    border: 3px solid var(--jungle-accent);
    transition: var(--transition);
    cursor: default;
}

.trophy.locked {
    filter: grayscale(100%) brightness(0.5);
    opacity: 0.5;
}

.trophy.unlocked {
    filter: none;
    opacity: 1;
    animation: trophyUnlock 0.6s ease;
    box-shadow: 0 0 20px var(--orangutan-glow);
    border-color: var(--orangutan-orange);
}

@keyframes trophyUnlock {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* =============================================
   MAIN CONTENT
   ============================================= */

.jungle-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

/* =============================================
   CHAPTERS
   ============================================= */

.chapter {
    background: var(--jungle-medium);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    border: 2px solid var(--jungle-accent);
    box-shadow: 0 4px 12px var(--shadow);
    transition: var(--transition);
    position: relative;
}

.chapter:hover {
    border-color: var(--jungle-highlight);
}

.chapter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--jungle-dark);
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
}

.chapter-header:hover {
    background: var(--jungle-medium);
}

.chapter-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.chapter-icon {
    font-size: 1.8rem;
}

.chapter-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-light);
}

.chapter-progress {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chapter-progress-text {
    font-size: 0.85rem;
    font-weight: bold;
    text-align: right;
    white-space: nowrap;
    display: flex;
    gap: 1.25rem;
}

.discovered-count {
    color: var(--ape-glow);
}

.mastered-count {
    color: var(--orangutan-glow);
}

.mini-progress-bar {
    width: 80px;
    height: 8px;
    background: var(--jungle-dark);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.mini-progress-fill {
    position: absolute;
    height: 100%;
    width: 0%;
    border-radius: 4px;
    transition: width 0.4s ease;
}

.mini-progress-fill.discovered {
    background: linear-gradient(90deg, var(--ape-brown) 0%, var(--ape-glow) 100%);
    z-index: 1;
}

.mini-progress-fill.mastered {
    background: linear-gradient(90deg, var(--orangutan-orange) 0%, var(--orangutan-glow) 100%);
    z-index: 2;
}

/* Chapter Content (Collapsible) */
.chapter-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    border-radius: 0 0 var(--radius) var(--radius);
}

.chapter.open .chapter-content {
    max-height: 2000px;
}

.chapter.open .chapter-header {
    border-bottom: 1px solid var(--jungle-accent);
}

/* =============================================
   ARTIFACTS (Learning Goals)
   ============================================= */

.artifacts-list {
    list-style: none;
    padding: 0.5rem;
}

.artifact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    margin: 0.25rem 0;
    background: var(--jungle-dark);
    border-radius: var(--radius);
    border-left: 4px solid var(--jungle-accent);
    transition: var(--transition);
}

.artifact:hover {
    background: rgba(90, 154, 90, 0.2);
    border-left-color: var(--jungle-highlight);
}

.artifact.discovered {
    border-left-color: var(--ape-glow);
    background: rgba(196, 145, 90, 0.3);
}

.artifact.mastered {
    border-left-color: var(--orangutan-glow);
    background: rgba(255, 140, 66, 0.35);
}

.artifact-text {
    flex: 1;
    font-size: 0.95rem;
    padding-right: 0.5rem;
    color: var(--text-light);
}

.prompt-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    opacity: 0.4;
    transition: var(--transition);
    padding: 0 0.3rem;
    vertical-align: middle;
    display: inline;
    margin-left: 0.3rem;
}

.prompt-btn:hover {
    opacity: 1;
    transform: scale(1.2);
}

.prompt-btn.copied {
    opacity: 1;
}

.copied-text {
    font-size: 0.7rem;
    color: #999;
    font-style: italic;
}

.exam-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    opacity: 0.4;
    transition: var(--transition);
    padding: 0 0.3rem;
    vertical-align: middle;
    display: inline;
    margin-left: 0.2rem;
}

.exam-btn:hover {
    opacity: 1;
    transform: scale(1.2);
}

.exam-popup {
    position: absolute;
    background: var(--jungle-dark);
    border: 1px solid var(--jungle-moss);
    border-radius: 8px;
    padding: 0.5rem;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    min-width: 150px;
    max-width: 300px;
}

.exam-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.exam-popup-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0 0.2rem;
}

.exam-popup-close:hover {
    color: var(--text-light);
}

.exam-popup-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.exam-section {
    margin-bottom: 0.5rem;
}

.exam-section:last-child {
    margin-bottom: 0;
}

.exam-section-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
    font-style: italic;
}

.exam-tag {
    background: var(--jungle-deep);
    color: var(--jungle-moss);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: monospace;
}

.exam-tag.potential {
    background: rgba(40, 40, 40, 0.5);
    color: #777;
    border: 1px dashed #555;
}

/* Keyword highlighting */
.kw-know {
    color: #ffb6c1;
    font-weight: 600;
}

.artifact-checkboxes {
    display: flex;
    gap: 0.5rem;
}

/* Custom Checkboxes */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkmark {
    font-size: 1.5rem;
    opacity: 0.3;
    transition: var(--transition);
    filter: grayscale(100%);
}

.checkbox-label:hover .checkmark {
    opacity: 0.6;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    opacity: 1;
    filter: none;
    animation: collect 0.4s ease;
}

@keyframes collect {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

/* Ape specific */
.checkbox-label.ape input[type="checkbox"]:checked + .checkmark {
    text-shadow: 0 0 10px var(--ape-glow);
}

/* Orangutan specific */
.checkbox-label.orangutan input[type="checkbox"]:checked + .checkmark {
    text-shadow: 0 0 15px var(--orangutan-glow);
}

/* =============================================
   FOOTER
   ============================================= */

.jungle-footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 2px solid var(--jungle-accent);
    margin-top: 2rem;
}

.save-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.save-btn {
    background: var(--jungle-dark);
    border: 1px solid var(--jungle-accent);
    color: var(--text-muted);
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.save-btn:hover {
    background: var(--jungle-accent);
    color: var(--text-light);
}

.import-label {
    display: inline-block;
}

/* =============================================
   RESPONSIVE DESIGN
   ============================================= */

@media (max-width: 768px) {
    .jungle-header h1 {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 0.95rem;
    }
    
    .progress-icon {
        font-size: 1.5rem;
        min-width: 2rem;
    }
    
    .progress-bar {
        height: 16px;
    }
    
    .trophies {
        gap: 1rem;
    }
    
    .trophy {
        font-size: 2rem;
    }
    
    .jungle-content {
        padding: 1rem;
    }
    
    .chapter-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .chapter-header h2 {
        font-size: 1rem;
    }
    
    .chapter-progress {
        width: 100%;
        justify-content: space-between;
    }
    
    .mini-progress-bar {
        flex: 1;
        max-width: 150px;
    }
    
    .artifact {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .artifact-text {
        padding-right: 0;
    }
    
    .artifact-checkboxes {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .jungle-header {
        padding: 1.5rem 1rem;
        padding-top: 3.5rem;
    }
    
    .jungle-header h1 {
        font-size: 1.5rem;
    }
    
    .progress-bar {
        height: 20px;
    }
    
    .trophy {
        font-size: 1.8rem;
        padding: 0.4rem;
    }
    
    .header-buttons {
        position: static;
        justify-content: center;
        margin-bottom: 1rem;
    }

    .story-button,
    .faq-button,
    .timer-button {
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem;
    }

    .header-buttons {
        flex-wrap: wrap;
    }
    
    .story-content {
        padding: 1.5rem;
    }
    
    .story-modal {
        padding: 1rem;
    }
}

/* =============================================
   ANIMATIONS & EFFECTS
   ============================================= */

/* Subtle pulse for unlocked trophies */
.trophy.unlocked {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 20px var(--orangutan-glow); }
    50% { box-shadow: 0 0 30px var(--orangutan-glow); }
}

/* Discovered complete celebration */
.chapter.discovered-complete .chapter-header {
    background: linear-gradient(90deg, var(--jungle-dark) 0%, rgba(196, 145, 90, 0.2) 100%);
}

/* Mastered complete celebration */
.chapter.complete .chapter-header {
    background: linear-gradient(90deg, var(--jungle-dark) 0%, rgba(255, 140, 66, 0.4) 100%);
}

.chapter.complete .chapter-icon {
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}
