/* Cookie Quizzer Game Styles */

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

.cookie-icon {
    font-size: 2.5rem;
}

/* Stats Bar */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.stat-box {
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 15px 10px;
    text-align: center;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #00d4ff;
}

.stat-label {
    font-size: 0.75rem;
    color: #a0a0a0;
    text-transform: uppercase;
}

.stat-box.streak .stat-value {
    color: #f39c12;
}

.stat-box.multiplier .stat-value {
    color: #2ecc71;
}

/* Streak Progress */
.streak-progress {
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.streak-bar {
    height: 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    overflow: hidden;
    margin: 10px 0;
}

.streak-fill {
    height: 100%;
    background: linear-gradient(90deg, #f39c12, #e74c3c);
    border-radius: 6px;
    transition: width 0.3s ease;
}

.streak-milestones {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #a0a0a0;
}

.milestone {
    text-align: center;
}

.milestone.achieved {
    color: #2ecc71;
}

.milestone-icon {
    font-size: 1.2rem;
}

/* Topic Selector */
.topic-selector {
    background: rgba(255,255,255,0.05);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
}

.topic-selector h3 {
    margin-bottom: 15px;
    color: #00d4ff;
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.topic-btn {
    padding: 12px 15px;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
    text-align: center;
}

.topic-btn:hover {
    background: rgba(255,255,255,0.15);
}

.topic-btn.active {
    background: rgba(0,212,255,0.2);
    border-color: #00d4ff;
}

.topic-btn.all-topics {
    grid-column: 1 / -1;
    background: linear-gradient(90deg, rgba(0,212,255,0.2), rgba(123,44,191,0.2));
}

/* Question Card */
.question-card {
    background: rgba(255,255,255,0.05);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.1);
}

.question-topic {
    display: inline-block;
    padding: 5px 12px;
    background: rgba(0,212,255,0.2);
    border-radius: 20px;
    font-size: 0.8rem;
    color: #00d4ff;
    margin-bottom: 15px;
}

.question-text {
    font-size: 1.3rem;
    line-height: 1.5;
    margin-bottom: 25px;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option {
    padding: 18px 20px;
    background: rgba(255,255,255,0.08);
    border: 2px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

.option:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.3);
}

.option.selected {
    background: rgba(0,212,255,0.2);
    border-color: #00d4ff;
}

.option.correct {
    background: rgba(46, 204, 113, 0.3);
    border-color: #2ecc71;
}

.option.incorrect {
    background: rgba(231, 76, 60, 0.3);
    border-color: #e74c3c;
}

.option.disabled {
    pointer-events: none;
}

/* Feedback */
.feedback {
    text-align: center;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    display: none;
}

.feedback.show {
    display: block;
}

.feedback.correct {
    background: rgba(46, 204, 113, 0.2);
    border: 1px solid #2ecc71;
}

.feedback.incorrect {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid #e74c3c;
}

.feedback-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.feedback-text {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.feedback-points {
    font-size: 1.5rem;
    font-weight: bold;
    color: #f39c12;
}

.feedback-streak {
    color: #2ecc71;
    margin-top: 5px;
}

/* Bonus Animation */
.bonus-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: linear-gradient(135deg, #f39c12, #e74c3c);
    padding: 30px 50px;
    border-radius: 20px;
    text-align: center;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
}

.bonus-popup.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.bonus-popup h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.bonus-popup p {
    font-size: 1.2rem;
}

/* Controls */
.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-reset {
    background: rgba(231, 76, 60, 0.3);
    color: #fff;
    border: 1px solid #e74c3c;
}

/* Start Screen */
.start-screen {
    text-align: center;
    padding: 40px 20px;
}

.start-screen h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #00d4ff;
}

.start-screen p {
    color: #ccc;
    margin-bottom: 15px;
    line-height: 1.6;
}

.rules-box {
    background: rgba(255,255,255,0.05);
    border-radius: 15px;
    padding: 25px;
    margin: 25px 0;
    text-align: left;
}

.rules-box h3 {
    color: #f39c12;
    margin-bottom: 15px;
}

.rules-box ul {
    list-style: none;
}

.rules-box li {
    padding: 8px 0;
    padding-left: 30px;
    position: relative;
    color: #ccc;
}

.rules-box li::before {
    content: attr(data-icon);
    position: absolute;
    left: 0;
}

.high-score-display {
    background: linear-gradient(90deg, rgba(243, 156, 18, 0.2), rgba(231, 76, 60, 0.2));
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
}

.high-score-display h3 {
    color: #f39c12;
}

.high-score-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #fff;
}

/* Cookie animation */
.cookie-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
    overflow: hidden;
}

.falling-cookie {
    position: absolute;
    font-size: 2rem;
    animation: fall 2s linear forwards;
}

@keyframes fall {
    0% {
        transform: translateY(-50px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 600px) {
    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-value {
        font-size: 1.4rem;
    }

    .question-text {
        font-size: 1.1rem;
    }

    .header h1 {
        font-size: 1.6rem;
    }
}
