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

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: #ffffff;
            min-height: 100vh;
            color: black;
        }

        .container {
            max-width: 900px;
            margin: 0 auto;
            padding: 20px;
        }

        .header {
            text-align: center;
            color: black;
            margin-bottom: 30px;
        }

        .header h1 {
            font-size: 2.5em;
            margin-bottom: 10px;
        }

        .header p {
            font-size: 1.2em;
            opacity: 0.9;
        }

        .progress-bar {
            background: rgba(255, 255, 255, 0.2);
            border-radius: 20px;
            height: 8px;
            margin: 20px 0;
            overflow: hidden;
        }

        .progress-fill {
            background: #ff4d91;
            height: 100%;
            transition: width 0.3s ease;
            border-radius: 20px;
        }

        .lesson-card {
            background: white;
            border-radius: 15px;
            padding: 30px;
            margin: 20px 0;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            transition: transform 0.3s ease;
        }

        .lesson-card:hover {
            transform: translateY(-2px);
        }

        .section-title {
            color: #ff006e;
            font-size: 1.8em;
            margin-bottom: 20px;
            border-bottom: 3px solid #ff006e;
            padding-bottom: 10px;
        }

        .theory-content {
            line-height: 1.8;
            margin-bottom: 25px;
        }

        .phrase-box {
            background: #ff006e; /* softer shade of #ff0006e */
            border-left: 4px solid #ff006e;
            padding: 15px;
            margin: 15px 0;
            border-radius: 5px;
        }

        .phrase-box .dholuo-text {
            color: white !important;
        }

        .phrase-box .english-translation {
            color: white !important; 
        }

        .phrase-box .literal-translation {
            color: white !important;
        }

        .dholuo-text {
            font-size: 1.3em;
            font-weight: bold;
            color: #333;
            margin-bottom: 5px;
        }

        .literal-translation {
            color: white;
            margin-bottom: 5px;
            opacity: 0.8;
            font-style: normal;
        }

        .english-translation {
            color: #444;
        }

        .practice-section {
            background: #f0f4ff;
            border-radius: 10px;
            padding: 25px;
            margin-top: 25px;
        }

        .exercise-type {
            margin-bottom: 20px;
        }

        .exercise-title {
            font-size: 1.2em;
            color: #ff006e;
            margin-bottom: 10px;
            font-weight: bold;
        }

        .pronunciation-guide {
            background: white;
            padding: 15px;
            border-radius: 8px;
            margin: 10px 0;
            border: 2px solid #e3f2fd;
        }

        .play-button {
            background: #ff4d91;
            color: white;
            border: black;
            padding: 3px 9px;
            border-radius: 20px;
            cursor: pointer;
            font-size: 0.7em;
            margin-left: 10px;
            transition: background 0.2s ease transform 0.1s ease;
        }

        .play-button:active

        .play-button.playing {
            background: #ff1a6b;  /* darker/pinkish */
            transform: scale(0.95); /* slightly shrink to indicate click */
}

        .play-button:hover {
            background: #fa94bb;
        }

        .exercise-question {
            background: white;
            padding: 15px;
            border-radius: 8px;
            margin: 10px 0;
            border: 1px solid #ddd;
        }

        .options {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            margin-top: 15px;
        }

        .option-button {
            background: #f8f9fa;
            border: 2px solid #ddd;
            padding: 12px;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
            text-align: left;
        }

        .option-button:hover {
            border-color: #ff4d91;
            background: #f0f4ff;
        }

        .option-button.correct {
            border-color: #4CAF50;
            background: #e8f5e8;
        }

        .option-button.incorrect {
            border-color: #f44336;
            background: #ffeaea;
        }

        .feedback {
            margin-top: 15px;
            padding: 10px;
            border-radius: 5px;
            font-weight: bold;
        }

        .feedback.correct {
            background: #e8f5e8;
            color: #2e7d32;
        }

        .feedback.incorrect {
            background: #ffeaea;
            color: #c62828;
        }

        .navigation {
            display: flex;
            justify-content: space-between;
            margin-top: 30px;
        }

        .nav-button {
            background: #ff006e;
            color: white;
            border: none;
            padding: 12px 25px;
            border-radius: 25px;
            cursor: pointer;
            font-size: 1em;
            transition: background 0.3s ease;
        }

        .nav-button:hover {
            background: #ff4d91;
        }

        .nav-button:disabled {
            background: #ccc;
            cursor: not-allowed;
        }

        .completion-message {
            text-align: center;
            background: linear-gradient(135deg, #4CAF50, #45a049);
            color: white;
            padding: 20px;
            border-radius: 10px;
            margin: 20px 0;
        }

        .hidden {
            display: none;
        }

        @media (max-width: 768px) {
            .container {
                padding: 10px;
            }
            
            .header h1 {
                font-size: 2em;
            }
            
            .options {
                grid-template-columns: 1fr;
            }
        }

        .conversation-section {
            background: #f8f9ff;
            border-radius: 15px;
            padding: 25px;
            margin: 20px 0;
            border-left: 5px solid #ff006e;
        }

        .conversation-title {
            font-size: 1.3em;
            color: #ff006e;
            margin-bottom: 20px;
            font-weight: bold;
            text-align: center;
        }

        .conversation-line {
            display: flex;
            margin: 15px 0;
            align-items: flex-start;
        }

        .conversation-line.person-a {
            justify-content: flex-start;
        }

        .conversation-line.person-b {
            justify-content: flex-end;
        }

        .speech-bubble {
            max-width: 70%;
            padding: 15px 20px;
            border-radius: 20px;
            position: relative;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        }

        .speech-bubble.person-a {
            background: #ff006e;
            color: white;
            border-bottom-left-radius: 5px;
        }

        .person-a .dholuo-text {
            color: white !important;
        }

        .person-a .literal-breakdown {
            color: white !important;
            font-style: italic;
        }


        .person-a .literal-translation {
            color: white !important;
            font-style: normal;
        }

        .speech-bubble.person-b {
            background: white;
            color: #ff006e;
            border-bottom-right-radius: 5px;
        }

        .person-b .dholuo-text {
            color: #ff006e !important;
        }

        .person-b .literal-breakdown {
            color: #ff006e !important;
            font-style: italic;
        }

        .person-b .literal-translation {
            color: #ff006e !important;
            font-style: normal;
        }

        .pronoun {
            background: rgba(255, 255, 255, 0.3);
            padding: 2px 6px;
            border-radius: 4px;
            font-weight: bold;
        }

        .person-b .pronoun {
            background: rgba(102, 126, 234, 0.2);
            color: #ff006e;
        }

        .speaker-label {
            font-size: 0.8em;
            color: #666;
            margin: 0 10px;
            align-self: center;
            font-weight: bold;
        }

        .conversation-note {
            background: #ffe0ec; /* very light pink background */
            border: 1px solid #ff80b3; /* soft pink border */
            color: #800037; /* deep rose text */
            border-radius: 8px;
            padding: 15px;
            margin-top: 20px;
            font-size: 0.9em;
        }



        .conversation-note strong {
            color: #ff006e;
        }

        .literal-breakdown {
            font-size: 0.7em;
            margin-top: 3px;
            border-top: 1px solid rgba(255, 255, 255, 0.2);
            padding-top: 5px;
        }

        .person-b .literal-breakdown {
            border-top: 1px solid rgba(102, 126, 234, 0.2);
        }

        .speech-bubble {
                max-width: 85%;
            }
            
            .speaker-label {
                display: none; /* Hide labels on mobile to save space */
            }

            /* there could be an issue on where i've placed the styles here */
        .vocabulary-card {
            background: #ff006e;
            border-radius: 15px;
            padding: 25px;
            margin: 25px 0;
            color: black;
            box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
        }

        .vocabulary-title {
            font-size: 1.4em;
            font-weight: bold;
            text-align: center;
            margin-bottom: 20px;
            color: white;
        }

        .vocabulary-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 15px;
        }

        .vocab-item {
            background: rgba(255, 255, 255, 0.15);
            border-radius: 10px;
            padding: 15px;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            transition: transform 0.3s ease, background 0.3s ease;
        }

        .vocab-item:hover {
            transform: translateY(-2px);
            background: rgba(255, 255, 255, 0.2);
        }

        .vocab-dholuo {
            font-size: 1.3em;
            font-weight: bold;
            color: #fff;
            margin-bottom: 5px;
        }

        .vocab-type {
            font-size: 0.8em;
            color: #e0e7ff;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 8px;
        }

        .vocab-meaning {
            font-size: 1em;
            color: #f0f4ff;
            line-height: 1.4;
        }

        .vocab-note {
            font-size: 0.85em;
            color: #d1d9ff;
            font-style: italic;
            margin-top: 5px;
            border-top: 1px solid rgba(255, 255, 255, 0.2);
            padding-top: 5px;
        }

        /* Mobile responsive */
        @media (max-width: 768px) {
            .vocabulary-grid {
                grid-template-columns: 1fr;
            }
            
            .vocabulary-card {
                padding: 20px;
            }
        }
        /* ===== PROSE WRITING SECTION ===== */
.prose-writing-section {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f5e8 100%);
    border-radius: 15px;
    padding: 25px;
    margin: 25px 0;
    border-left: 5px solid #4CAF50;
}

.writing-prompts {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
    border: 2px solid #e3f2fd;
}

.writing-prompts h4 {
    color: #ff006e;
    margin-bottom: 10px;
}

.writing-prompts ul {
    margin-left: 20px;
    line-height: 1.6;
}

.writing-prompts li {
    margin: 8px 0;
    color: #555;
}

.example-box {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    font-family: monospace;
    font-size: 1.1em;
}

.writing-area {
    margin: 20px 0;
}

.writing-area textarea {
    width: 100%;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    font-size: 1em;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.writing-area textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.2);
}

.word-count {
    text-align: right;
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

.share-section {
    text-align: center;
    margin-top: 20px;
}

.share-button {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.share-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

/* ===== AUDIO COMPREHENSION SECTION ===== */
.audio-comprehension-section {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 100%);
    border-radius: 15px;
    padding: 25px;
    margin: 25px 0;
    border-left: 5px solid #ff006e;
}

.audio-player {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.audio-player audio {
    width: 100%;
    max-width: 400px;
    margin-bottom: 15px;
}

.replay-info {
    font-size: 0.9em;
    color: #667eea;
    font-weight: bold;
}

.audio-questions {
    margin-top: 25px;
}

.audio-questions .exercise-type {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin: 15px 0;
    border: 2px solid #e3f2fd;
}

/* ===== COMPLETION SECTION ===== */
.completion-section {
    background: linear-gradient(135deg, #ff006e 0%, #ff2e8a 100%);
    border-radius: 20px;
    padding: 30px;
    margin: 25px 0;
    color: white;
    text-align: center;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.congratulations h3 {
    font-size: 2em;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.chapter-summary {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.chapter-summary h4 {
    color: #ff4d91;
    margin-bottom: 10px;
}

.achievements {
    margin: 25px 0;
}

.achievements h4 {
    color: #ff4d91;
    margin-bottom: 15px;
}

.achievement-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.achievement-badge {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 0.9em;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    transition: transform 0.3s ease;
}

.achievement-badge:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.25);
}

.next-steps {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    margin-top: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.next-steps h4 {
    color: #ff4d91;
    margin-bottom: 10px;
}

/* ===== MOBILE RESPONSIVENESS ===== */
@media (max-width: 768px) {
    .prose-writing-section,
    .audio-comprehension-section,
    .completion-section {
        padding: 20px;
        margin: 15px 0;
    }
    
    .writing-prompts,
    .chapter-summary,
    .next-steps {
        padding: 15px;
    }
    
    .achievement-list {
        flex-direction: column;
        align-items: center;
    }
    
    .achievement-badge {
        margin: 5px 0;
    }
    
    .congratulations h3 {
        font-size: 1.6em;
    }
    
    .audio-player audio {
        width: 100%;
    }
}
/* ===== NAVIGATION BAR STYLES ===== */
.navigation-bar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.lesson-nav, .section-nav, .quick-jump {
    margin-bottom: 15px;
}

.lesson-nav h4, .section-nav h4 {
    color: #ff006e;
    margin-bottom: 10px;
    font-size: 1em;
}

.lesson-buttons, .section-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lesson-btn, .section-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 20px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
    min-width: 45px;
    text-align: center;
}

.lesson-btn:hover, .section-btn:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

.lesson-btn.active {
    background: #ff006e;
    color: white;
    border-color: #0000;
}

.section-btn.active {
    background: #ff006e;
    color: black;
    border-color: white;
}

.lesson-btn.completed {
    background: #ff006e;
    border-color: white;
    color: black;
}

.quick-jump {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.quick-jump label {
    font-weight: bold;
    color: #ff006e;
}

#lessonSelect {
    padding: 8px 12px;
    border: 2px solid #e9ecef;
    border-radius: 20px;
    background: white;
    cursor: pointer;
    font-size: 0.9em;
}

#lessonSelect:focus {
    outline: none;
    border-color: #ff006e;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .navigation-bar {
        padding: 15px;
    }
    
    .lesson-buttons, .section-buttons {
        gap: 5px;
    }
    
    .lesson-btn, .section-btn {
        padding: 6px 10px;
        font-size: 0.8em;
        min-width: 35px;
    }
    
    .quick-jump {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}
.table-section {
    background: #f8f9ff;
    border-radius: 15px;
    padding: 25px;
    margin: 25px 0;
    border-left: 5px solid #ff006e;
}

.table-introduction {
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 1em;
}

.table-container {
    background: white;
    border-radius: 10px;
    padding: 15px;
    overflow-x: auto; /* Allows horizontal scrolling on mobile */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin: 20px 0;
}

.lesson-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1em;
    min-width: 600px; /* Ensures table doesn't get too cramped */
}

.lesson-table thead th {
    background: linear-gradient(135deg, #ff006e 0%, #ff2e8a);
    color: white;
    font-weight: bold;
    padding: 15px 12px;
    text-align: left;
    border: none;
    font-size: 0.95em;
}

.lesson-table thead th:first-child {
    border-top-left-radius: 8px;
}

.lesson-table thead th:last-child {
    border-top-right-radius: 8px;
}

.lesson-table tbody td {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: top;
    line-height: 1.4;
}

/* Alternating row colors */
.lesson-table tbody tr.even td {
    background-color: #f8f9fa;
}

.lesson-table tbody tr.odd td {
    background-color: white;
}

/* Hover effect for rows */
.lesson-table tbody tr:hover td {
    background-color: #e8f0fe !important;
    transition: background-color 0.2s ease;
}

/* Highlight Dholuo text (first and third columns for noun tables) */
.lesson-table tbody td:nth-child(1),
.lesson-table tbody td:nth-child(3) {
    font-weight: bold;
    color: #ff006e;
    font-size: 1.05em;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .table-section {
        padding: 20px;
    }
    
    .table-container {
        padding: 10px;
        margin: 15px 0;
    }
    
    .lesson-table {
        font-size: 0.9em;
        min-width: 500px; /* Still maintains minimum width but smaller */
    }
    /* hi useless comment */
    .lesson-table thead th,
    .lesson-table tbody td {
        padding: 10px 8px;
    }
    
    .table-introduction {
        font-size: 0.95em;
    }
}


/* Loading Spinner Styles */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ff006e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced Error Styles */
.error {
    background-color: #fee;
    border: 2px solid #fcc;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.error h3 {
    margin-top: 0;
    color: #c33;
}

/* Connection Status Indicator */
.connection-status {
    position: fixed;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8em;
    z-index: 1000;
}

.connection-status.online {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.connection-status.offline {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #ff006e 0%, #ff2e8a 100%);
    color: white;
    padding: 20px;
}

.login-card {
    background: white;
    color: #333;
    border-radius: 15px;
    padding: 40px 30px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
}

.login-card h2 {
    margin-bottom: 15px;
    color: #ff006e;
}

.login-card p {
    margin-bottom: 20px;
    font-size: 0.95em;
}

.login-card input {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 1em;
}

.login-btn, .google-btn {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    border-radius: 25px;
    border: none;
    cursor: pointer;
    font-size: 1em;
    color: white;
    background: linear-gradient(135deg, #ff006e 0%, #ff2e8a);
    transition: all 0.3s ease;
}

.login-btn:hover, .google-btn:hover {
    transform: translateY(-2px);
}

.divider {
    margin: 20px 0;
    font-weight: bold;
    color: #666;
}

.signup-text {
    margin-top: 15px;
    font-size: 0.9em;
}

.signup-text a {
    color: #ff4d91;
    text-decoration: none;
}

.error-message {
    margin-top: 15px;
    color: #c62828;
    font-weight: bold;
}

.logout-btn {
  position: fixed; /* stays in place even if user scrolls */
  top: 20px;
  right: 20px;
  background-color: #ff3366;
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: background-color 0.2s ease;
  z-index: 1000; /* ensures it's on top of everything */
}

.logout-btn:hover {
  background-color: #c0392b;
}

/* sign up page CSS */
/* ===== SIGNUP PAGE STYLES ===== */
.signup-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #ff006e 0%, #ff2e8a 100%);
    color: white;
    padding: 20px;
}

.signup-card {
    background: white;
    color: #333;
    border-radius: 15px;
    padding: 40px 30px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
}

.signup-card h2 {
    margin-bottom: 15px;
    color: #ff006e;
}

.signup-card p {
    margin-bottom: 20px;
    font-size: 0.95em;
}

.signup-card input {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 1em;
}

.signup-btn, .google-signup-btn {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    border-radius: 25px;
    border: none;
    cursor: pointer;
    font-size: 1em;
    color: white;
    background: linear-gradient(135deg, #ff006e 0%, #ff2e8a 100%);
    transition: all 0.3s ease;
}

.signup-btn:hover, .google-signup-btn:hover {
    transform: translateY(-2px);
}

.signup-text {
    margin-top: 15px;
    font-size: 0.9em;
}

.signup-text a {
    color: #ff4d91;
    text-decoration: none;
}

.signup-error-message {
    margin-top: 15px;
    color: #c62828;
    font-weight: bold;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Out of Lives Modal - Matching your pink style */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(255, 77, 145, 0.95);
    color: white;
    padding: 30px 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    max-width: 450px;
    width: 90%;
}

#outOfLivesModal[style*="flex"] .modal-content {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.modal-content h2 {
    margin: 0 0 15px 0;
    font-size: 2rem;
    color: white;
    font-weight: 700;
}

.modal-content p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.1rem;
    line-height: 1.5;
    margin: 10px 0;
}

.modal-content p.timer {
    font-size: 1.3rem;
    margin: 20px 0;
    font-weight: 600;
}

.modal-content p.timer strong {
    font-size: 1.6rem;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.modal-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 25px 0 15px 0;
}

.upgrade-button {
    background: white;
    color: #ff4d91;
    border: none;
    padding: 15px 25px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.upgrade-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.close-button {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    padding: 12px 25px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.close-button:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.premium-benefits {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
    margin-top: 10px;
}

.option-button.disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
    pointer-events: none;
}

@media (max-width: 600px) {
    .modal-content {
        padding: 25px 20px;
        width: 85%;
    }
}