/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    min-height: 100vh;
    color: #f8fafc;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}

#app {
    width: 100vw;
    height: 100vh;
    position: relative;
}

/* Screens */
.screen {
    display: none;
    position: absolute;
    inset: 0;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    animation: fadeIn 0.4s ease;
}

.screen.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-15px); }
    40% { transform: translateX(15px); }
    60% { transform: translateX(-10px); }
    80% { transform: translateX(10px); }
}

@keyframes confetti {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(-200px) rotate(720deg); opacity: 0; }
}

/* Cards */
.card {
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 1.5rem;
    padding: 2.5rem;
    text-align: center;
    max-width: 800px;
    width: 100%;
    backdrop-filter: blur(10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

.lang-card {
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 1.5rem;
    padding: 3rem;
    text-align: center;
    max-width: 600px;
    width: 100%;
    backdrop-filter: blur(10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

/* Typography */
h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.3rem;
    color: #94a3b8;
    margin-bottom: 2rem;
}

/* Buttons */
.btn {
    border: none;
    border-radius: 1rem;
    padding: 1.2rem 3rem;
    font-size: 1.4rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn:active {
    transform: scale(0.95);
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: white;
    font-size: 1.5rem;
    padding: 1.3rem 4rem;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 6px 30px rgba(59, 130, 246, 0.6);
    transform: translateY(-2px);
}

/* Language Buttons */
.lang-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 2rem;
}

.btn-lang {
    background: rgba(51, 65, 85, 0.8);
    color: #f8fafc;
    padding: 1.5rem 2.5rem;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border: 2px solid rgba(148, 163, 184, 0.3);
}

.btn-lang:hover {
    background: rgba(71, 85, 105, 0.8);
    border-color: #60a5fa;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.flag {
    font-size: 2rem;
}

/* Answer Buttons */
.answer-buttons {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-top: 2rem;
}

.btn-fact {
    background: linear-gradient(135deg, #059669, #10b981);
    color: white;
    padding: 1.5rem 4rem;
    font-size: 1.8rem;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
    min-width: 200px;
}

.btn-fact:hover {
    box-shadow: 0 6px 30px rgba(16, 185, 129, 0.5);
    transform: translateY(-3px);
}

.btn-fake {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: white;
    padding: 1.5rem 4rem;
    font-size: 1.8rem;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.3);
    min-width: 200px;
}

.btn-fake:hover {
    box-shadow: 0 6px 30px rgba(239, 68, 68, 0.5);
    transform: translateY(-3px);
}

/* Progress Bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: rgba(51, 65, 85, 0.5);
    z-index: 100;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #a78bfa);
    transition: width 0.5s ease;
    border-radius: 0 3px 3px 0;
}

.question-counter {
    position: fixed;
    top: 1rem;
    right: 2rem;
    font-size: 1.2rem;
    color: #64748b;
    font-weight: 600;
    z-index: 100;
}

/* Question */
.question-card {
    max-width: 900px;
}

.question-text {
    font-size: 1.9rem;
    font-weight: 600;
    line-height: 1.4;
    color: #e2e8f0;
    margin-bottom: 1rem;
}

.question-image {
    max-height: 250px;
    max-width: 100%;
    border-radius: 1rem;
    margin: 1rem auto;
    display: block;
    object-fit: contain;
}

/* Feedback */
.feedback-card {
    max-width: 850px;
}

.feedback-icon {
    font-size: 5rem;
    margin-bottom: 0.5rem;
    animation: popIn 0.5s ease;
}

.feedback-explanation {
    font-size: 1.3rem;
    color: #cbd5e1;
    line-height: 1.6;
    margin: 1rem 0;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

.feedback-explanation strong {
    color: #f1f5f9;
    font-weight: 700;
}

.feedback-explanation .source {
    display: block;
    margin-top: 0.9rem;
    font-size: 0.95rem;
    color: #64748b;
    font-style: italic;
}

.feedback-gif {
    max-height: 200px;
    max-width: 90%;
    border-radius: 1rem;
    margin: 1rem auto;
    display: block;
    object-fit: contain;
}

.stat-box {
    background: rgba(51, 65, 85, 0.6);
    border-radius: 0.8rem;
    padding: 0.8rem 1.5rem;
    margin: 1rem auto;
    display: inline-block;
    font-size: 1rem;
    color: #94a3b8;
}

/* Results */
.result-card {
    max-width: 700px;
}

.badge-container {
    margin-bottom: 1.5rem;
}

.badge {
    display: inline-block;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4.5rem;
    margin: 0 auto;
    animation: popIn 0.6s ease;
    border: 4px solid;
}

.badge-bronze {
    background: linear-gradient(135deg, #92400e, #b45309);
    border-color: #d97706;
    box-shadow: 0 0 40px rgba(217, 119, 6, 0.4);
}

.badge-silver {
    background: linear-gradient(135deg, #475569, #64748b);
    border-color: #94a3b8;
    box-shadow: 0 0 40px rgba(148, 163, 184, 0.4);
}

.badge-gold {
    background: linear-gradient(135deg, #a16207, #ca8a04);
    border-color: #eab308;
    box-shadow: 0 0 40px rgba(234, 179, 8, 0.4);
}

.badge-diamond {
    background: linear-gradient(135deg, #1d4ed8, #6366f1);
    border-color: #818cf8;
    box-shadow: 0 0 40px rgba(129, 140, 248, 0.5);
}

.result-score {
    font-size: 2.2rem;
    font-weight: 800;
    color: #60a5fa;
    margin: 0.5rem 0;
}

.result-message {
    font-size: 1.3rem;
    color: #94a3b8;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.today-stats {
    background: rgba(51, 65, 85, 0.6);
    border-radius: 1rem;
    padding: 1.2rem 2rem;
    margin: 1.5rem 0;
    font-size: 1.1rem;
    color: #94a3b8;
}

.today-stats strong {
    color: #60a5fa;
}

/* Welcome GIF */
.welcome-gif {
    max-height: 220px;
    max-width: 80%;
    border-radius: 1rem;
    margin: 1.5rem auto;
    display: block;
    object-fit: contain;
}

/* Correct/Wrong animation on card */
.correct-flash {
    animation: shake 0.4s ease;
    border-color: #10b981 !important;
    box-shadow: 0 0 40px rgba(16, 185, 129, 0.3) !important;
}

.wrong-flash {
    animation: shake 0.4s ease;
    border-color: #ef4444 !important;
    box-shadow: 0 0 40px rgba(239, 68, 68, 0.3) !important;
}

/* Responsive */
@media (max-height: 700px) {
    h1 { font-size: 2.2rem; }
    .question-text { font-size: 1.6rem; }
    .card { padding: 1.8rem; }
    .btn-fact, .btn-fake { padding: 1.2rem 3rem; font-size: 1.5rem; }
    .question-image { max-height: 180px; }
    .feedback-gif { max-height: 150px; }
    .welcome-gif { max-height: 160px; }
    .badge { width: 130px; height: 130px; font-size: 3.5rem; }
}

@media (max-width: 600px) {
    .answer-buttons { flex-direction: column; gap: 1rem; }
    .btn-fact, .btn-fake { min-width: unset; }
    .lang-buttons { flex-direction: column; }
    h1 { font-size: 2rem; }
    .question-text { font-size: 1.4rem; }
}
