/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Normal mode colors (default - vibrant and colorful) */
    --normal-bg: linear-gradient(-45deg, #E6E6FA, #DDA0DD, #FFB6C1, #F0E68C, #98FB98);
    --normal-primary: #2F4F4F;
    --normal-secondary: #696969;
    --normal-accent: #FF69B4;
    --normal-surface: rgba(255, 255, 255, 0.95);
    --normal-border: rgba(255, 215, 0, 0.2);
    
    /* Performance mode colors (neutral and light) */
    --performance-bg: linear-gradient(-45deg, #F8F8FF, #F0F8FF, #FFF8DC, #F5F5DC);
    --performance-primary: #4B0082;
    --performance-secondary: #696969;
    --performance-accent: #9370DB;
    --performance-surface: rgba(255, 255, 255, 0.95);
    --performance-border: rgba(147, 112, 219, 0.2);
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background: var(--normal-bg);
    background-size: 400% 400%;
    animation: fairyGradient 20s ease infinite;
    color: var(--normal-primary);
    overflow: hidden;
    height: 100vh;
    position: relative;
    transition: all 0.5s ease;
}

/* Performance mode styles - lighter and more efficient */
body.performance-mode {
    background: var(--performance-bg);
    background-size: 200% 200%;
    animation: performanceGradient 15s ease infinite;
    color: var(--performance-primary);
}

/* Normal gradient animation (vibrant) */
@keyframes fairyGradient {
    0% { background-position: 0% 50%; }
    25% { background-position: 100% 25%; }
    50% { background-position: 100% 100%; }
    75% { background-position: 0% 75%; }
    100% { background-position: 0% 50%; }
}

/* Performance gradient animation (subtle) */
@keyframes performanceGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating magical particles */
.magic-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.magic-particles::before,
.magic-particles::after {
    content: '✨';
    position: absolute;
    font-size: 16px;
    color: #FFD700;
    animation: floatSparkle 8s infinite linear;
    opacity: 0.7;
}

.magic-particles::before {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.magic-particles::after {
    top: 60%;
    right: 15%;
    animation-delay: 4s;
}

@keyframes floatSparkle {
    0% { transform: translateY(0px) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    50% { transform: translateY(-20px) rotate(180deg); }
    90% { opacity: 1; }
    100% { transform: translateY(0px) rotate(360deg); opacity: 0; }
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF69B4, #9370DB, #FFD700);
    width: 16.66%; /* 1/6 for first slide */
    transition: width 0.4s ease;
    box-shadow: 0 0 15px rgba(255, 105, 180, 0.6);
}

/* ===== TIMER (ALWAYS VISIBLE) ===== */
.timer {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 18px;
    border-radius: 25px;
    font-weight: 600;
    color: #4B0082;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: block; /* SEMPRE VISÍVEL */
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 215, 0, 0.3);
    font-family: 'Georgia', serif;
    cursor: pointer;
    user-select: none;
    transition: transform 0.1s ease;
}

.timer:active {
    transform: scale(0.95);
}

/* ===== PERFORMANCE MODE TOGGLE (TOP LEFT) ===== */
.performance-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(147, 112, 219, 0.2);
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.performance-toggle:hover,
.performance-toggle:focus {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 8px 30px rgba(147, 112, 219, 0.3);
    border-color: #FFD700;
    outline: none;
}

.performance-toggle:active {
    transform: scale(0.9);
}

.performance-toggle svg {
    color: #9370DB;
    transition: color 0.3s ease;
}

.performance-toggle:hover svg {
    color: #FF69B4;
}

/* ===== PERFORMANCE MODE TOOLTIP ===== */
.performance-tooltip {
    position: fixed;
    top: 75px;
    left: 5px;
    background: rgba(75, 0, 130, 0.95);
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-family: 'Georgia', serif;
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 215, 0, 0.3);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    max-width: 200px;
    text-align: center;
    pointer-events: none;
}

.performance-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

.performance-tooltip .tooltip-content {
    position: relative;
}

.performance-tooltip .tooltip-arrow {
    position: absolute;
    top: -8px;
    left: 30px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid rgba(75, 0, 130, 0.95);
}

/* ===== NAVIGATION ARROWS ===== */
.nav-arrow {
    position: fixed;
    width: 55px;
    height: 55px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 6px 25px rgba(147, 112, 219, 0.25);
    backdrop-filter: blur(15px);
    border: 3px solid rgba(255, 215, 0, 0.4);
}

.nav-arrow.next {
    bottom: 30px;
    right: 30px;
}

.nav-arrow.prev {
    bottom: 30px;
    left: 30px;
    opacity: 0.9;
}

.nav-arrow:hover,
.nav-arrow:focus {
    transform: scale(1.15);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 8px 35px rgba(147, 112, 219, 0.4);
    border-color: #FFD700;
    outline: none;
}

.nav-arrow:active {
    transform: scale(0.9);
}

.nav-arrow svg {
    color: #9370DB;
    transition: color 0.3s ease;
}

.nav-arrow:hover svg {
    color: #FF69B4;
}

/* Hide prev button on first slide */
.nav-arrow.prev.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8);
}

/* Dim next button on last slide */
.nav-arrow.next.disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* ===== PRESENTATION CONTAINER ===== */
.presentation-container {
    height: 100vh;
    position: relative;
    overflow: hidden;
}

/* ===== SLIDE STYLES ===== */
.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide.active {
    opacity: 1;
    transform: translateX(0);
}

.slide.prev {
    transform: translateX(-100px);
}

.slide-content {
    max-width: 950px;
    width: 100%;
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 3.5rem;
    border-radius: 25px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(25px);
    border: 2px solid rgba(255, 215, 0, 0.2);
    position: relative;
}

.slide-content::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #FFD700, #FF69B4, #9370DB, #98FB98);
    border-radius: 27px;
    z-index: -1;
    opacity: 0.3;
}

/* ===== TYPOGRAPHY ===== */
.slide-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: #4B0082;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(30px);
    animation: slideInUp 0.8s ease forwards;
    animation-delay: 0.3s;
    font-family: 'Georgia', serif;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.fairy-title {
    background: linear-gradient(45deg, #FF69B4, #9370DB, #FFD700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 3.2rem;
    position: relative;
}

.fairy-title::after {
    content: '✨';
    position: absolute;
    right: -40px;
    top: -10px;
    font-size: 2rem;
    animation: sparkle 2s infinite;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
    50% { transform: scale(1.2) rotate(180deg); opacity: 0.7; }
}

.slide h2.slide-title {
    font-size: 2.5rem;
    color: #8B008B;
}

.slide-subtitle {
    font-size: 1.3rem;
    color: #696969;
    margin-top: 1rem;
    opacity: 0;
    transform: translateY(30px);
    animation: slideInUp 0.8s ease forwards;
    animation-delay: 0.7s;
    font-style: italic;
}

.presenter-tag {
    font-size: 1rem;
    color: #9370DB;
    margin-top: 1.5rem;
    font-weight: 600;
    opacity: 0;
    animation: slideInUp 0.8s ease forwards;
    animation-delay: 1s;
}

.slide-list {
    list-style: none;
    font-size: 1.3rem;
    line-height: 1.9;
    color: #2F4F4F;
    text-align: left;
    max-width: 650px;
    margin: 0 auto;
}

.slide-list li {
    margin: 1.2rem 0;
    padding-left: 2.5rem;
    position: relative;
    opacity: 0;
    transform: translateX(-20px);
    animation: slideInLeft 0.6s ease forwards;
}

.slide-list li:nth-child(1) { animation-delay: 0.5s; }
.slide-list li:nth-child(2) { animation-delay: 0.7s; }
.slide-list li:nth-child(3) { animation-delay: 0.9s; }
.slide-list li:nth-child(4) { animation-delay: 1.1s; }

.slide-list li::before {
    content: '🧚‍♀️';
    position: absolute;
    left: 0;
    font-size: 1.2em;
}

.slide-list.interactive li::before {
    content: '📖';
    font-size: 1.1em;
}

/* ===== VISUAL ELEMENTS ===== */
.slide-visual {
    margin: 2.5rem 0;
    opacity: 0;
    transform: scale(0.8);
    animation: scaleIn 0.8s ease forwards;
    animation-delay: 1s;
}

.slide-visual svg {
    filter: drop-shadow(0 6px 25px rgba(0, 0, 0, 0.15));
}

/* Fairy book animation */
.fairy-book {
    animation: gentleFloat 4s ease-in-out infinite;
}

.fairy-book .sparkles {
    animation: twinkle 3s infinite;
}

@keyframes gentleFloat {
    0%, 100% { transform: translateY(0px) rotate(-1deg); }
    50% { transform: translateY(-8px) rotate(1deg); }
}

@keyframes twinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ===== SPECIAL SLIDE ELEMENTS ===== */
.final-question {
    margin-top: 2rem;
}

.interaction-prompt {
    font-size: 1.3rem;
    color: #9370DB;
    font-weight: 600;
    margin-top: 1.5rem;
    opacity: 0;
    animation: fadeIn 1s ease forwards;
    animation-delay: 1.3s;
    font-style: italic;
}

.qna-prompt {
    font-size: 1.4rem;
    color: #FF69B4;
    font-weight: 700;
    margin-top: 1rem;
    opacity: 0;
    animation: fadeIn 1s ease forwards;
    animation-delay: 1.6s;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

/* ===== PRESENTER NOTES - MOBILE FIRST APPROACH ===== */
.presenter-notes {
    /* Base positioning - mobile first */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    
    /* Visual styling */
    background: rgba(75, 0, 130, 0.96);
    color: white;
    
    /* Typography - mobile optimized */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    font-weight: 400;
    
    /* Padding with safe areas for notches */
    padding: env(safe-area-inset-top, 20px) env(safe-area-inset-right, 16px) env(safe-area-inset-bottom, 20px) env(safe-area-inset-left, 16px);
    padding-top: max(env(safe-area-inset-top), 40px);
    padding-bottom: max(env(safe-area-inset-bottom), 40px);
    
    /* Scrolling */
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    
    /* Visibility */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    
    /* Z-index */
    z-index: 1200;
    
    /* Backdrop */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    
    /* Border */
    border: 1px solid rgba(255, 255, 255, 0.1);
    
    /* Box shadow */
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05);
    
    /* Text rendering optimization */
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    
    /* Word wrapping */
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}

/* Active state */
.presentation-container.show-notes .presenter-notes {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Scrollbar styling for webkit browsers */
.presenter-notes::-webkit-scrollbar {
    width: 4px;
}

.presenter-notes::-webkit-scrollbar-track {
    background: transparent;
}

.presenter-notes::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.presenter-notes::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Small mobile phones (up to 390px) */
@media (max-width: 390px) {
    .presenter-notes {
        font-size: 15px;
        line-height: 1.5;
        padding: env(safe-area-inset-top, 16px) env(safe-area-inset-right, 12px) env(safe-area-inset-bottom, 16px) env(safe-area-inset-left, 12px);
        padding-top: max(env(safe-area-inset-top), 35px);
        padding-bottom: max(env(safe-area-inset-bottom), 35px);
    }
}

/* Standard mobile phones (391px to 480px) */
@media (min-width: 391px) and (max-width: 480px) {
    .presenter-notes {
        font-size: 16px;
        line-height: 1.55;
        padding: env(safe-area-inset-top, 18px) env(safe-area-inset-right, 14px) env(safe-area-inset-bottom, 18px) env(safe-area-inset-left, 14px);
        padding-top: max(env(safe-area-inset-top), 38px);
        padding-bottom: max(env(safe-area-inset-bottom), 38px);
    }
}

/* Large mobile phones (481px to 600px) */
@media (min-width: 481px) and (max-width: 600px) {
    .presenter-notes {
        font-size: 17px;
        line-height: 1.6;
        padding: env(safe-area-inset-top, 20px) env(safe-area-inset-right, 16px) env(safe-area-inset-bottom, 20px) env(safe-area-inset-left, 16px);
        padding-top: max(env(safe-area-inset-top), 40px);
        padding-bottom: max(env(safe-area-inset-bottom), 40px);
    }
}

/* Tablets portrait (601px to 768px) */
@media (min-width: 601px) and (max-width: 768px) {
    .presenter-notes {
        font-size: 18px;
        line-height: 1.65;
        padding: 30px 24px;
        max-width: 90%;
        margin: 0 auto;
        top: 5vh;
        bottom: 5vh;
        left: 5vw;
        right: 5vw;
        width: 90vw;
        height: 90vh;
        border-radius: 12px;
    }
}

/* Tablets landscape and small desktops (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .presenter-notes {
        font-size: 19px;
        line-height: 1.7;
        padding: 35px 30px;
        max-width: 85%;
        margin: 0 auto;
        top: 8vh;
        bottom: 8vh;
        left: 7.5vw;
        right: 7.5vw;
        width: 85vw;
        height: 84vh;
        border-radius: 16px;
    }
}

/* Desktop (1025px and up) */
@media (min-width: 1025px) {
    .presenter-notes {
        font-size: 20px;
        line-height: 1.75;
        padding: 40px 35px;
        max-width: 80%;
        margin: 0 auto;
        top: 10vh;
        bottom: 10vh;
        left: 10vw;
        right: 10vw;
        width: 80vw;
        height: 80vh;
        border-radius: 20px;
    }
}

/* Mobile landscape orientation */
@media (max-width: 768px) and (orientation: landscape) and (max-height: 500px) {
    .presenter-notes {
        font-size: 14px;
        line-height: 1.4;
        padding: env(safe-area-inset-top, 12px) env(safe-area-inset-right, 16px) env(safe-area-inset-bottom, 12px) env(safe-area-inset-left, 16px);
        padding-top: max(env(safe-area-inset-top), 60px);
        padding-bottom: max(env(safe-area-inset-bottom), 60px);
        padding-left: max(env(safe-area-inset-left), 85px);
        padding-right: max(env(safe-area-inset-right), 85px);
    }
}

/* iOS specific fixes */
@supports (-webkit-touch-callout: none) {
    .presenter-notes {
        /* Fix for iOS viewport issues */
        min-height: -webkit-fill-available;
        
        /* Better touch scrolling */
        -webkit-overflow-scrolling: touch;
        
        /* Prevent zoom on input focus */
        font-size: max(16px, 1rem);
    }
}

/* High DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .presenter-notes {
        /* Slightly larger text for retina screens */
        font-size: calc(16px + 0.5px);
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .presenter-notes {
        transition: opacity 0.1s ease, visibility 0.1s ease;
        transform: none;
    }
    
    .presentation-container.show-notes .presenter-notes {
        transform: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .presenter-notes {
        background: rgba(0, 0, 0, 0.95);
        border: 2px solid white;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}

/* Performance mode adjustments */
body.performance-mode .presenter-notes {
    background: rgba(75, 0, 130, 0.92);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(147, 112, 219, 0.2);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .presenter-notes {
        background: rgba(25, 25, 50, 0.96);
        color: #f0f0f0;
    }
}

/* Focus trap for accessibility */
.presenter-notes:focus-within {
    outline: 3px solid rgba(255, 215, 0, 0.8);
    outline-offset: -3px;
}

/* Print styles */
@media print {
    .presenter-notes {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: white;
        color: black;
        padding: 2cm;
        border: 2px solid black;
        border-radius: 0;
        font-size: 12pt;
        line-height: 1.5;
        page-break-inside: avoid;
    }
}

/* ===== OVERVIEW MODE ===== */
.overview-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(25, 25, 112, 0.95);
    display: none;
    z-index: 2000;
    backdrop-filter: blur(15px);
}

.overview-container.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 25px;
    padding: 50px;
    height: 100%;
    align-items: center;
}

.overview-slide {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    backdrop-filter: blur(15px);
    position: relative;
}

.overview-slide::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, #FFD700, #FF69B4, #9370DB);
    border-radius: 18px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overview-slide:hover::before,
.overview-slide:focus::before {
    opacity: 0.6;
}

.overview-slide:hover,
.overview-slide:focus {
    transform: scale(1.08);
    box-shadow: 0 15px 40px rgba(147, 112, 219, 0.3);
    outline: none;
}

.overview-slide.active {
    border-color: #FF69B4;
    background: rgba(255, 182, 193, 0.2);
    box-shadow: 0 10px 30px rgba(255, 105, 180, 0.4);
}

.overview-slide h3 {
    font-size: 1.1rem;
    color: #4B0082;
    margin-bottom: 12px;
    font-family: 'Georgia', serif;
}

.overview-slide p {
    font-size: 0.85rem;
    color: #696969;
    line-height: 1.5;
}

/* ===== HELP OVERLAY ===== */
.help-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(25, 25, 112, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    backdrop-filter: blur(10px);
}

.help-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.help-content {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.3);
    max-width: 550px;
    width: 90%;
    border: 3px solid rgba(255, 215, 0, 0.4);
}

.help-content h3 {
    font-size: 1.6rem;
    color: #4B0082;
    margin-bottom: 1.8rem;
    text-align: center;
    font-family: 'Georgia', serif;
}

.help-shortcuts {
    display: grid;
    gap: 1.2rem;
    margin-bottom: 1.8rem;
}

.shortcut {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 0;
}

.shortcut kbd {
    background: #F8F8FF;
    border: 2px solid #DDA0DD;
    border-radius: 6px;
    padding: 0.3rem 0.7rem;
    font-family: monospace;
    font-size: 0.9rem;
    color: #4B0082;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    font-weight: bold;
}

.shortcut span {
    color: #696969;
    font-size: 0.95rem;
}

.mobile-tip {
    background: rgba(152, 251, 152, 0.1);
    padding: 0.7rem;
    border-radius: 10px;
    border-left: 4px solid #98FB98;
}

.help-content p {
    text-align: center;
    color: #696969;
    font-size: 0.95rem;
    font-style: italic;
}

/* ===== PERFORMANCE MODE STYLES ===== */
body.performance-mode .slide-content {
    background: var(--performance-surface);
    border: 2px solid var(--performance-border);
    box-shadow: 0 15px 40px rgba(75, 0, 130, 0.1);
}

body.performance-mode .slide-content::before {
    background: linear-gradient(45deg, #E6E6FA, #DDA0DD, #C8A2C8, #B19CD9);
    opacity: 0.2;
}

body.performance-mode .slide-title {
    color: var(--performance-primary);
}

body.performance-mode .fairy-title {
    background: linear-gradient(45deg, #9370DB, #8A2BE2, #6A5ACD);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.performance-mode .slide h2.slide-title {
    color: var(--performance-accent);
}

body.performance-mode .slide-subtitle {
    color: var(--performance-secondary);
}

body.performance-mode .presenter-tag {
    color: var(--performance-accent);
}

body.performance-mode .slide-list {
    color: var(--performance-primary);
}

body.performance-mode .interaction-prompt {
    color: var(--performance-accent);
}

body.performance-mode .qna-prompt {
    color: #8A2BE2;
}

body.performance-mode .nav-arrow {
    background: rgba(248, 248, 255, 0.95);
    border: 3px solid rgba(147, 112, 219, 0.3);
    box-shadow: 0 6px 20px rgba(75, 0, 130, 0.15);
}

body.performance-mode .nav-arrow svg {
    color: var(--performance-accent);
}

body.performance-mode .nav-arrow:hover svg {
    color: #8A2BE2;
}

body.performance-mode .timer {
    background: rgba(248, 248, 255, 0.95);
    border: 2px solid rgba(147, 112, 219, 0.2);
    box-shadow: 0 6px 20px rgba(75, 0, 130, 0.1);
    color: var(--performance-primary);
}

body.performance-mode .performance-toggle {
    background: rgba(248, 248, 255, 0.95);
    border: 2px solid rgba(147, 112, 219, 0.4);
    box-shadow: 0 6px 20px rgba(75, 0, 130, 0.2);
}

body.performance-mode .performance-toggle svg {
    color: #4B0082;
}

body.performance-mode .performance-toggle:hover {
    background: rgba(248, 248, 255, 1);
    box-shadow: 0 8px 30px rgba(75, 0, 130, 0.3);
}

body.performance-mode .performance-toggle:hover svg {
    color: #8A2BE2;
}

body.performance-mode .progress-fill {
    background: linear-gradient(90deg, #9370DB, #8A2BE2, #6A5ACD);
    box-shadow: 0 0 10px rgba(147, 112, 219, 0.4);
}

body.performance-mode .overview-container {
    background: rgba(75, 0, 130, 0.92);
}

body.performance-mode .overview-slide {
    background: rgba(248, 248, 255, 0.95);
}

body.performance-mode .overview-slide::before {
    background: linear-gradient(45deg, #9370DB, #8A2BE2, #6A5ACD);
}

body.performance-mode .overview-slide.active {
    border-color: var(--performance-accent);
    background: rgba(230, 230, 250, 0.3);
    box-shadow: 0 10px 25px rgba(147, 112, 219, 0.3);
}

body.performance-mode .overview-slide h3 {
    color: var(--performance-primary);
}

/* Reduced animations for performance mode */
body.performance-mode * {
    animation-duration: 0.3s !important;
    transition-duration: 0.2s !important;
}

body.performance-mode .fairy-book {
    animation: none;
}

body.performance-mode .magic-particles::before,
body.performance-mode .magic-particles::after {
    animation: none;
    opacity: 0.3;
}

body.performance-mode .fairy-title::after {
    animation: none;
}

/* ===== ANIMATIONS ===== */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== TABLET RESPONSIVE ===== */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }
    
    .slide-content {
        padding: 2.5rem 2rem;
        margin: 0.5rem;
        border-radius: 20px;
        max-width: 95%;
    }
    
    .slide-title, .fairy-title {
        font-size: 2.5rem;
        margin-bottom: 1.2rem;
        line-height: 1.2;
    }
    
    .slide h2.slide-title {
        font-size: 2.2rem;
    }
    
    .slide-list {
        font-size: 1.25rem;
        line-height: 1.7;
    }
    
    .slide-list li {
        margin: 1rem 0;
        padding-left: 2rem;
    }
    
    .overview-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 25px;
        gap: 20px;
    }
    
    .nav-arrow {
        bottom: 25px;
        width: 60px;
        height: 60px;
        box-shadow: 0 8px 30px rgba(147, 112, 219, 0.3);
    }
    
    .nav-arrow.next {
        right: 25px;
    }
    
    .nav-arrow.prev {
        left: 25px;
    }
    
    .timer {
        top: 15px;
        right: 15px;
        padding: 8px 16px;
        font-size: 1rem;
        border-radius: 20px;
    }
    
    .performance-toggle {
        top: 15px;
        left: 15px;
        width: 45px;
        height: 45px;
    }
    
    .performance-tooltip {
        top: 65px;
        left: 5px;
        font-size: 0.8rem;
        padding: 10px 14px;
        max-width: 180px;
    }
    
    .slide-visual {
        margin: 2rem 0;
    }
    
    .slide-visual svg {
        max-width: 130px;
        height: auto;
    }
}

/* ===== LARGE TABLET RESPONSIVE (769px to 1023px) ===== */
@media (min-width: 769px) and (max-width: 1023px) {
    /* Already handled in presenter-notes responsive rules */
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 480px) {
    body {
        font-size: 18px;
    }
    
    .slide {
        padding: 1rem;
    }
    
    .slide-content {
        padding: 2.5rem 1.8rem;
        margin: 0;
        border-radius: 15px;
        max-width: 100%;
        min-height: 75vh;
    }
    
    .slide-title, .fairy-title {
        font-size: 2.2rem;
        margin-bottom: 1rem;
        line-height: 1.1;
    }
    
    .fairy-title::after {
        right: -30px;
        top: -8px;
        font-size: 1.5rem;
    }
    
    .slide h2.slide-title {
        font-size: 2rem;
    }
    
    .slide-subtitle {
        font-size: 1.15rem;
        margin-top: 0.8rem;
    }
    
    .slide-list {
        font-size: 1.15rem;
        line-height: 1.6;
        max-width: 100%;
    }
    
    .slide-list li {
        margin: 1.1rem 0;
        padding-left: 2.2rem;
    }
    
    .slide-list li::before {
        font-size: 1.3em;
        left: 0.3rem;
    }
    
    .nav-arrow {
        bottom: 20px;
        width: 65px;
        height: 65px;
        box-shadow: 0 10px 35px rgba(147, 112, 219, 0.35);
    }
    
    .nav-arrow.next {
        right: 20px;
    }
    
    .nav-arrow.prev {
        left: 20px;
    }
    
    .nav-arrow svg {
        width: 30px;
        height: 30px;
    }
    
    .progress-bar {
        height: 8px;
    }
    
    .timer {
        top: 12px;
        right: 12px;
        padding: 12px 18px;
        font-size: 1.05rem;
        border-radius: 25px;
        font-weight: 700;
    }
    
    .performance-toggle {
        top: 12px;
        left: 12px;
        width: 50px;
        height: 50px;
    }
    
    .performance-tooltip {
        top: 70px;
        left: 5px;
        font-size: 0.75rem;
        padding: 8px 12px;
        max-width: 160px;
    }
    
    .slide-visual {
        margin: 1.5rem 0;
    }
    
    .slide-visual svg {
        max-width: 150px;
        height: auto;
    }
    
    .overview-grid {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 15px;
    }
    
    .overview-slide {
        padding: 20px;
        border-radius: 12px;
    }
    
    .overview-slide h3 {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }
    
    .overview-slide p {
        font-size: 0.95rem;
        line-height: 1.4;
    }
    
    .help-content {
        padding: 2rem;
        margin: 1rem;
        border-radius: 15px;
        max-width: 95%;
    }
    
    .help-content h3 {
        font-size: 1.4rem;
        margin-bottom: 1.5rem;
    }
    
    .help-shortcuts {
        gap: 1rem;
    }
    
    .shortcut {
        padding: 0.8rem 0;
    }
    
    .shortcut kbd {
        padding: 0.5rem 0.9rem;
        font-size: 1rem;
        border-radius: 8px;
    }
    
    .shortcut span {
        font-size: 1.05rem;
    }
    
    .interaction-prompt {
        font-size: 1.35rem;
        margin-top: 1.3rem;
        font-weight: 700;
    }
    
    .qna-prompt {
        font-size: 1.5rem;
        margin-top: 1.2rem;
    }
}

/* ===== EXTRA SMALL SCREENS ===== */
@media (max-width: 320px) {
    .slide-title, .fairy-title {
        font-size: 1.8rem;
    }
    
    .slide h2.slide-title {
        font-size: 1.7rem;
    }
    
    .slide-list {
        font-size: 1.05rem;
    }
    
    .slide-content {
        padding: 2rem 1.5rem;
    }
    
    .nav-arrow {
        width: 55px;
        height: 55px;
    }
    
    .nav-arrow.next {
        right: 15px;
    }
    
    .nav-arrow.prev {
        left: 15px;
    }
    
    .performance-toggle {
        top: 10px;
        left: 10px;
        width: 45px;
        height: 45px;
    }
    
    .performance-tooltip {
        top: 60px;
        left: 5px;
        font-size: 0.7rem;
        padding: 6px 10px;
        max-width: 140px;
    }
}

/* ===== LANDSCAPE MOBILE ===== */
@media (max-width: 768px) and (orientation: landscape) and (max-height: 500px) {
    .slide-content {
        max-height: 90vh;
        overflow-y: auto;
        padding: 2rem;
    }
    
    .slide-title, .fairy-title {
        font-size: 2.2rem;
        margin-bottom: 1rem;
    }
    
    .slide-list {
        font-size: 1.1rem;
        line-height: 1.5;
    }
    
    .slide-visual {
        margin: 1.2rem 0;
    }
    
    .slide-visual svg {
        max-width: 110px;
    }
    
    .performance-tooltip {
        display: none;
    }
}

/* ===== TOUCH DEVICES ===== */
@media (hover: none) and (pointer: coarse) {
    .nav-arrow {
        width: 70px;
        height: 70px;
    }
    
    .nav-arrow.next {
        right: 20px;
    }
    
    .nav-arrow.prev {
        left: 20px;
    }
    
    .overview-slide {
        padding: 25px;
        min-height: 90px;
    }
    
    .help-shortcuts .shortcut {
        padding: 1.2rem 0;
        border-bottom: 1px solid #E6E6FA;
    }
    
    .help-shortcuts .shortcut:last-child {
        border-bottom: none;
    }
    
    .desktop-only {
        display: none;
    }
    
    .mobile-only {
        display: block;
    }
    
    .mobile-tip {
        background: rgba(255, 215, 0, 0.1);
        padding: 0.8rem;
        border-radius: 12px;
        border-left: 4px solid #FFD700;
    }
    
    .timer {
        min-height: 44px;
        min-width: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .performance-toggle {
        min-height: 44px;
        min-width: 44px;
    }
}

/* ===== DESKTOP/POINTER DEVICES ===== */
@media (hover: hover) and (pointer: fine) {
    .mobile-only {
        display: none;
    }
    
    .desktop-only {
        display: block;
    }
    
    .help-shortcuts .shortcut.desktop-only {
        display: flex;
    }
    
    .help-shortcuts .shortcut.mobile-only {
        display: none;
    }
    
    .mobile-tip {
        display: none;
    }
}

/* ===== MOBILE DEVICE CLASS ===== */
.mobile-device .nav-arrow {
    box-shadow: 0 10px 40px rgba(147, 112, 219, 0.4);
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(255, 215, 0, 0.6);
}

.mobile-device .slide-content {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.mobile-device .timer {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 8px 30px rgba(75, 0, 130, 0.2);
}

.mobile-device .performance-toggle {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 8px 30px rgba(147, 112, 219, 0.2);
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
    .slide-content {
        background: rgba(255, 255, 255, 1);
        border: 3px solid #4B0082;
    }
    
    .slide-title,
    .slide h2.slide-title {
        color: #000080;
    }
    
    .slide-list li {
        color: #000;
    }
    
    .nav-arrow {
        background: #fff;
        border: 3px solid #4B0082;
    }
    
    .performance-toggle {
        background: #fff;
        border: 3px solid #4B0082;
    }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    body {
        background: linear-gradient(-45deg, #E6E6FA, #DDA0DD);
        background-size: 100% 100%;
    }
    
    body.performance-mode {
        background: linear-gradient(-45deg, #F8F8FF, #F0F8FF);
        background-size: 100% 100%;
    }
    
    .fairy-book {
        animation: none;
    }
    
    .magic-particles::before,
    .magic-particles::after {
        animation: none;
    }
    
    .fairy-title::after {
        animation: none;
    }
}

/* ===== FOCUS STYLES FOR ACCESSIBILITY ===== */
*:focus {
    outline: 3px solid #FFD700;
    outline-offset: 3px;
}

.slide-content:focus-within {
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.15), 0 0 0 3px #FFD700;
}

/* ===== PRINT STYLES ===== */
@media print {
    body {
        background: white;
    }
    
    .slide {
        position: relative;
        opacity: 1;
        transform: none;
        page-break-after: always;
        padding: 3cm;
    }
    
    .slide-content {
        background: white;
        box-shadow: none;
        border: 2px solid #4B0082;
    }
    
    .progress-bar,
    .timer,
    .performance-toggle,
    .performance-tooltip,
    .nav-arrow,
    .overview-container,
    .help-overlay,
    .magic-particles {
        display: none;
    }
}