/* Animated Teaching Platform Styles */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --success-color: #4ecdc4;
    --warning-color: #feca57;
    --danger-color: #ff6b6b;
    --dark-color: #2c3e50;
    --light-color: #f8f9fa;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    --gradient-warning: linear-gradient(135deg, #feca57 0%, #ff9ff3 100%);
    --gradient-danger: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
    --shadow-hover: 0 15px 40px rgba(0,0,0,0.15);
    --border-radius: 15px;
    --transition: none;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--dark-color);
    overflow-x: hidden;
}

/* Static Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}


.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Cards */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    margin: 1rem 0;
    transition: var(--transition);
}


.card:hover {
    box-shadow: var(--shadow-hover);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    font-family: inherit;
}


.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.btn-success {
    background: var(--gradient-success);
    color: white;
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.4);
}

.btn-warning {
    background: var(--gradient-warning);
    color: white;
    box-shadow: 0 4px 15px rgba(254, 202, 87, 0.4);
}

.btn-danger {
    background: var(--gradient-danger);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

/* Button Sizes */
.btn-large {
    padding: 16px 40px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 12px;
    min-width: 200px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 8px;
}

/* Submit Button Specific Styles */
.add-course-form button[type="submit"] {
    width: 100%;
    margin-top: 2rem;
    padding: 18px 40px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 12px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.add-course-form button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.6);
}

.add-course-form button[type="submit"]:active {
    transform: translateY(0);
}

.add-course-form button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Course Image Styles */
.course-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    border-radius: 15px 15px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 2rem;
}

/* Form Layout Improvements */
.add-course-form {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Submit Container */
.submit-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(102, 126, 234, 0.1);
}

.submit-container .btn {
    min-width: 250px;
    padding: 18px 40px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 12px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.submit-container .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.6);
}

.submit-container .btn:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .add-course-form {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .submit-container .btn {
        padding: 16px 30px;
        font-size: 16px;
        min-width: 200px;
    }
}

/* Progress Bars */
.progress-container {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    height: 8px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-bar {
    height: 100%;
    background: var(--gradient-success);
    border-radius: 50px;
    transition: width 0.8s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: linear-gradient(
        -45deg,
        rgba(255, 255, 255, 0.2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.2) 75%,
        transparent 75%,
        transparent
    );
    background-size: 50px 50px;
}


/* Badge System */
.badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}


.badge-gold {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #8b6914;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.badge-silver {
    background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
    color: #666;
    box-shadow: 0 4px 15px rgba(192, 192, 192, 0.4);
}

.badge-bronze {
    background: linear-gradient(135deg, #cd7f32 0%, #ffa500 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(205, 127, 50, 0.4);
}

.badge-special {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}


/* Points Display */
.points-display {
    background: var(--gradient-primary);
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    margin: 1rem 0;
    position: relative;
    overflow: hidden;
}


.points-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}


/* Leaderboard */
.leaderboard {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    transition: var(--transition);
    position: relative;
}

.leaderboard-item:hover {
    background: rgba(102, 126, 234, 0.05);
}

.leaderboard-item:last-child {
    border-bottom: none;
}

.rank {
    font-size: 1.5rem;
    font-weight: 700;
    margin-right: 1rem;
    min-width: 40px;
}

.rank-1 { color: #ffd700; }
.rank-2 { color: #c0c0c0; }
.rank-3 { color: #cd7f32; }

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 1rem;
    border: 3px solid transparent;
    background: var(--gradient-primary);
    padding: 2px;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.user-points {
    color: #666;
    font-size: 0.9rem;
}

/* Quiz Styles */
.quiz-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: var(--shadow);
}

.quiz-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(102, 126, 234, 0.1);
}

.quiz-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.quiz-timer {
    background: var(--gradient-danger);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    display: inline-block;
    font-weight: 600;
}

.question {
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.question-text {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.answer-options {
    display: grid;
    gap: 1rem;
}

.answer-option {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: white;
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}


.answer-option:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.answer-option.selected {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.1);
}

.answer-option.correct {
    border-color: var(--success-color);
    background: rgba(78, 205, 196, 0.1);
}

.answer-option.incorrect {
    border-color: var(--danger-color);
    background: rgba(255, 107, 107, 0.1);
}

.option-letter {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: 1rem;
    flex-shrink: 0;
}

.option-text {
    flex: 1;
    font-weight: 500;
}

/* Quiz Navigation */
.quiz-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 2px solid rgba(102, 126, 234, 0.1);
}

.quiz-progress {
    flex: 1;
    margin-right: 2rem;
}

.quiz-progress-bar {
    background: rgba(102, 126, 234, 0.1);
    height: 8px;
    border-radius: 50px;
    overflow: hidden;
}

.quiz-progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 50px;
    transition: width 0.3s ease;
}

/* Interactive Exercises */
.exercise-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: var(--shadow);
}

.exercise-header {
    text-align: center;
    margin-bottom: 2rem;
}

.exercise-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.code-editor {
    background: #2d3748;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin: 1rem 0;
    font-family: 'Courier New', monospace;
    color: #e2e8f0;
    position: relative;
    overflow: hidden;
}

.code-editor::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: #1a202c;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.code-editor textarea {
    width: 100%;
    height: 300px;
    background: transparent;
    border: none;
    color: #e2e8f0;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    outline: none;
    margin-top: 30px;
}

.run-button {
    background: var(--gradient-success);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 1rem;
}

.run-button:hover {
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.4);
}

.output {
    background: #1a202c;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-top: 1rem;
    font-family: 'Courier New', monospace;
    min-height: 100px;
    white-space: pre-wrap;
}


/* Responsive Design */
@media (max-width: 768px) {
    .nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .card {
        padding: 1rem;
        margin: 0.5rem 0;
    }
    
    .quiz-container {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .leaderboard-item {
        padding: 0.75rem 1rem;
    }
    
    .points-number {
        font-size: 2rem;
    }
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
}

/* Success/Error Messages */
.message {
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    margin: 1rem 0;
    font-weight: 500;
}

.message-success {
    background: rgba(78, 205, 196, 0.1);
    color: #2d5a5a;
    border-left: 4px solid var(--success-color);
}

.message-error {
    background: rgba(255, 107, 107, 0.1);
    color: #8b2c2c;
    border-left: 4px solid var(--danger-color);
}

.message-warning {
    background: rgba(254, 202, 87, 0.1);
    color: #8b6914;
    border-left: 4px solid var(--warning-color);
}

/* Quiz Question Layout */
.quiz-question {
    padding: 2.5rem 3rem 3rem 3rem;
    max-width: 100%;
    margin: 0;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding: 1.5rem 2rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.15);
}

.question-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.question-header h4 {
    margin: 0;
    color: var(--dark-color);
    font-size: 1.2rem;
    font-weight: 600;
}

.question-timer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    min-width: 80px;
    justify-content: center;
}

.question-timer i {
    font-size: 1rem;
}

.question-timer span {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 1.2rem;
}

.stop-quiz-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.stop-quiz-btn:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.stop-quiz-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(220, 53, 69, 0.3);
}

.stop-quiz-btn i {
    font-size: 0.9rem;
}

.quiz-question h3 {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 2.5rem;
    line-height: 1.6;
    text-align: center;
    padding: 2rem 2.5rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    border-left: 5px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.quiz-options {
    display: grid;
    gap: 1.25rem;
    margin-top: 0;
    margin-bottom: 2rem;
}

.quiz-option {
    background: white;
    border: 2px solid #e1e5e9;
    border-radius: 15px;
    padding: 1.5rem 2rem;
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--dark-color);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    min-height: 60px;
    display: flex;
    align-items: center;
}

.quiz-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: transparent;
    transition: all 0.3s ease;
}

.quiz-option:hover::before {
    background: var(--primary-color);
}

.quiz-option:hover {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.quiz-option.selected {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
    font-weight: 600;
}

.quiz-option.selected::before {
    background: var(--primary-color);
}

.quiz-option.correct {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    font-weight: 600;
}

.quiz-option.correct::before {
    background: #28a745;
}

.quiz-option.incorrect {
    border-color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    font-weight: 600;
}

.quiz-option.incorrect::before {
    background: #dc3545;
}

/* Timer warning states */
.question-timer.warning {
    background: linear-gradient(135deg, #ffc107 0%, #ff9f43 100%);
    animation: pulse 1s infinite;
}

.question-timer.danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    animation: pulse 0.5s infinite;
}

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

/* Game Modal Improvements */
.game-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
    padding: 2rem 1rem;
    box-sizing: border-box;
}

.game-modal.show {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.game-modal-content {
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 100%;
    max-height: none;
    overflow: visible;
    position: relative;
    margin: 0 auto;
    animation: slideIn 0.3s ease;
    min-height: 400px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.game-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.game-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.close-game {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-game:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.game-body {
    padding: 0;
    min-height: 400px;
    max-height: none;
    overflow: visible;
}

.game-footer {
    background: #f8f9fa;
    padding: 1rem 2rem;
    border-radius: 0 0 20px 20px;
    border-top: 1px solid #e9ecef;
}

.game-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--dark-color);
    flex-wrap: wrap;
    gap: 1rem;
}

.game-progress span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Hint Button Styles */
.hint-btn {
    background: linear-gradient(135deg, #ffc107 0%, #ff9f43 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    min-width: 120px;
    justify-content: center;
    position: relative;
    z-index: 10;
}

.hint-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4);
    background: linear-gradient(135deg, #ff9f43 0%, #ffc107 100%);
}

.hint-btn:active {
    transform: translateY(0);
}

.hint-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.hint-btn:disabled:hover {
    background: #6c757d;
    transform: none;
    box-shadow: none;
}

/* Ensure hint button is always visible when shown */
.hint-btn[style*="display: flex"] {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Game progress responsive layout */
@media (max-width: 768px) {
    .game-progress {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .hint-btn {
        order: -1;
        margin-bottom: 0.5rem;
    }
}

/* Memory Card Hint Styles */
.memory-card.hint-revealed {
    background: linear-gradient(135deg, #ffc107 0%, #ff9f43 100%);
    color: white;
    border-color: #ffc107;
    animation: hintPulse 0.5s ease-in-out;
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.5);
}

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

/* Quiz Hint Highlight */
.quiz-option.hint-highlight {
    background: linear-gradient(135deg, #ffc107 0%, #ff9f43 100%);
    color: white;
    border-color: #ffc107;
    animation: hintPulse 0.5s ease-in-out;
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.5);
    font-weight: 700;
}

.quiz-option.hint-highlight::before {
    background: #ffc107;
}

/* Word Puzzle Hint Styles */
.word-display.hint-revealed {
    background: linear-gradient(135deg, #ffc107 0%, #ff9f43 100%);
    color: white;
    border-color: #ffc107;
    animation: hintPulse 0.5s ease-in-out;
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.5);
    font-weight: 700;
}

/* Math Game Styles */
.math-game {
    padding: 2.5rem 3rem;
    max-width: 100%;
    margin: 0;
    text-align: center;
}

.math-problem {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 2.5rem;
    padding: 2rem 2.5rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    border-left: 5px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    font-family: 'Courier New', monospace;
}

.math-answer {
    width: 100%;
    max-width: 300px;
    padding: 1.5rem 2rem;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    border: 2px solid #e1e5e9;
    border-radius: 15px;
    background: white;
    color: var(--dark-color);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.math-answer:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: rgba(102, 126, 234, 0.02);
}

.math-answer::placeholder {
    color: #999;
    font-weight: 400;
}

.math-input-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.math-submit {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 12px;
    min-width: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Math Game Hint Styles */
.math-problem.hint-revealed {
    background: linear-gradient(135deg, #ffc107 0%, #ff9f43 100%);
    color: white;
    border-color: #ffc107;
    animation: hintPulse 0.5s ease-in-out;
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.5);
    font-weight: 700;
}

/* Responsive Design for Quiz */
@media (max-width: 768px) {
    .quiz-question {
        padding: 2rem 1.5rem;
    }
    
    .question-header {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
        padding: 1.25rem 1.5rem;
    }
    
    .question-controls {
        align-self: center;
        gap: 0.75rem;
    }
    
    .question-timer {
        align-self: center;
    }
    
    .stop-quiz-btn {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .quiz-question h3 {
        font-size: 1.4rem;
        padding: 1.5rem 1.25rem;
    }
    
    .quiz-option {
        padding: 1.25rem 1.5rem;
        font-size: 1.1rem;
        min-height: 55px;
    }
    
    .game-modal {
        padding: 1rem 0.5rem;
    }
    
    .game-modal-content {
        width: 98%;
        margin: 0 auto;
        max-height: none;
    }
    
    .game-header {
        padding: 1.25rem 1.5rem;
    }
    
    .game-header h3 {
        font-size: 1.4rem;
    }
    
    .game-progress {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
    
    .game-body {
        max-height: none;
    }
    
    .math-game {
        padding: 2rem 1.5rem;
    }
    
    .math-problem {
        font-size: 1.6rem;
        padding: 1.5rem 1.25rem;
    }
    
    .math-answer {
        font-size: 1.3rem;
        padding: 1.25rem 1.5rem;
        max-width: 250px;
    }
    
    .math-submit {
        font-size: 1.1rem;
        padding: 0.875rem 1.5rem;
        min-width: 130px;
    }
}

@media (max-width: 480px) {
    .quiz-question {
        padding: 1.5rem 1rem;
    }
    
    .question-header {
        padding: 1rem 1.25rem;
        margin-bottom: 2rem;
    }
    
    .question-timer {
        padding: 0.75rem 1.25rem;
        font-size: 1.1rem;
    }
    
    .stop-quiz-btn {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }
    
    .quiz-question h3 {
        font-size: 1.3rem;
        padding: 1.25rem 1rem;
        margin-bottom: 2rem;
    }
    
    .quiz-option {
        padding: 1rem 1.25rem;
        font-size: 1rem;
        min-height: 50px;
    }
    
    .game-modal {
        padding: 0.5rem 0.25rem;
    }
    
    .game-modal-content {
        width: 100%;
        margin: 0 auto;
        max-height: none;
    }
    
    .math-game {
        padding: 1.5rem 1rem;
    }
    
    .math-problem {
        font-size: 1.4rem;
        padding: 1.25rem 1rem;
    }
    
    .math-answer {
        font-size: 1.2rem;
        padding: 1rem 1.25rem;
        max-width: 200px;
    }
    
    .math-submit {
        font-size: 1rem;
        padding: 0.75rem 1.25rem;
        min-width: 120px;
    }
}

/* Animation-related styles moved from JavaScript to avoid CSP violations */
.level-up-content {
    text-align: center;
    color: white;
}

.level-up-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.quiz-completion-content {
    text-align: center;
    color: white;
    background: rgba(255,255,255,0.1);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.completion-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.score-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem auto;
}

.score-percentage {
    font-size: 1.5rem;
    font-weight: 700;
}

.completion-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}
