/* assets/css/student.css */

/* --- ЭКРАН ВХОДА (LOGIN) --- */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.1), transparent 70%);
}

.login-card {
    width: 100%;
    max-width: 380px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: 30px 25px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    text-align: center;
    border: 1px solid rgba(255,255,255,0.5);
}

.login-icon {
    font-size: 3rem;
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #eef2ff 0%, #ffffff 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.15);
    animation: float 3s ease-in-out infinite;
    border: 1px solid #e0e7ff;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0px); }
}

.pin-input {
    font-size: 1.5rem !important;
    text-align: center;
    letter-spacing: 4px;
    font-weight: 800;
    color: var(--primary-color);
    border: 2px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 15px;
    padding: 12px;
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
    display: block;
    transition: all 0.3s ease;
}

.pin-input:focus {
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    outline: none;
}

/* --- ШАПКА (HEADER) --- */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    margin: 15px auto;
    max-width: 1000px;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid rgba(255,255,255,0.5);
}

.user-profile-compact {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar-circle {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color), #818cf8);
    border-radius: 50%;
    color: white;
    font-weight: 800;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
    border: 2px solid white;
}

.pulse-animation {
    animation: avatarPulse 2s infinite;
}

@keyframes avatarPulse {
    0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(99, 102, 241, 0); }
    100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

.user-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.user-name {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--text-main);
    line-height: 1.2;
}

.user-class-badge {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
}

.gamification-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.star-counter {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fffbeb;
    padding: 6px 14px;
    border-radius: 20px;
    border: 2px solid #fcd34d;
    color: #b45309;
    font-weight: 800;
    box-shadow: 0 4px 0 #fcd34d;
    transform: translateY(-2px);
    cursor: default;
}

.star-icon svg { fill: #f59e0b; width: 18px; height: 18px; }

.btn-icon-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    color: var(--text-muted);
    border: 2px solid transparent;
}

.btn-icon-circle:hover {
    background: white;
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: scale(1.05);
}

.btn-icon-circle.logout:hover {
    border-color: var(--error-color);
    color: var(--error-color);
}

/* --- ОБЩИЙ КОНТЕЙНЕР --- */
.app-content-wide {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 15px 40px;
}

.view-section {
    display: none;
    flex-direction: column;
    flex-grow: 1;
    animation: fadeIn 0.4s ease;
}

.view-section.active { display: flex; }

@keyframes fadeIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }

/* --- МЕНЮ РЕЖИМОВ --- */
.hero-welcome {
    text-align: center;
    margin: 20px 0 30px;
}
.hero-welcome h1 {
    font-size: 2.2rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--text-main), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-welcome p { color: var(--text-muted); font-weight: 500; }

.game-modes-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.game-card {
    background: white;
    border-radius: 25px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.game-card:hover { transform: translateY(-8px) scale(1.02); box-shadow: 0 20px 40px rgba(0,0,0,0.1); }

.card-bg-decoration {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0.1; z-index: 0; background-size: cover;
}
/* Стандартные фоны */
.mode-free .card-bg-decoration { background: linear-gradient(135deg, #10b981, #34d399); }
.mode-time .card-bg-decoration { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
.mode-survival .card-bg-decoration { background: linear-gradient(135deg, #ef4444, #f87171); }

.card-content { position: relative; z-index: 1; padding: 20px; display: flex; flex-direction: column; align-items: center; }

.card-icon-wrapper {
    width: 70px; height: 70px; border-radius: 20px; display: flex; align-items: center; justify-content: center;
    margin-bottom: 15px; font-size: 32px; background: white; box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
.mode-free .card-icon-wrapper { color: #10b981; }
.mode-time .card-icon-wrapper { color: #3b82f6; }
.mode-survival .card-icon-wrapper { color: #ef4444; }

.game-card h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 5px; color: var(--text-main); }
.game-card p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 15px; }
.card-badge { padding: 5px 12px; border-radius: 15px; font-size: 0.75rem; font-weight: 700; background: #f3f4f6; color: var(--text-muted); }
.time-badge { background: #dbeafe; color: #1d4ed8; }
.danger-badge { background: #fee2e2; color: #b91c1c; }

/* --- ИГРОВОЙ ЭКРАН --- */
.game-top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.btn-pill { background: white; padding: 8px 20px; border-radius: 30px; font-weight: 600; display: flex; align-items: center; gap: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); cursor: pointer; transition: 0.2s; }
.btn-pill:hover { transform: scale(1.05); }

.game-status { display: flex; gap: 10px; align-items: center; }
.status-item { background: white; padding: 8px 15px; border-radius: 30px; font-weight: 700; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.timer-pill { color: var(--primary-color); font-family: monospace; font-size: 1.1rem; }
.lives-pill { color: var(--error-color); letter-spacing: 2px; }

/* СЧЕТЧИКИ ВНУТРИ ИГРЫ */
.game-counters {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 15px;
}
.counter-box {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 800;
}
.counter-box.correct { color: var(--success-color); }
.counter-box.wrong { color: var(--error-color); }

.game-board {
    background: rgba(255,255,255,0.85); border-radius: 30px; padding: 30px; text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05); margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}
.progress-line-container { height: 8px; background: #e5e7eb; border-radius: 4px; margin-bottom: 20px; overflow: hidden; }
.progress-line-fill { height: 100%; background: linear-gradient(90deg, var(--primary-color), var(--secondary-color)); width: 0%; transition: width 0.3s; }

.problem-area {
    display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 20px;
    font-weight: 800; font-size: 2.2rem; flex-wrap: wrap; min-height: 80px;
}
.digit-box { text-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.operator-box { color: var(--text-muted); font-weight: 400; font-size: 0.9em; }

.answer-placeholder {
    min-width: 100px; height: 80px; border-radius: 15px; border: 3px dashed #d1d5db;
    display: flex; align-items: center; justify-content: center; color: var(--primary-color); transition: 0.2s;
}
.answer-placeholder:not(.empty) { border-style: solid; border-color: var(--primary-color); background: #eef2ff; }
.answer-placeholder.success { border-color: var(--success-color); color: var(--success-color); background: #ecfdf5; transform: scale(1.1); }
.answer-placeholder.error { border-color: var(--error-color); color: var(--error-color); background: #fef2f2; animation: shake 0.4s; }
.feedback-text { height: 20px; font-size: 0.9rem; color: var(--text-muted); }

/* --- КЛАВИАТУРА MODERN (БОЛЬШАЯ И ШИРОКАЯ) --- */
.virtual-keyboard-modern { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 12px; 
    width: 100%; 
    max-width: 600px; 
    margin: 0 auto; 
    padding-bottom: 20px;
}

.v-key {
    background: white; 
    border: none; 
    border-radius: 20px; 
    height: 80px; 
    font-size: 2rem; 
    font-weight: 800;
    color: var(--text-main); 
    box-shadow: 0 5px 0 #e5e7eb; 
    cursor: pointer; 
    transition: 0.1s;
    width: 100%; 
}

.v-key:active { transform: translateY(4px); box-shadow: none; }
.action-del { background: #fee2e2; color: #b91c1c; box-shadow: 0 5px 0 #fecaca; }
.action-go { 
    background: #d1fae5; 
    color: #059669; 
    box-shadow: 0 5px 0 #a7f3d0; 
    font-size: 1.4rem; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
}

/* ========================================= */
/* --- СТИЛИ ДЛЯ НОВЫХ РЕЖИМОВ ИГРЫ --- */
/* ========================================= */

/* 1. Битва с Роботом (Bot Battle) - FIXED SIZE */
.hp-bars-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    width: 100%; /* На всю ширину */
    padding: 10px 0;
}
.hp-side { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    gap: 6px; 
    min-width: 0; /* Чтобы flex не распирало */
}
.hp-label { font-size: 0.8rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; }
.hp-track {
    width: 100%; 
    height: 24px; /* Увеличено с 16px */
    background: #e2e8f0; 
    border-radius: 12px; 
    overflow: hidden; 
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.05);
}
.hp-fill { height: 100%; width: 100%; transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.hp-fill.player { background: linear-gradient(90deg, #10b981, #34d399); box-shadow: 0 0 10px rgba(16, 185, 129, 0.4); }
.hp-fill.bot { background: linear-gradient(90deg, #ef4444, #f87171); box-shadow: 0 0 10px rgba(239, 68, 68, 0.4); }

.bot-avatar-center {
    font-size: 3rem; /* Чуть крупнее */
    animation: bounceBot 2s infinite;
    text-shadow: 0 5px 15px rgba(0,0,0,0.15);
    min-width: 50px; text-align: center;
}
@keyframes bounceBot { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* 2. True / False (Верю - Не верю) */
.tf-btn {
    flex: 1;
    border: none;
    border-radius: 20px;
    padding: 25px 10px;
    font-size: 1.4rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: white;
    display: flex; align-items: center; justify-content: center; gap: 10px;
}
.btn-true {
    background: #10b981;
    box-shadow: 0 6px 0 #059669;
}
.btn-true:active { transform: translateY(6px); box-shadow: none; }

.btn-false {
    background: #ef4444;
    box-shadow: 0 6px 0 #b91c1c;
}
.btn-false:active { transform: translateY(6px); box-shadow: none; }

/* 3. Memory (Найди пару) */
.memory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    max-width: 500px;
    margin: 0 auto;
}
.memory-card {
    aspect-ratio: 1;
    background-color: transparent;
    perspective: 1000px;
    cursor: pointer;
}
.memory-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.memory-card.flipped .memory-card-inner {
    transform: rotateY(180deg);
}
.memory-card.matched .memory-card-inner {
    opacity: 0; 
    pointer-events: none;
}
.memory-front, .memory-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
}
.memory-front {
    background-color: #f8fafc;
    color: var(--primary-color);
    background-image: radial-gradient(#e0e7ff 15%, transparent 16%); 
    background-size: 10px 10px;
    color: transparent; 
}
.memory-back {
    background-color: white;
    color: var(--text-main);
    transform: rotateY(180deg);
    border-color: var(--primary-color);
    font-size: 1.4rem;
}

/* 4. Math Rain (Дождь) - NEW STYLES WITH ANIMATION */
.rain-drop {
    position: absolute;
    background: white;
    padding: 8px 15px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 1.4rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    color: var(--text-main);
    border: 2px solid #cbd5e1;
    white-space: nowrap;
    z-index: 10;
    transition: transform 0.1s;
}

.rain-ground-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: #ef4444;
    box-shadow: 0 0 20px #ef4444;
    z-index: 5;
}

.rain-input-display {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 10px 40px;
    border-radius: 20px;
    font-size: 2.5rem;
    font-weight: 900;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.6);
    min-width: 120px;
    text-align: center;
    z-index: 20;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    letter-spacing: 2px;
}

/* НОВЫЕ: Лазерный выстрел */
.rain-projectile {
    position: absolute;
    width: 6px;
    height: 20px;
    background: #fbbf24;
    box-shadow: 0 0 15px #f59e0b, 0 0 5px white;
    border-radius: 4px;
    z-index: 15;
    pointer-events: none;
    transition: top 0.3s linear, left 0.3s linear; 
    /* Переходы управляются JS через requestAnimationFrame или transition,
       но для JS-анимации transition здесь может мешать, если мы меняем координаты в цикле.
       Однако мы будем использовать CSS transition для полета. */
}

/* НОВЫЕ: Анимация взрыва */
.rain-explosion {
    animation: rainExplode 0.4s ease-out forwards;
    background: #ef4444 !important; /* Краснеет */
    color: white !important;
    border-color: #ef4444 !important;
    box-shadow: 0 0 30px #ef4444 !important;
}

@keyframes rainExplode {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.8; }
    100% { transform: scale(2); opacity: 0; }
}

/* 5. Builder (Конструктор) */
.builder-target {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--primary-color);
    text-shadow: 0 5px 15px rgba(99, 102, 241, 0.2);
    margin: 5px 0 25px;
}
.builder-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.builder-option {
    background: white;
    padding: 15px 5px;
    border-radius: 15px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-muted);
    border: 2px solid #e5e7eb;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 4px 0 #e5e7eb;
}
.builder-option:active { transform: translateY(4px); box-shadow: none; }
.builder-option.selected {
    background: #eef2ff;
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 4px 0 #c7d2fe;
}


/* --- ПРОФИЛЬ --- */
.profile-layout {
    background: rgba(255,255,255,0.9);
    border-radius: 30px;
    padding: 40px 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    margin-top: 10px;
    position: relative;
    overflow: hidden;
}

.profile-header-large { text-align: center; margin-bottom: 30px; position: relative; }
.back-btn { position: absolute; top: 0; left: 0; }

.profile-avatar-large {
    width: 100px; height: 100px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    color: white; font-size: 3rem; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 15px;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
    border: 4px solid white;
}

#profileName { font-size: 1.5rem; font-weight: 800; margin-bottom: 5px; }
#profileClassBadge {
    display: inline-block; background: #e0e7ff; color: var(--primary-color);
    padding: 5px 15px; border-radius: 15px; font-weight: 700; font-size: 0.9rem;
}

.stats-grid-modern { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 30px; }
.stat-box {
    background: #f8fafc; padding: 20px; border-radius: 20px; text-align: center;
    border: 1px solid #f1f5f9;
}
.stat-value { font-size: 1.8rem; font-weight: 900; color: var(--text-main); display: block; }
.stat-label { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; }

.section-header { font-size: 1.2rem; font-weight: 800; margin: 30px 0 15px; display: flex; align-items: center; gap: 10px; }

/* Достижения (ВИДИМЫЙ СКРОЛЛ) */
.achievements-scroll {
    display: flex; 
    gap: 12px; 
    overflow-x: auto; 
    padding: 10px 5px 20px;
    scrollbar-width: thin; 
    scrollbar-color: #cbd5e1 transparent;
}

.achievements-scroll::-webkit-scrollbar { height: 8px; display: block; }
.achievements-scroll::-webkit-scrollbar-track { background: transparent; margin: 0 10px; }
.achievements-scroll::-webkit-scrollbar-thumb { background-color: #cbd5e1; border-radius: 20px; border: 2px solid transparent; background-clip: content-box; }
.achievements-scroll::-webkit-scrollbar-thumb:hover { background-color: #94a3b8; }

.badge-item {
    min-width: 120px; text-align: center;
    background: white; padding: 15px 10px;
    border-radius: 18px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    border: 2px solid transparent;
    transition: 0.2s;
    position: relative; 
    cursor: help;
}

.badge-item.unlocked { 
    border-color: #fbbf24; 
    background: linear-gradient(to bottom, #fffbeb, #fff); 
}
.badge-item.locked {
    filter: grayscale(100%);
    opacity: 0.6;
    border-color: #e5e7eb;
}
.badge-item.locked .badge-name { color: #6b7280; }

.badge-icon { font-size: 2.5rem; margin-bottom: 8px; filter: drop-shadow(0 4px 2px rgba(0,0,0,0.1)); }
.badge-name { font-size: 0.8rem; font-weight: 700; color: #b45309; line-height: 1.2; }

/* Метка редкости */
.rarity-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ecfdf5;
    color: #059669;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 10px;
    border: 1px solid #a7f3d0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.history-container { background: #f8fafc; border-radius: 20px; padding: 15px; }
.history-item { display: flex; justify-content: space-between; padding: 12px 5px; border-bottom: 1px solid #e2e8f0; font-size: 0.95rem; }
.history-item:last-child { border-bottom: none; }

/* --- МОДАЛКА SETUP --- */
.setup-modal { max-width: 450px; text-align: left; padding: 30px; }
.setup-modal h2 { text-align: center; margin-bottom: 25px; color: var(--primary-color); }
.setup-section { margin-bottom: 25px; }
.setup-section label { display: block; margin-bottom: 10px; font-weight: 700; color: var(--text-muted); font-size: 0.9rem; text-transform: uppercase; }
.selector-group { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sel-btn {
    background: #f3f4f6; border: 2px solid transparent; border-radius: 12px; padding: 12px 5px;
    cursor: pointer; font-weight: 600; color: var(--text-main); display: flex; flex-direction: column;
    align-items: center; justify-content: center; transition: 0.2s; font-size: 0.9rem;
}
.sel-btn span { font-size: 0.7rem; color: var(--text-muted); margin-top: 4px; font-weight: 400; }
.sel-btn:hover { background: #e5e7eb; }
.sel-btn.active { background: #eef2ff; border-color: var(--primary-color); color: var(--primary-color); }
.sel-btn.active span { color: #818cf8; }
.btn-lg { padding: 15px; font-size: 1.1rem; margin-bottom: 10px; }

/* --- МОДАЛКА РЕЗУЛЬТАТА --- */
.game-result-modal {
    background: white;
    border-radius: 40px;
    text-align: center;
    padding: 40px 30px;
    max-width: 380px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    border: 4px solid #eef2ff;
}

.result-emoji {
    font-size: 5rem;
    margin-bottom: 10px;
    animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

#resultTitle {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #6366f1, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.result-details {
    background: #f8fafc;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid #e2e8f0;
}

.res-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}
.res-row:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }

.text-green { color: #10b981; }
.text-red { color: #ef4444; }

@keyframes bounceIn {
    0% { opacity: 0; transform: scale(0.3); }
    50% { opacity: 1; transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

@keyframes shake {
    0% { transform: translateX(0); } 25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); } 75% { transform: translateX(-5px); } 100% { transform: translateX(0); }
}