/* Kids Quiz Adventure Game - Complete CSS */
/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing:  border-box;
}

:root {
    --primary: #FF6B6B;
    --secondary: #4ECDC4;
    --accent: #FFD166;
    --success: #06D6A0;
    --danger: #EF476F;
    --warning: #FF9E1B;
    --info: #118AB2;
    --dark: #26547C;
    --light: #F8F9FA;
    --text: #2D3047;
    --text-light: #6C757D;
    --white: #FFFFFF;
    --border: #E9ECEF;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.15);
    --radius: 20px;
    --radius-sm: 10px;
    --radius-lg: 30px;
    --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-fast: all 0.2s ease;
    --transition-slow: all 0.5s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Floating Background Animations */
.floating-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 8s ease-in-out infinite;
    filter: blur(1px);
}

.shape-1 {
    width: 120px;
    height: 120px;
    background: var(--primary);
    top: 15%;
    left: 8%;
    animation-delay: 0s;
    animation-duration: 9s;
}

.shape-2 {
    width: 180px;
    height: 180px;
    background: var(--secondary);
    top: 65%;
    right: 7%;
    animation-delay: 1.5s;
    animation-duration: 11s;
}

.shape-3 {
    width: 90px;
    height: 90px;
    background: var(--accent);
    bottom: 25%;
    left: 18%;
    animation-delay: 3s;
    animation-duration: 8s;
}

.shape-4 {
    width: 140px;
    height: 140px;
    background: var(--success);
    top: 35%;
    right: 22%;
    animation-delay: 2s;
    animation-duration: 10s;
}

.shape-5 {
    width: 100px;
    height: 100px;
    background: var(--danger);
    bottom: 12%;
    right: 32%;
    animation-delay: 4s;
    animation-duration: 12s;
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg) scale(1); 
    }
    33% { 
        transform: translateY(-30px) rotate(120deg) scale(1.1); 
    }
    66% { 
        transform: translateY(15px) rotate(240deg) scale(0.9); 
    }
}

/* Main Game Container */
.quiz-wrapper {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--text);
}
.quiz-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 107, 107, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(78, 205, 196, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 209, 102, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Header Section */
.quiz-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--danger) 50%, var(--warning) 100%);
    color: var(--white);
    padding: 35px 40px;
    position: relative;
    overflow: hidden;
}

.quiz-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="3" fill="white" opacity="0.3"/><circle cx="50" cy="80" r="2" fill="white" opacity="0.2"/><circle cx="80" cy="40" r="4" fill="white" opacity="0.4"/><circle cx="90" cy="90" r="2" fill="white" opacity="0.3"/><circle cx="10" cy="60" r="3" fill="white" opacity="0.2"/></svg>');
    background-size: 200px 200px;
    animation: backgroundMove 20s linear infinite;
}

@keyframes {
    0% { background-position: 0 0; }
    100% { background-position: 200px 200px; }
}

.header-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.quiz-title {
    font-family: 'Comic Sans MS', 'Chalkboard SE', cursive;
    font-size: 3.2rem;
    font-weight: 800;
    margin-bottom: 25px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #FFFFFF 0%, #FFD166 50%, #FFFFFF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
}

.quiz-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    border-radius: 2px;
}

.quiz-title i {
    margin: 0 20px;
    font-size: 2.8rem;
    background: linear-gradient(135deg, var(--accent), var(--warning));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) scale(1); }
    40% { transform: translateY(-10px) scale(1.1); }
    60% { transform: translateY(-5px) scale(1.05); }
}

.quiz-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 30px;
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.info-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.info-item i {
    font-size: 1.8rem;
    color: var(--accent);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.info-item span {
    font-size: 1.1rem;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Progress Section */
.progress-section {
    padding: 25px 40px;
    background: var(--light);
    border-bottom: 3px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

.progress-container {
    width: 100%;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-weight: 700;
    color: var(--text);
}

.progress-labels span:first-child {
    font-size: 1.1rem;
    color: var(--dark);
}

#progress-percent {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary);
    background: var(--white);
    padding: 5px 15px;
    border-radius: 50px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.progress-bar-container {
    width: 100%;
    height: 16px;
    background: var(--border);
    border-radius: 50px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, 
        var(--secondary) 0%, 
        var(--success) 25%, 
        var(--info) 50%, 
        var(--primary) 75%, 
        var(--warning) 100%);
    border-radius: 50px;
    transition: var(--transition-slow);
    position: relative;
    overflow: hidden;
}

.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.6) 50%, 
        transparent 100%);
    animation: shimmer 2s infinite;
    transform: translateX(-100%);
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Main Content Area */
.quiz-main {
    padding: 40px;
    min-height: 600px;
    position: relative;
}

.screen {
    display: none;
    animation: slideIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.screen.active {
    display: block;
}

@keyframes slideIn {
    from { 
        opacity: 0; 
        transform: translateY(30px) scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

/* Question Card */
.question-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow);
    border: 2px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.question-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, 
        var(--primary), 
        var(--secondary), 
        var(--success), 
        var(--warning), 
        var(--danger));
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.category-badge {
    background: linear-gradient(135deg, var(--secondary), var(--dark));
    color: var(--white);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.difficulty-stars {
    display: flex;
    gap: 5px;
}

.difficulty-stars i {
    color: var(--accent);
    font-size: 1.3rem;
    text-shadow: 0 2px 4px rgba(255, 209, 102, 0.5);
    animation: twinkle 3s infinite;
}

.difficulty-stars i:nth-child(2) {
    animation-delay: 0.5s;
}

.difficulty-stars i:nth-child(3) {
    animation-delay: 1s;
}

@keyframes twinkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.9); }
}

.question-content {
    text-align: center;
    margin-bottom: 40px;
}

#question-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 30px;
    line-height: 1.4;
    background: linear-gradient(135deg, var(--text), var(--dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding: 0 20px;
}

.question-media {
    margin: 30px 0;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.question-emoji {
    font-size: 5rem;
    margin: 25px 0;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
    animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
    0% { 
        opacity: 0; 
        transform: scale(0.3) rotate(-180deg); 
    }
    50% { 
        opacity: 1; 
        transform: scale(1.1) rotate(10deg); 
    }
    100% { 
        opacity: 1; 
        transform: scale(1) rotate(0deg); 
    }
}

/* Options Container */
.options-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 35px;
}

.option-btn {
    background: var(--light);
    border: 3px solid var(--border);
    border-radius: var(--radius);
    padding: 25px 20px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.option-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.8), 
        transparent);
    transition: left 0.6s;
}

.option-btn:hover::before {
    left: 100%;
}

.option-btn:hover {
    background: var(--white);
    border-color: var(--secondary);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.option-btn:active {
    transform: translateY(-2px) scale(1.01);
}

.option-btn.correct {
    background: linear-gradient(135deg, var(--success), #4CD964);
    border-color: var(--success);
    color: var(--white);
    animation: correctPulse 0.6s ease;
    box-shadow: 0 8px 25px rgba(6, 214, 160, 0.4);
}

@keyframes correctPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

.option-btn.wrong {
    background: linear-gradient(135deg, var(--danger), #FF6B6B);
    border-color: var(--danger);
    color: var(--white);
    animation: wrongShake 0.5s ease;
    box-shadow: 0 8px 25px rgba(239, 71, 111, 0.4);
}

@keyframes wrongShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

/* Question Footer */
.question-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding-top: 25px;
    border-top: 2px dashed var(--border);
}

.hint-container {
    flex: 1;
    min-width: 250px;
}

.hint-btn {
    background: linear-gradient(135deg, var(--accent), var(--warning));
    border: none;
    border-radius: 50px;
    padding: 15px 25px;
    color: var(--text);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 6px 20px rgba(255, 209, 102, 0.4);
    position: relative;
    overflow: hidden;
}

.hint-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.6), 
        transparent);
    transition: left 0.5s;
}

.hint-btn:hover::before {
    left: 100%;
}

.hint-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 209, 102, 0.6);
}

.hint-btn:active {
    transform: translateY(-1px);
}

.hint-btn i {
    font-size: 1.3rem;
}

.hint-text {
    margin-top: 15px;
    padding: 20px;
    background: #FFF9C4;
    border-radius: var(--radius);
    border-left: 5px solid var(--accent);
    font-style: italic;
    color: var(--text);
    line-height: 1.5;
    box-shadow: 0 4px 15px rgba(255, 249, 196, 0.5);
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from { 
        opacity: 0; 
        transform: translateY(-10px); 
        max-height: 0;
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
        max-height: 200px;
    }
}

.lives-container {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.8);
    padding: 12px 20px;
    border-radius: 50px;
    border: 2px solid rgba(239, 71, 111, 0.2);
}

.lives-label {
    font-weight: 700;
    color: var(--danger);
    font-size: 1.1rem;
}

.lives {
    display: flex;
    gap: 8px;
}

.life {
    color: var(--danger);
    font-size: 1.5rem;
    transition: var(--transition);
    text-shadow: 0 2px 4px rgba(239, 71, 111, 0.3);
    animation: heartbeat 2s infinite;
}

.life.lost {
    color: #E0E0E0;
    transform: scale(0.8);
    animation: none;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Feedback Screen */
.feedback-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 50px 40px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 2px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.feedback-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, 
        var(--primary), 
        var(--secondary), 
        var(--success), 
        var(--warning), 
        var(--danger));
}

.feedback-icon {
    font-size: 5rem;
    margin-bottom: 25px;
    animation: iconPop 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes iconPop {
    0% { 
        opacity: 0; 
        transform: scale(0) rotate(-180deg); 
    }
    70% { 
        opacity: 1; 
        transform: scale(1.2) rotate(10deg); 
    }
    100% { 
        opacity: 1; 
        transform: scale(1) rotate(0deg); 
    }
}

.feedback-icon.correct {
    color: var(--success);
    filter: drop-shadow(0 5px 15px rgba(6, 214, 160, 0.4));
}

.feedback-icon.wrong {
    color: var(--danger);
    filter: drop-shadow(0 5px 15px rgba(239, 71, 111, 0.4));
}

#feedback-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--text);
    font-weight: 800;
    background: linear-gradient(135deg, var(--text), var(--dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#feedback-message {
    font-size: 1.3rem;
    color: var(--text-light);
    margin-bottom: 40px;
    line-height: 1.6;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Results Screen */
.results-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 50px 40px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 2px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.results-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, 
        var(--primary), 
        var(--secondary), 
        var(--success), 
        var(--warning), 
        var(--danger));
}

.results-header {
    margin-bottom: 40px;
}

.trophy-container {
    margin-bottom: 25px;
}

.trophy-icon {
    font-size: 5rem;
    color: var(--accent);
    animation: trophyBounce 2s infinite;
    filter: drop-shadow(0 5px 15px rgba(255, 209, 102, 0.5));
}

@keyframes trophyBounce {
    0%, 20%, 50%, 80%, 100% { 
        transform: translateY(0) rotate(0deg); 
    }
    40% { 
        transform: translateY(-15px) rotate(10deg); 
    }
    60% { 
        transform: translateY(-7px) rotate(-5deg); 
    }
}

.results-header h2 {
    font-size: 2.8rem;
    color: var(--text);
    margin-bottom: 15px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--danger));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.results-header p {
    font-size: 1.3rem;
    color: var(--text-light);
    font-weight: 600;
}

.results-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin: 40px 0;
}

.stat-item {
    background: var(--light);
    padding: 30px 20px;
    border-radius: var(--radius);
    border: 2px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.stat-value {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.performance-rating {
    margin: 50px 0;
    padding: 30px;
    background: linear-gradient(135deg, #F8F9FA, #E9ECEF);
    border-radius: var(--radius);
    border: 2px solid rgba(0, 0, 0, 0.05);
}

.performance-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stars-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.star {
    font-size: 3rem;
    color: #E0E0E0;
    transition: var(--transition);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.star.filled {
    color: var(--accent);
    animation: starFill 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    filter: drop-shadow(0 3px 8px rgba(255, 209, 102, 0.5));
}

@keyframes starFill {
    0% { 
        opacity: 0; 
        transform: scale(0) rotate(-180deg); 
    }
    70% { 
        opacity: 1; 
        transform: scale(1.3) rotate(10deg); 
    }
    100% { 
        opacity: 1; 
        transform: scale(1) rotate(0deg); 
    }
}

.performance-message {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
    padding: 20px;
    background: var(--white);
    border-radius: var(--radius);
    border-left: 5px solid var(--success);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    animation: messageSlide 0.8s ease;
}

@keyframes messageSlide {
    from { 
        opacity: 0; 
        transform: translateX(-30px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

.results-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 40px 0;
}

.encouragement-message {
    margin-top: 40px;
    padding: 25px;
    background: linear-gradient(135deg, #E3F2FD, #BBDEFB);
    border-radius: var(--radius);
    color: var(--dark);
    font-weight: 700;
    font-size: 1.2rem;
    border: 2px solid rgba(33, 150, 243, 0.2);
    animation: encouragementPulse 3s infinite;
}

@keyframes encouragementPulse {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 5px 20px rgba(187, 222, 251, 0.5);
    }
    50% { 
        transform: scale(1.02); 
        box-shadow: 0 8px 25px rgba(187, 222, 251, 0.7);
    }
}

.encouragement-message i {
    margin-right: 12px;
    color: var(--info);
    font-size: 1.4rem;
}

/* Button Styles */
.btn {
    padding: 18px 35px;
    border: none;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    min-width: 180px;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.4), 
        transparent);
    transition: left 0.6s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--danger));
    color: var(--white);
    border: 2px solid transparent;
}

.btn-primary:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 30px rgba(239, 71, 111, 0.5);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #4CAF50);
    color: var(--white);
    border: 2px solid transparent;
}

.btn-success:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 30px rgba(6, 214, 160, 0.5);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--secondary);
    color: var(--secondary);
}

.btn-outline:hover {
    background: var(--secondary);
    color: var(--white);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 30px rgba(78, 205, 196, 0.4);
}

/* Footer */
.quiz-footer {
    background: var(--light);
    padding: 25px 40px;
    text-align: center;
    border-top: 3px solid rgba(0, 0, 0, 0.05);
}

.footer-content p {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: 600;
}

.footer-content i {
    color: var(--danger);
    margin: 0 5px;
    animation: heartbeat 2s infinite;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--secondary);
    background: transparent;
    color: var(--secondary);
    font-size: 1.4rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.social-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.6), 
        transparent);
    transition: left 0.5s;
}

.social-btn:hover::before {
    left: 100%;
}

.social-btn:hover {
    background: var(--secondary);
    color: var(--white);
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.4);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Confetti Animation */
.confetti {
    position: absolute;
    width: 15px;
    height: 15px;
    opacity: 0.9;
    border-radius: 50%;
    z-index: 1000;
    pointer-events: none;
    animation: confettiFall 5s linear forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY/* Kids Quiz Adventure Game - Complete CSS */
/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #FF6B6B;
    --secondary: #4ECDC4;
    --accent: #FFD166;
    --success: #06D6A0;
    --danger: #EF476F;
    --warning: #FF9E1B;
    --info: #118AB2;
    --dark: #26547C;
    --light: #F8F9FA;
    --text: #2D3047;
    --text-light: #6C757D;
    --white: #FFFFFF;
    --border: #E9ECEF;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.15);
    --radius: 20px;
    --radius-sm: 10px;
    --radius-lg: 30px;
    --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-fast: all 0.2s ease;
    --transition-slow: all 0.5s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Floating Background Animations */
.floating-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 8s ease-in-out infinite;
    filter: blur(1px);
}

.shape-1 {
    width: 120px;
    height: 120px;
    background: var(--primary);
    top: 15%;
    left: 8%;
    animation-delay: 0s;
    animation-duration: 9s;
}

.shape-2 {
    width: 180px;
    height: 180px;
    background: var(--secondary);
    top: 65%;
    right: 7%;
    animation-delay: 1.5s;
    animation-duration: 11s;
}

.shape-3 {
    width: 90px;
    height: 90px;
    background: var(--accent);
    bottom: 25%;
    left: 18%;
    animation-delay: 3s;
    animation-duration: 8s;
}

.shape-4 {
    width: 140px;
    height: 140px;
    background: var(--success);
    top: 35%;
    right: 22%;
    animation-delay: 2s;
    animation-duration: 10s;
}

.shape-5 {
    width: 100px;
    height: 100px;
    background: var(--danger);
    bottom: 12%;
    right: 32%;
    animation-delay: 4s;
    animation-duration: 12s;
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg) scale(1); 
    }
    33% { 
        transform: translateY(-30px) rotate(120deg) scale(1.1); 
    }
    66% { 
        transform: translateY(15px) rotate(240deg) scale(0.9); 
    }
}

/* Main Game Container */
.quiz-container {
    width: 100%;
    max-width: 900px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(25px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 1;
}

.quiz-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 107, 107, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(78, 205, 196, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 209, 102, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Header Section */
.quiz-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--danger) 50%, var(--warning) 100%);
    color: var(--white);
    padding: 35px 40px;
    position: relative;
    overflow: hidden;
}

.quiz-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="3" fill="white" opacity="0.3"/><circle cx="50" cy="80" r="2" fill="white" opacity="0.2"/><circle cx="80" cy="40" r="4" fill="white" opacity="0.4"/><circle cx="90" cy="90" r="2" fill="white" opacity="0.3"/><circle cx="10" cy="60" r="3" fill="white" opacity="0.2"/></svg>');
    background-size: 200px 200px;
    animation: backgroundMove 20s linear infinite;
}

@keyframes backgroundMove {
    0% { background-position: 0 0; }
    100% { background-position: 200px 200px; }
}

.header-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.quiz-title {
    font-family: 'Comic Sans MS', 'Chalkboard SE', cursive;
    font-size: 3.2rem;
    font-weight: 800;
    margin-bottom: 25px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #FFFFFF 0%, #FFD166 50%, #FFFFFF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
}

.quiz-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    border-radius: 2px;
}

.quiz-title i {
    margin: 0 20px;
    font-size: 2.8rem;
    background: linear-gradient(135deg, var(--accent), var(--warning));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) scale(1); }
    40% { transform: translateY(-10px) scale(1.1); }
    60% { transform: translateY(-5px) scale(1.05); }
}

.quiz-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 30px;
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.info-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.info-item i {
    font-size: 1.8rem;
    color: var(--accent);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.info-item span {
    font-size: 1.1rem;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Progress Section */
.progress-section {
    padding: 25px 40px;
    background: var(--light);
    border-bottom: 3px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

.progress-container {
    width: 100%;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-weight: 700;
    color: var(--text);
}

.progress-labels span:first-child {
    font-size: 1.1rem;
    color: var(--dark);
}

#progress-percent {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary);
    background: var(--white);
    padding: 5px 15px;
    border-radius: 50px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.progress-bar-container {
    width: 100%;
    height: 16px;
    background: var(--border);
    border-radius: 50px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, 
        var(--secondary) 0%, 
        var(--success) 25%, 
        var(--info) 50%, 
        var(--primary) 75%, 
        var(--warning) 100%);
    border-radius: 50px;
    transition: var(--transition-slow);
    position: relative;
    overflow: hidden;
}

.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.6) 50%, 
        transparent 100%);
    animation: shimmer 2s infinite;
    transform: translateX(-100%);
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Main Content Area */
.quiz-main {
    padding: 40px;
    min-height: 600px;
    position: relative;
}

.screen {
    display: none;
    animation: slideIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.screen.active {
    display: block;
}

@keyframes slideIn {
    from { 
        opacity: 0; 
        transform: translateY(30px) scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

/* Question Card */
.question-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow);
    border: 2px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.question-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, 
        var(--primary), 
        var(--secondary), 
        var(--success), 
        var(--warning), 
        var(--danger));
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.category-badge {
    background: linear-gradient(135deg, var(--secondary), var(--dark));
    color: var(--white);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.difficulty-stars {
    display: flex;
    gap: 5px;
}

.difficulty-stars i {
    color: var(--accent);
    font-size: 1.3rem;
    text-shadow: 0 2px 4px rgba(255, 209, 102, 0.5);
    animation: twinkle 3s infinite;
}

.difficulty-stars i:nth-child(2) {
    animation-delay: 0.5s;
}

.difficulty-stars i:nth-child(3) {
    animation-delay: 1s;
}

@keyframes twinkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.9); }
}

.question-content {
    text-align: center;
    margin-bottom: 40px;
}

#question-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 30px;
    line-height: 1.4;
    background: linear-gradient(135deg, var(--text), var(--dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding: 0 20px;
}

.question-media {
    margin: 30px 0;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.question-emoji {
    font-size: 5rem;
    margin: 25px 0;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
    animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
    0% { 
        opacity: 0; 
        transform: scale(0.3) rotate(-180deg); 
    }
    50% { 
        opacity: 1; 
        transform: scale(1.1) rotate(10deg); 
    }
    100% { 
        opacity: 1; 
        transform: scale(1) rotate(0deg); 
    }
}

/* Options Container */
.options-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 35px;
}

.option-btn {
    background: var(--light);
    border: 3px solid var(--border);
    border-radius: var(--radius);
    padding: 25px 20px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.option-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.8), 
        transparent);
    transition: left 0.6s;
}

.option-btn:hover::before {
    left: 100%;
}

.option-btn:hover {
    background: var(--white);
    border-color: var(--secondary);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.option-btn:active {
    transform: translateY(-2px) scale(1.01);
}

.option-btn.correct {
    background: linear-gradient(135deg, var(--success), #4CD964);
    border-color: var(--success);
    color: var(--white);
    animation: correctPulse 0.6s ease;
    box-shadow: 0 8px 25px rgba(6, 214, 160, 0.4);
}

@keyframes correctPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

.option-btn.wrong {
    background: linear-gradient(135deg, var(--danger), #FF6B6B);
    border-color: var(--danger);
    color: var(--white);
    animation: wrongShake 0.5s ease;
    box-shadow: 0 8px 25px rgba(239, 71, 111, 0.4);
}

@keyframes wrongShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

/* Question Footer */
.question-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding-top: 25px;
    border-top: 2px dashed var(--border);
}

.hint-container {
    flex: 1;
    min-width: 250px;
}

.hint-btn {
    background: linear-gradient(135deg, var(--accent), var(--warning));
    border: none;
    border-radius: 50px;
    padding: 15px 25px;
    color: var(--text);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 6px 20px rgba(255, 209, 102, 0.4);
    position: relative;
    overflow: hidden;
}

.hint-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.6), 
        transparent);
    transition: left 0.5s;
}

.hint-btn:hover::before {
    left: 100%;
}

.hint-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 209, 102, 0.6);
}

.hint-btn:active {
    transform: translateY(-1px);
}

.hint-btn i {
    font-size: 1.3rem;
}

.hint-text {
    margin-top: 15px;
    padding: 20px;
    background: #FFF9C4;
    border-radius: var(--radius);
    border-left: 5px solid var(--accent);
    font-style: italic;
    color: var(--text);
    line-height: 1.5;
    box-shadow: 0 4px 15px rgba(255, 249, 196, 0.5);
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from { 
        opacity: 0; 
        transform: translateY(-10px); 
        max-height: 0;
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
        max-height: 200px;
    }
}

.lives-container {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.8);
    padding: 12px 20px;
    border-radius: 50px;
    border: 2px solid rgba(239, 71, 111, 0.2);
}

.lives-label {
    font-weight: 700;
    color: var(--danger);
    font-size: 1.1rem;
}

.lives {
    display: flex;
    gap: 8px;
}

.life {
    color: var(--danger);
    font-size: 1.5rem;
    transition: var(--transition);
    text-shadow: 0 2px 4px rgba(239, 71, 111, 0.3);
    animation: heartbeat 2s infinite;
}

.life.lost {
    color: #E0E0E0;
    transform: scale(0.8);
    animation: none;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Feedback Screen */
.feedback-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 50px 40px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 2px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.feedback-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, 
        var(--primary), 
        var(--secondary), 
        var(--success), 
        var(--warning), 
        var(--danger));
}

.feedback-icon {
    font-size: 5rem;
    margin-bottom: 25px;
    animation: iconPop 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes iconPop {
    0% { 
        opacity: 0; 
        transform: scale(0) rotate(-180deg); 
    }
    70% { 
        opacity: 1; 
        transform: scale(1.2) rotate(10deg); 
    }
    100% { 
        opacity: 1; 
        transform: scale(1) rotate(0deg); 
    }
}

.feedback-icon.correct {
    color: var(--success);
    filter: drop-shadow(0 5px 15px rgba(6, 214, 160, 0.4));
}

.feedback-icon.wrong {
    color: var(--danger);
    filter: drop-shadow(0 5px 15px rgba(239, 71, 111, 0.4));
}

#feedback-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--text);
    font-weight: 800;
    background: linear-gradient(135deg, var(--text), var(--dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#feedback-message {
    font-size: 1.3rem;
    color: var(--text-light);
    margin-bottom: 40px;
    line-height: 1.6;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Results Screen */
.results-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 50px 40px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 2px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.results-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, 
        var(--primary), 
        var(--secondary), 
        var(--success), 
        var(--warning), 
        var(--danger));
}

.results-header {
    margin-bottom: 40px;
}

.trophy-container {
    margin-bottom: 25px;
}

.trophy-icon {
    font-size: 5rem;
    color: var(--accent);
    animation: trophyBounce 2s infinite;
    filter: drop-shadow(0 5px 15px rgba(255, 209, 102, 0.5));
}

@keyframes trophyBounce {
    0%, 20%, 50%, 80%, 100% { 
        transform: translateY(0) rotate(0deg); 
    }
    40% { 
        transform: translateY(-15px) rotate(10deg); 
    }
    60% { 
        transform: translateY(-7px) rotate(-5deg); 
    }
}

.results-header h2 {
    font-size: 2.8rem;
    color: var(--text);
    margin-bottom: 15px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--danger));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.results-header p {
    font-size: 1.3rem;
    color: var(--text-light);
    font-weight: 600;
}

.results-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin: 40px 0;
}

.stat-item {
    background: var(--light);
    padding: 30px 20px;
    border-radius: var(--radius);
    border: 2px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.stat-value {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.performance-rating {
    margin: 50px 0;
    padding: 30px;
    background: linear-gradient(135deg, #F8F9FA, #E9ECEF);
    border-radius: var(--radius);
    border: 2px solid rgba(0, 0, 0, 0.05);
}

.performance-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stars-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.star {
    font-size: 3rem;
    color: #E0E0E0;
    transition: var(--transition);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.star.filled {
    color: var(--accent);
    animation: starFill 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    filter: drop-shadow(0 3px 8px rgba(255, 209, 102, 0.5));
}

@keyframes starFill {
    0% { 
        opacity: 0; 
        transform: scale(0) rotate(-180deg); 
    }
    70% { 
        opacity: 1; 
        transform: scale(1.3) rotate(10deg); 
    }
    100% { 
        opacity: 1; 
        transform: scale(1) rotate(0deg); 
    }
}

.performance-message {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
    padding: 20px;
    background: var(--white);
    border-radius: var(--radius);
    border-left: 5px solid var(--success);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    animation: messageSlide 0.8s ease;
}

@keyframes messageSlide {
    from { 
        opacity: 0; 
        transform: translateX(-30px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

.results-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 40px 0;
}

.encouragement-message {
    margin-top: 40px;
    padding: 25px;
    background: linear-gradient(135deg, #E3F2FD, #BBDEFB);
    border-radius: var(--radius);
    color: var(--dark);
    font-weight: 700;
    font-size: 1.2rem;
    border: 2px solid rgba(33, 150, 243, 0.2);
    animation: encouragementPulse 3s infinite;
}

@keyframes encouragementPulse {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 5px 20px rgba(187, 222, 251, 0.5);
    }
    50% { 
        transform: scale(1.02); 
        box-shadow: 0 8px 25px rgba(187, 222, 251, 0.7);
    }
}

.encouragement-message i {
    margin-right: 12px;
    color: var(--info);
    font-size: 1.4rem;
}

/* Button Styles */
.btn {
    padding: 18px 35px;
    border: none;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    min-width: 180px;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.4), 
        transparent);
    transition: left 0.6s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--danger));
    color: var(--white);
    border: 2px solid transparent;
}

.btn-primary:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 30px rgba(239, 71, 111, 0.5);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #4CAF50);
    color: var(--white);
    border: 2px solid transparent;
}

.btn-success:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 30px rgba(6, 214, 160, 0.5);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--secondary);
    color: var(--secondary);
}

.btn-outline:hover {
    background: var(--secondary);
    color: var(--white);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 30px rgba(78, 205, 196, 0.4);
}

/* Footer */
.quiz-footer {
    background: var(--light);
    padding: 25px 40px;
    text-align: center;
    border-top: 3px solid rgba(0, 0, 0, 0.05);
}

.footer-content p {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: 600;
}

.footer-content i {
    color: var(--danger);
    margin: 0 5px;
    animation: heartbeat 2s infinite;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--secondary);
    background: transparent;
    color: var(--secondary);
    font-size: 1.4rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.social-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.6), 
        transparent);
    transition: left 0.5s;
}

.social-btn:hover::before {
    left: 100%;
}

.social-btn:hover {
    background: var(--secondary);
    color: var(--white);
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.4);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Confetti Animation */
.confetti {
    position: absolute;
    width: 15px;
    height: 15px;
    opacity: 0.9;
    border-radius: 50%;
    z-index: 1000;
    pointer-events: none;
    animation: confettiFall 5s linear forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(1000px) rotate(720deg);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .quiz-container {
        margin: 10px;
        border-radius: var(--radius);
    }
    
    .quiz-header {
        padding: 25px 20px;
    }
    
    .quiz-title {
        font-size: 2.2rem;
    }
    
    .quiz-info {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .progress-section {
        padding: 20px;
    }
    
    .quiz-main {
        padding: 25px 20px;
    }
    
    .question-card {
        padding: 25px 20px;
    }
    
    #question-text {
        font-size: 1.5rem;
    }
    
    .options-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .option-btn {
        padding: 20px 15px;
        font-size: 1.1rem;
    }
    
    .question-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .hint-container {
        min-width: auto;
    }
    
    .results-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .results-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .stat-value {
        font-size: 2.5rem;
    }
    
    .stars-container {
        gap: 10px;
    }
    
    .star {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .quiz-title {
        font-size: 1.8rem;
    }
    
    .quiz-title i {
        font-size: 2rem;
        margin: 0 10px;
    }
    
    .info-item {
        padding: 12px;
    }
    
    .question-card {
        padding: 20px 15px;
    }
    
    #question-text {
        font-size: 1.3rem;
        padding: 0 10px;
    }
    
    .question-emoji {
        font-size: 4rem;
    }
    
    .option-btn {
        padding: 18px 12px;
        font-size: 1rem;
        min-height: 70px;
    }
    
    .results-card {
        padding: 30px 20px;
    }
    
    .results-header h2 {
        font-size: 2.2rem;
    }
    
    .stat-item {
        padding: 25px 15px;
    }
    
    .performance-rating {
        padding: 20px 15px;
    }
    
    .performance-message {
        font-size: 1.2rem;
        padding: 15px;
    }
    
    .encouragement-message {
        padding: 20px 15px;
        font-size: 1.1rem;
    }
    
    .social-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

/* Print Styles */
@media print {
    .quiz-header,
    .progress-section,
    .quiz-footer,
    .hint-btn,
    .social-links {
        display: none !important;
    }
    
    .quiz-container {
        box-shadow: none;
        border: 2px solid #000;
    }
    
    .question-card,
    .feedback-card,
    .results-card {
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --primary: #FF0000;
        --secondary: #008000;
        --accent: #FFFF00;
        --success: #00FF00;
        --danger: #FF0000;
        --text: #000000;
        --light: #FFFFFF;
        --border: #000000;
    }
    
    .option-btn {
        border-width: 3px;
    }
    
    .btn {
        border-width: 3px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}