* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: 'Comic Sans MS', 'Arial Rounded MT Bold', cursive, sans-serif;
    background: #4a5568;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#app {
    width: 100%;
    max-width: 800px;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    background: white;
    position: relative;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

/* Viewport optimizations */
@media (max-width: 800px) {
    #app {
        max-width: 100%;
        min-height: 100vh;
        min-height: -webkit-fill-available;
    }
}

@media screen and (max-device-width: 812px) and (orientation: landscape) {
    body {
        min-height: 100vh;
        min-height: -webkit-fill-available;
    }
    
    #app {
        min-height: 100vh;
        min-height: -webkit-fill-available;
    }
}

.screen {
    display: none;
    padding: 20px;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    flex: 1;
    position: relative;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.screen.active {
    display: flex;
    flex-direction: column;
}

/* Safe area handling for notched devices */
@supports (padding: max(0px)) {
    .screen {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
        padding-top: max(20px, env(safe-area-inset-top));
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
}

/* Home Screen */
#homeScreen {
    background: #fef3c7;
    align-items: center;
    justify-content: center;
}

.title {
    font-size: 3rem;
    color: #dc2626;
    text-shadow: 3px 3px 0 #fff, 6px 6px 0 #333;
    margin-bottom: 10px;
    animation: bounce 1s infinite;
}

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

.subtitle {
    font-size: 1.5rem;
    color: #1e40af;
    margin-bottom: 40px;
}

.categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
    width: 100%;
    max-width: 600px;
    padding: 0 10px;
}

/* Tablet optimizations */
@media (min-width: 600px) and (max-width: 1024px) {
    .categories {
        grid-template-columns: repeat(3, 1fr);
        max-width: 500px;
        gap: 15px;
    }
}

/* Large tablet/desktop */
@media (min-width: 1025px) {
    .categories {
        grid-template-columns: repeat(4, 1fr);
        max-width: 600px;
    }
}

.category-btn {
    background: #3b82f6;
    border: 4px solid white;
    border-radius: 20px;
    padding: 25px 15px;
    font-size: 1.1rem;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 8px 0 rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-height: 120px;
    justify-content: center;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.category-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 11px 0 rgba(0,0,0,0.2);
}

.category-btn:active {
    transform: translateY(2px);
    box-shadow: 0 4px 0 rgba(0,0,0,0.2);
    transition: transform 0.1s;
}

/* Touch feedback for mobile */
@media (hover: none) and (pointer: coarse) {
    .category-btn:active {
        background: #2563eb;
        transform: scale(0.95);
    }
}

.emoji {
    font-size: 3rem;
}

.stats {
    font-size: 1.3rem;
    color: #2d3436;
    font-weight: bold;
}

.age-selector {
    margin-bottom: 30px;
    text-align: center;
}

.age-selector label {
    display: block;
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 10px;
    font-weight: bold;
}

.age-selector select {
    padding: 10px 20px;
    font-size: 1.1rem;
    border: 3px solid #333;
    border-radius: 10px;
    background: white;
    color: #333;
    font-weight: bold;
    cursor: pointer;
}

/* Game Screen */
#gameScreen {
    background: #dbeafe;
}

.game-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.icon-btn {
    background: #ef4444;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 0 rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

.icon-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 rgba(0,0,0,0.2);
}

.progress-bar {
    flex: 1;
    height: 30px;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    border: 3px solid #333;
}

.progress-fill {
    height: 100%;
    background: #10b981;
    transition: width 0.5s;
    width: 0%;
}

.stars-display {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

.game-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    min-height: 0;
    padding: 10px 0;
}

.word-display {
    text-align: center;
    margin-bottom: 20px;
}

.word-image {
    width: min(200px, 40vw);
    height: min(200px, 40vw);
    max-width: 250px;
    max-height: 250px;
    background: white;
    border-radius: 20px;
    border: 5px solid #333;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(4rem, 12vw, 8rem);
    box-shadow: 0 8px 0 rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

/* Enhanced Word Image with Realistic Photos */
.word-image {
    width: min(200px, 40vw);
    height: min(200px, 40vw);
    max-width: 250px;
    max-height: 250px;
    background: white;
    border-radius: 20px;
    border: 5px solid #333;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(4rem, 12vw, 8rem);
    box-shadow: 0 8px 0 rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.word-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
    transition: opacity 0.3s ease;
}

.word-image .image-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(4rem, 12vw, 8rem);
    opacity: 0.5;
    transition: opacity 0.3s ease;
    z-index: 1;
}

/* Image hover effects */
.word-image:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 0 rgba(0,0,0,0.2);
}

.word-image img:hover {
    transform: scale(1.05);
}

/* Loading animation */
@keyframes imageShimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

.word-image.loading {
    background: linear-gradient(90deg, #f0f0f0 0px, #e0e0e0 40px, #f0f0f0 80px);
    background-size: 200px 100%;
    animation: imageShimmer 1.5s infinite;
}

/* Ensure emoji fallback looks good */
.word-image:not(:has(img)) {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* Mobile optimizations for images */
@media (max-width: 768px) {
    .word-image {
        width: min(180px, 45vw);
        height: min(180px, 45vw);
        border-width: 4px;
    }
    
    .word-image img {
        border-radius: 12px;
    }
}

@media (max-width: 480px) {
    .word-image {
        width: min(160px, 50vw);
        height: min(160px, 50vw);
        border-width: 3px;
        margin-bottom: 15px;
    }
    
    .word-image img {
        border-radius: 10px;
    }
    
    .word-image .image-loading {
        font-size: clamp(3rem, 10vw, 4rem);
    }
}

.sound-btn {
    background: #8b5cf6;
    color: white;
    border: none;
    border-radius: 15px;
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 6px 0 rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

.sound-btn:active {
    transform: translateY(3px);
    box-shadow: 0 3px 0 rgba(0,0,0,0.2);
}

.drop-zone {
    display: flex;
    gap: clamp(5px, 2vw, 10px);
    justify-content: center;
    flex-wrap: wrap;
    min-height: 80px;
    padding: 15px;
    background: rgba(255,255,255,0.5);
    border-radius: 15px;
    border: 3px dashed #333;
    margin-bottom: 15px;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.letter-slot {
    width: clamp(45px, 12vw, 60px);
    height: clamp(55px, 14vw, 70px);
    min-width: 45px;
    min-height: 55px;
    background: white;
    border: 3px solid #333;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.3rem, 4vw, 2rem);
    font-weight: bold;
    color: #333;
    transition: all 0.3s;
    touch-action: manipulation;
    flex-shrink: 0;
}

.letter-slot.filled {
    background: #86efac;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
}

.action-btn {
    background: #ef4444;
    color: white;
    border: 3px solid #333;
    border-radius: 10px;
    padding: 12px 25px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 0 rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

.action-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 rgba(0,0,0,0.2);
}

.letter-bank {
    display: flex;
    gap: clamp(5px, 2vw, 10px);
    justify-content: center;
    flex-wrap: wrap;
    padding: 20px 10px;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.letter-tile {
    width: clamp(45px, 12vw, 60px);
    height: clamp(55px, 14vw, 70px);
    min-width: 45px;
    min-height: 55px;
    background: #fbbf24;
    border: 3px solid #333;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.3rem, 4vw, 2rem);
    font-weight: bold;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 0 rgba(0,0,0,0.2);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    flex-shrink: 0;
    position: relative;
}

.letter-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 0 rgba(0,0,0,0.2);
}

.letter-tile:active {
    transform: translateY(1px);
    box-shadow: 0 2px 0 rgba(0,0,0,0.2);
    transition: transform 0.1s;
}

/* Touch feedback for mobile */
@media (hover: none) and (pointer: coarse) {
    .letter-tile:active {
        background: #f59e0b;
        transform: scale(0.95);
    }
}

.letter-tile.used {
    opacity: 0.3;
    pointer-events: none;
    transform: scale(0.9);
}

.feedback {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    min-height: 50px;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

.feedback.correct {
    color: #059669;
}

.feedback.incorrect {
    color: #dc2626;
}

/* Victory Screen */
#victoryScreen {
    background: #fef3c7;
    align-items: center;
    justify-content: center;
}

.victory-content {
    text-align: center;
}

.victory-title {
    font-size: 3rem;
    color: #dc2626;
    margin-bottom: 30px;
    animation: bounce 1s infinite;
}

.victory-stars {
    font-size: 4rem;
    margin: 20px 0;
}

.victory-text {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 40px;
}

.victory-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.big-btn {
    background: #3b82f6;
    color: white;
    border: 4px solid white;
    border-radius: 15px;
    padding: 20px 40px;
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 6px 0 rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

.big-btn:active {
    transform: translateY(3px);
    box-shadow: 0 3px 0 rgba(0,0,0,0.2);
}

.big-btn.secondary {
    background: #94a3b8;
    color: white;
}

/* Settings */
.settings-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.9);
    border: 3px solid #333;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 0 rgba(0,0,0,0.2);
    z-index: 100;
}

.settings-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border: 5px solid #333;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: none;
    z-index: 101;
}

.settings-panel.active {
    display: block;
}

.settings-panel h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.settings-panel label {
    display: block;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.settings-panel input[type="range"] {
    width: 100%;
    margin-top: 10px;
}

.footer {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    color: rgba(0,0,0,0.5);
    z-index: 50;
}

/* Responsive Design - Mobile First Approach */

/* Small phones (320px - 480px) */
@media (max-width: 480px) {
    .screen {
        padding: 15px 10px;
    }
    
    .title {
        font-size: clamp(1.8rem, 8vw, 2.2rem);
        text-shadow: 2px 2px 0 #fff, 4px 4px 0 #333;
        margin-bottom: 15px;
    }
    
    .subtitle {
        font-size: clamp(1rem, 4vw, 1.2rem);
        margin-bottom: 25px;
    }
    
    .categories {
        grid-template-columns: 1fr;
        gap: 15px;
        max-width: 100%;
        padding: 0;
    }
    
    .category-btn {
        padding: 20px 15px;
        font-size: 1rem;
        min-height: 100px;
    }
    
    .emoji {
        font-size: clamp(2rem, 8vw, 2.5rem);
    }
    
    .stats {
        font-size: clamp(0.9rem, 3vw, 1.1rem);
        gap: 15px;
    }
    
    .game-header {
        gap: 8px;
        margin-bottom: 15px;
        flex-wrap: wrap;
    }
    
    .icon-btn {
        width: clamp(40px, 10vw, 45px);
        height: clamp(40px, 10vw, 45px);
        font-size: clamp(1rem, 3vw, 1.2rem);
    }
    
    .progress-bar {
        height: 25px;
        min-width: 120px;
        flex: 1;
    }
    
    .stars-display {
        font-size: clamp(1rem, 3vw, 1.2rem);
    }
    
    .sound-btn {
        padding: 10px 20px;
        font-size: clamp(0.9rem, 3vw, 1rem);
        margin-bottom: 15px;
    }
    
    .drop-zone {
        gap: clamp(3px, 1.5vw, 8px);
        padding: 10px;
        min-height: 70px;
        margin-bottom: 15px;
    }
    
    .action-buttons {
        gap: 10px;
        margin-bottom: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .action-btn {
        padding: 10px 15px;
        font-size: clamp(0.9rem, 3vw, 1rem);
        min-width: 80px;
    }
    
    .letter-bank {
        gap: clamp(3px, 1.5vw, 8px);
        padding: 15px 5px;
    }
    
    .feedback {
        font-size: clamp(1.2rem, 4vw, 1.5rem);
        min-height: 40px;
        padding: 0 10px;
    }
    
    .victory-title {
        font-size: clamp(1.8rem, 6vw, 2.2rem);
        margin-bottom: 20px;
    }
    
    .victory-stars {
        font-size: clamp(2.5rem, 8vw, 3.5rem);
        margin: 15px 0;
    }
    
    .victory-text {
        font-size: clamp(1rem, 3vw, 1.2rem);
        margin-bottom: 25px;
        padding: 0 10px;
    }
    
    .big-btn {
        padding: 15px 25px;
        font-size: clamp(1rem, 3vw, 1.1rem);
        margin: 5px 0;
    }
    
    .settings-panel {
        width: 95%;
        max-width: 350px;
        padding: 20px;
        margin: 10px;
    }
    
    .settings-panel h3 {
        font-size: clamp(1.2rem, 4vw, 1.4rem);
    }
    
    .settings-panel label {
        font-size: clamp(0.9rem, 3vw, 1rem);
    }
}

/* Medium phones (481px - 767px) */
@media (min-width: 481px) and (max-width: 767px) {
    .screen {
        padding: 20px 15px;
    }
    
    .title {
        font-size: clamp(2.2rem, 6vw, 2.8rem);
    }
    
    .subtitle {
        font-size: clamp(1.2rem, 3vw, 1.4rem);
    }
    
    .categories {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        max-width: 450px;
    }
    
    .category-btn {
        padding: 25px 20px;
        font-size: 1.1rem;
        min-height: 110px;
    }
    
    .emoji {
        font-size: 2.8rem;
    }
    
    .word-image {
        width: min(180px, 35vw);
        height: min(180px, 35vw);
        font-size: clamp(5rem, 10vw, 7rem);
    }
    
    .sound-btn {
        padding: 12px 25px;
        font-size: 1.1rem;
    }
    
    .feedback {
        font-size: 1.6rem;
    }
    
    .victory-title {
        font-size: 2.8rem;
    }
    
    .victory-text {
        font-size: 1.3rem;
    }
}

/* Tablets (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    body {
        background: #4a5568;
    }
    
    .screen {
        padding: 30px 25px;
    }
    
    .title {
        font-size: 3.2rem;
    }
    
    .subtitle {
        font-size: 1.6rem;
    }
    
    .categories {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        max-width: 600px;
    }
    
    .category-btn {
        padding: 30px 25px;
        font-size: 1.3rem;
        min-height: 140px;
    }
    
    .emoji {
        font-size: 3.5rem;
    }
    
    .word-image {
        width: 220px;
        height: 220px;
        font-size: 8.5rem;
    }
    
    .letter-slot, .letter-tile {
        width: 65px;
        height: 75px;
        font-size: 2.2rem;
    }
    
    .drop-zone {
        gap: 12px;
        padding: 20px;
    }
    
    .letter-bank {
        gap: 12px;
        padding: 25px;
    }
    
    .feedback {
        font-size: 2.2rem;
    }
    
    .victory-title {
        font-size: 3.5rem;
    }
    
    .victory-stars {
        font-size: 4.5rem;
    }
    
    .victory-text {
        font-size: 1.6rem;
    }
    
    .big-btn {
        padding: 22px 45px;
        font-size: 1.4rem;
    }
}

/* Large tablets and small desktops (1025px+) */
@media (min-width: 1025px) {
    .categories {
        grid-template-columns: repeat(4, 1fr);
        max-width: 700px;
    }
    
    .word-image {
        width: 250px;
        height: 250px;
        font-size: 9rem;
    }
    
    .letter-slot, .letter-tile {
        width: 70px;
        height: 80px;
        font-size: 2.4rem;
    }
}

/* Landscape orientation optimizations */
@media screen and (orientation: landscape) and (max-height: 600px) {
    .screen {
        padding: 10px 15px;
    }
    
    .title {
        font-size: 2rem;
        margin-bottom: 10px;
    }
    
    .subtitle {
        font-size: 1rem;
        margin-bottom: 15px;
    }
    
    .categories {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
        margin-bottom: 20px;
    }
    
    .category-btn {
        padding: 15px 10px;
        font-size: 0.9rem;
        min-height: 80px;
    }
    
    .emoji {
        font-size: 2rem;
    }
    
    .word-image {
        width: 120px;
        height: 120px;
        font-size: 5rem;
        margin-bottom: 10px;
    }
    
    .game-content {
        padding: 5px 0;
    }
    
    .drop-zone {
        min-height: 60px;
        padding: 8px;
        margin-bottom: 10px;
    }
    
    .letter-bank {
        padding: 10px 5px;
    }
    
    .feedback {
        font-size: 1.2rem;
        min-height: 30px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .word-image {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
    
    .emoji {
        text-rendering: optimizeLegibility;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .bounce {
        animation: none !important;
    }
    
    .celebrate {
        animation: none !important;
    }
}

/* Animations */
@keyframes celebrate {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.2) rotate(-10deg); }
    75% { transform: scale(1.2) rotate(10deg); }
}

.celebrate {
    animation: celebrate 0.5s ease-in-out;
}
/* Advanced Features Styling */

/* Mode and Language Selectors */
.mode-selector, .language-selector {
    margin-bottom: 20px;
    text-align: center;
}

.mode-selector label, .language-selector label {
    display: block;
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 8px;
    font-weight: bold;
}

.mode-selector select, .language-selector select {
    padding: 8px 15px;
    font-size: 1rem;
    border: 2px solid #333;
    border-radius: 8px;
    background: white;
    color: #333;
    font-weight: bold;
    cursor: pointer;
}

/* Accessibility Panel */
.accessibility-panel {
    margin-top: 20px;
    text-align: center;
}

.accessibility-btn {
    background: #8b5cf6;
    color: white;
    border: 2px solid #333;
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 10px;
}

.accessibility-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
}

.accessibility-options.hidden {
    display: none;
}

.accessibility-options button {
    background: #f3f4f6;
    border: 2px solid #333;
    border-radius: 8px;
    padding: 8px 15px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.accessibility-options button:hover {
    background: #e5e7eb;
}

.accessibility-options button.active {
    background: #10b981;
    color: white;
}

/* Game Screen Enhancements */
.timer {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ef4444;
    background: white;
    padding: 5px 10px;
    border-radius: 10px;
    border: 2px solid #333;
}

.timer.hidden {
    display: none;
}

.difficulty-indicator {
    font-size: 0.9rem;
    color: #333;
    background: rgba(255,255,255,0.8);
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid #333;
}

.story-context {
    background: rgba(255,255,255,0.9);
    border: 2px solid #333;
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: #333;
    text-align: center;
    animation: fadeIn 0.5s;
}

.story-context.hidden {
    display: none;
}

.phonics-display {
    margin-top: 10px;
    font-size: 1.5rem;
    color: #8b5cf6;
    font-weight: bold;
}

.phonics-display.hidden {
    display: none;
}

/* Parent Dashboard */
#dashboardScreen {
    background: #f8fafc;
    padding: 20px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 3px solid #333;
    padding-bottom: 15px;
}

.dashboard-header h2 {
    font-size: 2rem;
    color: #333;
}

.dashboard-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.dashboard-section {
    background: white;
    border: 3px solid #333;
    border-radius: 15px;
    padding: 20px;
}

.dashboard-section h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 15px;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 10px;
}

.progress-chart {
    height: 200px;
    background: #f3f4f6;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    margin-bottom: 15px;
}

.progress-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.progress-stat {
    background: #f3f4f6;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
}

.progress-stat .value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #3b82f6;
}

.progress-stat .label {
    font-size: 0.9rem;
    color: #666;
}

.achievements-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.achievement-badge {
    background: #fef3c7;
    border: 2px solid #f59e0b;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    min-width: 80px;
}

.achievement-badge .emoji {
    font-size: 2rem;
    display: block;
    margin-bottom: 5px;
}

.achievement-badge .name {
    font-size: 0.8rem;
    font-weight: bold;
    color: #333;
}

.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.recommendation {
    background: #dbeafe;
    border-left: 4px solid #3b82f6;
    padding: 15px;
    border-radius: 8px;
}

.recommendation.high-priority {
    border-left-color: #ef4444;
    background: #fee2e2;
}

.recommendation.medium-priority {
    border-left-color: #f59e0b;
    background: #fef3c7;
}

.custom-words-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.custom-words-controls input {
    flex: 1;
    padding: 10px;
    border: 2px solid #333;
    border-radius: 8px;
    font-size: 1rem;
}

.custom-words-controls button {
    background: #10b981;
    color: white;
    border: 2px solid #333;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: bold;
    cursor: pointer;
}

.custom-words-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.custom-word-tag {
    background: #e5e7eb;
    border: 1px solid #9ca3af;
    border-radius: 15px;
    padding: 5px 12px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.custom-word-tag .remove {
    cursor: pointer;
    color: #ef4444;
    font-weight: bold;
}

.parent-dashboard-btn {
    position: fixed;
    top: 80px;
    right: 20px;
    background: #3b82f6;
    color: white;
    border: 3px solid #333;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 0 rgba(0,0,0,0.2);
    z-index: 100;
}

/* Badge Unlock Celebration */
.badge-unlock-celebration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.5s;
}

.celebration-content {
    background: white;
    border: 5px solid #333;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    animation: bounceIn 0.5s;
}

.celebration-content h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 20px;
}

.badge-display {
    font-size: 4rem;
    margin: 20px 0;
    animation: pulse 1s infinite;
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Accessibility Features */
.high-contrast {
    filter: contrast(150%);
}

.high-contrast .screen {
    background: #000 !important;
    color: #fff !important;
}

.high-contrast .category-btn,
.high-contrast .big-btn,
.high-contrast .action-btn {
    background: #fff !important;
    color: #000 !important;
    border: 3px solid #fff !important;
}

.dyslexia-font {
    font-family: 'OpenDyslexic', 'Comic Sans MS', cursive, sans-serif;
}

.font-large {
    font-size: 120%;
}

.font-xlarge {
    font-size: 140%;
}

.reduced-motion * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
}

/* Subscription and Premium Features */
.subscription-status {
    padding: 10px;
    background: #f3f4f6;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 10px;
    font-weight: bold;
}

.subscription-status.premium {
    background: #fef3c7;
    color: #f59e0b;
}

.upgrade-btn {
    background: #f59e0b;
    color: white;
    border: 2px solid #333;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
}

.performance-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.performance-metrics div {
    background: #f3f4f6;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
}

/* Mobile Responsiveness for New Features */
@media (max-width: 768px) {
    .dashboard-content {
        grid-template-columns: 1fr;
    }
    
    .accessibility-options {
        flex-direction: column;
    }
    
    .custom-words-controls {
        flex-direction: column;
    }
    
    .parent-dashboard-btn {
        top: 70px;
        right: 15px;
        width: 45px;
        height: 45px;
    }
    
    .celebration-content {
        margin: 20px;
        padding: 30px;
    }
    
    .celebration-content h2 {
        font-size: 1.5rem;
    }
    
    .badge-display {
        font-size: 3rem;
    }
}

@media (max-width: 480px) {
    .mode-selector, .language-selector {
        margin-bottom: 15px;
    }
    
    .dashboard-header h2 {
        font-size: 1.5rem;
    }
    
    .dashboard-section {
        padding: 15px;
    }
    
    .story-context {
        padding: 10px;
        font-size: 1rem;
    }
}
/* Game Instructions & Help */
.game-instructions {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.5s;
}

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

.instruction-content {
    background: white;
    border: 5px solid #333;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    max-width: 500px;
    margin: 20px;
    animation: bounceIn 0.5s;
}

.instruction-content h3 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 20px;
}

.instruction-content p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.4;
}

.instruction-example {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 25px 0;
    padding: 20px;
    background: #f8fafc;
    border-radius: 15px;
    border: 2px solid #e5e7eb;
}

.example-emoji {
    font-size: 3rem;
}

.example-arrow {
    font-size: 2rem;
    color: #3b82f6;
    font-weight: bold;
}

.example-word {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    letter-spacing: 3px;
}

.start-game-btn {
    background: #10b981;
    color: white;
    border: 4px solid #333;
    border-radius: 15px;
    padding: 15px 30px;
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 6px 0 rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

.start-game-btn:active {
    transform: translateY(3px);
    box-shadow: 0 3px 0 rgba(0,0,0,0.2);
}

.current-task {
    background: rgba(59, 130, 246, 0.1);
    border: 2px solid #3b82f6;
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.current-task p {
    font-size: 1.1rem;
    font-weight: bold;
    color: #1e40af;
    margin: 0;
}

/* Category-specific instructions */
.task-vowels {
    background: rgba(139, 92, 246, 0.1);
    border-color: #8b5cf6;
}

.task-vowels p {
    color: #7c3aed;
}

.task-consonants {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
}

.task-consonants p {
    color: #dc2626;
}

.task-animals {
    background: rgba(34, 197, 94, 0.1);
    border-color: #22c55e;
}

.task-animals p {
    color: #16a34a;
}

.task-colors {
    background: rgba(251, 191, 36, 0.1);
    border-color: #fbbf24;
}

.task-colors p {
    color: #d97706;
}

.task-fruits {
    background: rgba(236, 72, 153, 0.1);
    border-color: #ec4899;
}

.task-fruits p {
    color: #db2777;
}

.task-objects {
    background: rgba(168, 85, 247, 0.1);
    border-color: #a855f7;
}

.task-objects p {
    color: #9333ea;
}

/* Help tooltip */
.help-tooltip {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #1f2937;
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    font-size: 1rem;
    max-width: 300px;
    text-align: center;
    z-index: 1001;
    animation: fadeIn 0.3s;
}

.help-tooltip::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border: 10px solid transparent;
    border-top-color: #1f2937;
}

/* Mobile responsiveness for instructions */
@media (max-width: 768px) {
    .instruction-content {
        padding: 20px;
        margin: 15px;
    }
    
    .instruction-content h3 {
        font-size: 1.5rem;
    }
    
    .instruction-content p {
        font-size: 1rem;
    }
    
    .instruction-example {
        flex-direction: column;
        gap: 10px;
    }
    
    .example-emoji {
        font-size: 2.5rem;
    }
    
    .example-word {
        font-size: 1.2rem;
    }
    
    .start-game-btn {
        font-size: 1.1rem;
        padding: 12px 25px;
    }
    
    .current-task p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .instruction-content {
        padding: 15px;
        margin: 10px;
    }
    
    .instruction-content h3 {
        font-size: 1.3rem;
    }
    
    .instruction-content p {
        font-size: 0.9rem;
    }
    
    .current-task {
        padding: 10px;
        margin-bottom: 15px;
    }
    
    .current-task p {
        font-size: 0.9rem;
    }
}
/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    body {
        -webkit-overflow-scrolling: touch;
        -webkit-user-select: none;
    }
    
    #app {
        -webkit-overflow-scrolling: touch;
    }
    
    .screen {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Fix for iOS Safari bottom bar */
    .screen {
        min-height: 100vh;
        min-height: -webkit-fill-available;
    }
    
    /* Prevent zoom on input focus */
    input, select, textarea {
        font-size: 16px !important;
    }
}

/* Android Chrome specific fixes */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    .letter-tile, .letter-slot {
        -webkit-tap-highlight-color: rgba(0,0,0,0.1);
    }
    
    .category-btn {
        -webkit-tap-highlight-color: rgba(255,255,255,0.2);
    }
}

/* Prevent text selection on game elements */
.word-image, .letter-tile, .letter-slot, .category-btn, .big-btn, .action-btn {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* Improve touch targets for accessibility */
.letter-tile, .letter-slot, .category-btn, .action-btn, .big-btn, .icon-btn {
    min-height: 44px;
    min-width: 44px;
}

/* Optimize for foldable devices */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .categories {
        grid-template-columns: repeat(4, 1fr);
        max-width: 80%;
    }
    
    .game-content {
        flex-direction: row;
        align-items: flex-start;
        gap: 20px;
    }
    
    .word-display {
        flex: 1;
        max-width: 300px;
    }
    
    .letter-bank {
        flex: 1;
        max-width: 400px;
    }
}

/* Ultra-wide screen optimizations */
@media (min-aspect-ratio: 21/9) {
    #app {
        max-width: 1200px;
    }
    
    .categories {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Print styles (for screenshots/sharing) */
@media print {
    body {
        background: white !important;
    }
    
    .settings-btn, .parent-dashboard-btn, .footer {
        display: none !important;
    }
    
    .screen {
        padding: 20px !important;
        min-height: auto !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background: #1a202c;
    }
    
    #app {
        background: #2d3748;
        color: white;
    }
    
    .screen {
        background: #2d3748;
        color: white;
    }
    
    .word-image {
        background: #4a5568;
        border-color: #e2e8f0;
    }
    
    .letter-slot {
        background: #4a5568;
        border-color: #e2e8f0;
        color: white;
    }
    
    .letter-slot.filled {
        background: #38a169;
    }
}

/* Force hardware acceleration for smooth animations */
.letter-tile, .letter-slot, .category-btn, .word-image {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform;
}

/* Optimize for battery life on mobile */
@media (max-width: 768px) {
    .letter-tile, .letter-slot, .category-btn {
        will-change: auto;
    }
    
    .letter-tile:hover, .category-btn:hover {
        transform: none;
    }
}

/* Ensure proper stacking context */
.game-instructions {
    z-index: 1000;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.settings-panel {
    z-index: 1001;
}

.help-tooltip {
    z-index: 1002;
}

.badge-unlock-celebration {
    z-index: 1003;
}

/* Game Mode Modals */
.timed-results-modal, .story-complete-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.timed-results-modal .modal-content,
.story-complete-modal .modal-content {
    background: white;
    border: 5px solid #333;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    max-width: 400px;
    margin: 20px;
    animation: bounceIn 0.5s ease;
}

.timed-results-modal h2,
.story-complete-modal h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 20px;
}

.results {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.result-stat {
    background: #f3f4f6;
    padding: 15px;
    border-radius: 10px;
    border: 2px solid #e5e7eb;
}

.result-stat .value {
    font-size: 2rem;
    font-weight: bold;
    color: #3b82f6;
    display: block;
}

.result-stat .label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

.story-celebration {
    margin: 20px 0;
    padding: 20px;
    background: #fef3c7;
    border-radius: 15px;
    border: 2px solid #f59e0b;
}

.celebration-emoji {
    font-size: 4rem;
    margin-bottom: 10px;
    animation: pulse 1s infinite;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.play-again-btn, .new-story-btn, .home-btn {
    background: #3b82f6;
    color: white;
    border: 3px solid #333;
    border-radius: 10px;
    padding: 12px 20px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}

.home-btn {
    background: #94a3b8;
}

.play-again-btn:active, .new-story-btn:active, .home-btn:active {
    transform: translateY(2px);
}

/* Story Mode Enhancements */
.story-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

.story-header h4 {
    font-size: 1.2rem;
    color: #333;
    margin: 0;
}

.story-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

.story-progress .progress-bar {
    width: 100px;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.story-progress .progress-fill {
    height: 100%;
    background: #10b981;
    transition: width 0.5s ease;
}

.story-progress span {
    font-size: 0.9rem;
    color: #666;
    font-weight: bold;
}

.story-text {
    font-size: 1.1rem;
    line-height: 1.4;
    color: #333;
    margin: 0;
    font-style: italic;
}

/* Timer Enhancements */
.timer {
    font-size: 1.2rem;
    font-weight: bold;
    background: white;
    padding: 8px 15px;
    border-radius: 10px;
    border: 3px solid #333;
    box-shadow: 0 4px 0 rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.timer.warning {
    background: #fef3c7;
    border-color: #f59e0b;
    animation: shake 0.5s ease-in-out;
}

.timer.danger {
    background: #fee2e2;
    border-color: #ef4444;
    animation: pulse 0.5s infinite;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Mobile responsiveness for game modes */
@media (max-width: 768px) {
    .results {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .story-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .story-progress {
        justify-content: center;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
    
    .timed-results-modal .modal-content,
    .story-complete-modal .modal-content {
        padding: 20px;
        margin: 15px;
    }
}

/* Success Indicator */
.success-indicator {
    position: fixed;
    z-index: 1500;
    pointer-events: none;
    animation: successPop 1.2s ease-out forwards;
}

.success-content {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    border: 4px solid white;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    white-space: nowrap;
}

.success-emoji {
    font-size: 1.8rem;
    animation: bounce 0.6s ease-in-out;
}

.success-text {
    font-size: 1.2rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

@keyframes successPop {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.3) rotate(-10deg);
    }
    15% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2) rotate(5deg);
    }
    30% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
    70% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8) translateY(-20px);
    }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateY(-8px); }
    50% { transform: translateY(0); }
    75% { transform: translateY(-4px); }
}

/* Mobile optimization for success indicator */
@media (max-width: 768px) {
    .success-content {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .success-emoji {
        font-size: 1.5rem;
    }
    
    .success-text {
        font-size: 1rem;
    }
}

/* Final mobile polish */
@media (max-width: 480px) {
    /* Ensure buttons are easily tappable */
    .letter-tile, .letter-slot {
        min-width: 50px;
        min-height: 60px;
    }
    
    /* Optimize spacing for small screens */
    .game-content {
        gap: 10px;
    }
    
    /* Ensure text is readable */
    .feedback {
        line-height: 1.2;
        padding: 5px;
    }
    
    /* Optimize for one-handed use */
    .action-buttons {
        position: sticky;
        bottom: 10px;
        background: rgba(255,255,255,0.9);
        padding: 10px;
        border-radius: 15px;
        margin: 10px 0;
    }
}

/* AI Agent Styles */
.ai-status {
    position: fixed;
    top: 10px;
    right: 10px;
    background: rgba(59, 130, 246, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    z-index: 1000;
    transition: all 0.3s ease;
}

.ai-status.ready {
    background: rgba(34, 197, 94, 0.9);
}

.ai-hints {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    padding: 12px;
    border-radius: 15px;
    margin: 10px 0;
    font-size: 14px;
    text-align: center;
    animation: aiPulse 2s infinite;
}

.ai-encouragement {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    margin: 8px 0;
    font-size: 13px;
    text-align: center;
    opacity: 0.9;
}

@keyframes aiPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.help-tooltip {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 20px;
    border-radius: 15px;
    max-width: 300px;
    text-align: center;
    z-index: 2000;
    animation: tooltipFadeIn 0.3s ease;
}

@keyframes tooltipFadeIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.upgrade-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    max-width: 400px;
    text-align: center;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}