/**
 * Main Stylesheet: Vừa học vừa chơi với Toán
 * Modern, cute, child-friendly color scheme with soft rounded borders & glassmorphism
 */

:root {
    --primary: #4361EE;
    --primary-light: #4895EF;
    --secondary: #4CC9F0;
    --accent: #F72585;
    --success: #38B000;
    --success-light: #E8F5E9;
    --warning: #FB8500;
    --danger: #E63946;
    --danger-light: #FFEBEE;
    --bg-gradient: linear-gradient(135deg, #F0F4FF 0%, #E2EDFF 50%, #FAF0FF 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    --card-border: rgba(67, 97, 238, 0.12);
    --shadow-soft: 0 10px 25px rgba(67, 97, 238, 0.08);
    --shadow-hover: 0 15px 35px rgba(67, 97, 238, 0.15);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;
    --font-main: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-main);
    background: var(--bg-gradient);
    min-height: 100vh;
    color: #2B2D42;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 16px;
    overflow-x: hidden;
}

#app {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    min-height: 90vh;
    display: flex;
    flex-direction: column;
}

/* Menu Topbar */
.menu-topbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.sound-toggle-btn {
    background: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    border: 1px solid var(--card-border);
    transition: all 0.2s ease;
    user-select: none;
}

.sound-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Hero Welcome Card */
.hero-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    border: 2px solid #E8EEFF;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.hero-card::after {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(76, 201, 240, 0.2) 0%, transparent 70%);
    border-radius: 50%;
}

.mascot-container {
    display: inline-block;
    margin-bottom: 12px;
}

.mascot-bean {
    font-size: 64px;
    line-height: 1;
    display: inline-block;
    filter: drop-shadow(0 6px 12px rgba(56, 176, 0, 0.3));
}

.game-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.greeting-banner {
    background: linear-gradient(135deg, #EEF4FF 0%, #F5EBFF 100%);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: inline-block;
    max-width: 650px;
    border: 1.5px dashed #4361EE;
}

.greeting-text {
    font-size: 20px;
    font-weight: 700;
    color: #3F37C9;
    margin-bottom: 4px;
}

.greeting-sub {
    font-size: 14px;
    color: #6C757D;
}

/* Modes Grid */
.modes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.mode-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-soft);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.mode-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.mode-exam { border-color: #FFD166; }
.mode-exam:hover { border-color: #F77F00; }
.mode-topics { border-color: #A0C4FF; }
.mode-topics:hover { border-color: #4361EE; }
.mode-speed { border-color: #FFC6FF; }
.mode-speed:hover { border-color: #F72585; }
.mode-dash { border-color: #B9FBC0; }
.mode-dash:hover { border-color: #38B000; }

.mode-icon {
    font-size: 42px;
    margin-bottom: 12px;
}

.mode-info h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1A1A24;
}

.mode-info p {
    font-size: 14px;
    color: #555;
    line-height: 1.4;
    margin-bottom: 14px;
}

.mode-badge {
    display: inline-block;
    background: #F0F4FF;
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    margin-bottom: 18px;
}

.btn-play {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 700;
    color: white;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.btn-play:hover {
    opacity: 0.92;
}

.btn-exam { background: linear-gradient(135deg, #F77F00, #FCBF49); }
.btn-topics { background: linear-gradient(135deg, #4361EE, #4895EF); }
.btn-speed { background: linear-gradient(135deg, #7209B7, #F72585); }
.btn-dash { background: linear-gradient(135deg, #38B000, #70E000); }

/* Responsive Adjustments */
@media (max-width: 600px) {
    .game-title { font-size: 24px; }
    .greeting-text { font-size: 17px; }
    .modes-grid { grid-template-columns: 1fr; }
    .hero-card { padding: 20px 16px; }
}
