/* ===== CSS Variables ===== */
:root {
    --primary: #6C5CE7;
    --primary-dark: #5B4CD4;
    --secondary: #00CEC9;
    --accent: #FD79A8;
    --bg-dark: #0D0D1A;
    --bg-card: #1A1A2E;
    --bg-card-hover: #252540;
    --text-primary: #FFFFFF;
    --text-secondary: #B8B8D0;
    --text-muted: #6C6C8A;
    --border: #2D2D4A;
    --success: #00B894;
    --warning: #FDCB6E;
    --danger: #E17055;
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --gradient-bg: linear-gradient(180deg, #0D0D1A 0%, #1A1A2E 50%, #0D0D1A 100%);
    --shadow: 0 4px 20px rgba(108, 92, 231, 0.3);
    --radius: 12px;
    --radius-sm: 8px;
    
    /* 热血传奇配色 */
    --mir2-primary: #8B0000;
    --mir2-secondary: #FFD700;
    --mir2-bg: #1A0A0A;
    --mir2-card: #2D1515;
    --mir2-border: #4A2020;
    --mir2-gradient: linear-gradient(135deg, #8B0000 0%, #CD5C5C 50%, #8B0000 100%);
}

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

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gradient-bg);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

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

/* ===== Header ===== */
.header {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 12px 0;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 28px;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s;
}

.nav-btn:hover, .nav-btn.active {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--primary);
}

.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 0;
    min-width: 200px;
    display: none;
    box-shadow: var(--shadow);
    z-index: 100;
}

.nav-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 10px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.dropdown-menu a:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
}

/* ===== Mobile Menu ===== */
.mobile-menu {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 20px;
    z-index: 999;
}

.mobile-menu.show {
    display: block;
}

.mobile-menu a {
    display: block;
    padding: 12px 0;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
}

.mobile-group {
    margin: 16px 0;
}

.mobile-group-title {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

/* ===== Sections ===== */
.section {
    display: none;
    padding: 100px 0 60px;
    min-height: 100vh;
}

.section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* ===== Hero ===== */
.hero {
    text-align: center;
    padding: 40px 0 60px;
}

.hero h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero .subtitle {
    font-size: 18px;
    color: var(--text-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 32px;
    margin-bottom: 12px;
}

.section-header p {
    color: var(--text-secondary);
}

/* ===== Category Grid ===== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: all 0.3s;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.category-card.young { border-top: 3px solid var(--accent); }
.category-card.middle { border-top: 3px solid var(--warning); }
.category-card.kids { border-top: 3px solid var(--success); }

.category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.category-icon {
    font-size: 32px;
}

.category-header h2 {
    font-size: 20px;
    flex: 1;
}

.category-tag {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--bg-card-hover);
}

.young .category-tag { background: rgba(253, 121, 168, 0.2); color: var(--accent); }
.middle .category-tag { background: rgba(253, 203, 110, 0.2); color: var(--warning); }
.kids .category-tag { background: rgba(0, 184, 148, 0.2); color: var(--success); }

.category-card p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
}

.tool-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tool-btn {
    background: var(--bg-card-hover);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    text-align: left;
    transition: all 0.2s;
}

.tool-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
}

/* ===== FAQ Section ===== */
.faq-section {
    margin-top: 20px;
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

.faq-section details {
    background: var(--bg-dark);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    overflow: hidden;
}

.faq-section summary {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.faq-section summary:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.faq-section summary::before {
    content: '▶';
    font-size: 10px;
    transition: transform 0.2s;
}

.faq-section details[open] summary::before {
    transform: rotate(90deg);
}

.faq-content {
    padding: 12px 16px;
    background: var(--bg-card);
}

.faq-item {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item strong {
    display: block;
    color: var(--text-primary);
    font-size: 13px;
    margin-bottom: 4px;
}

.faq-item p {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.6;
}

/* ===== Calculator Card ===== */
.calculator-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    max-width: 600px;
    margin: 0 auto;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.sub-stat-input {
    display: flex;
    gap: 8px;
}

.sub-stat-input select {
    width: 60%;
}

.sub-stat-input input {
    width: 40%;
}

.calc-btn {
    width: 100%;
    background: var(--gradient-primary);
    border: none;
    color: white;
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s;
    margin-top: 8px;
}

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

.calc-btn.secondary {
    background: var(--bg-card-hover);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.calc-btn.secondary:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.btn-row {
    display: flex;
    gap: 12px;
}

.btn-row .calc-btn {
    flex: 1;
}

/* ===== Result Card ===== */
.result-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    max-width: 600px;
    margin: 24px auto 0;
}

.result-card h3 {
    text-align: center;
    margin-bottom: 24px;
    color: var(--secondary);
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.result-item {
    background: var(--bg-dark);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
}

.result-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.result-value {
    display: block;
    font-size: 20px;
    font-weight: 600;
    color: var(--secondary);
}

/* Score Display */
.score-display {
    text-align: center;
    margin: 24px 0;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.score-number {
    font-size: 48px;
    font-weight: 700;
    color: white;
}

.score-label {
    font-size: 16px;
    color: rgba(255,255,255,0.8);
}

.score-grade {
    font-size: 18px;
    font-weight: 500;
}

/* Win Rate Display */
.win-rate-display {
    text-align: center;
    margin: 24px 0;
}

.win-rate-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.win-rate-number {
    font-size: 48px;
    font-weight: 700;
    color: white;
}

.win-rate-percent {
    font-size: 24px;
    color: rgba(255,255,255,0.8);
}

/* Strategy Box */
.strategy-box {
    background: var(--bg-dark);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin: 20px 0;
}

.strategy-box h4 {
    margin-bottom: 12px;
    color: var(--secondary);
}

/* Tips Box */
.tips {
    background: rgba(108, 92, 231, 0.1);
    border: 1px solid rgba(108, 92, 231, 0.3);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-top: 20px;
}

.tips h4 {
    margin-bottom: 8px;
    color: var(--primary);
}

.tips p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ===== Sudoku Grid ===== */
.sudoku-input-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 2px;
    max-width: 324px;
    margin: 0 auto;
}

.sudoku-input-grid input {
    width: 100%;
    aspect-ratio: 1;
    text-align: center;
    font-size: 18px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0;
}

.sudoku-input-grid input.fixed {
    background: var(--bg-card-hover);
    color: var(--secondary);
}

.sudoku-input-grid input:nth-child(3n) {
    border-right: 2px solid var(--primary);
}

.sudoku-input-grid input:nth-child(n+19):nth-child(-n+27),
.sudoku-input-grid input:nth-child(n+46):nth-child(-n+54) {
    border-bottom: 2px solid var(--primary);
}

.sudoku-display-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 2px;
    max-width: 324px;
    margin: 0 auto;
}

.sudoku-display-grid .cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 500;
    background: var(--bg-dark);
    border: 1px solid var(--border);
}

.sudoku-display-grid .cell.original {
    color: var(--secondary);
}

.sudoku-display-grid .cell.filled {
    color: var(--text-primary);
}

.sudoku-display-grid .cell:nth-child(3n) {
    border-right: 2px solid var(--primary);
}

.sudoku-display-grid .cell:nth-child(n+19):nth-child(-n+27),
.sudoku-display-grid .cell:nth-child(n+46):nth-child(-n+54) {
    border-bottom: 2px solid var(--primary);
}

.solve-info {
    text-align: center;
    margin-top: 20px;
    color: var(--text-secondary);
}

/* ===== 2048 Direction Buttons ===== */
.move-suggestion {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 24px 0;
}

.direction-row {
    display: flex;
    gap: 8px;
}

.direction-btn {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: var(--bg-dark);
    border: 2px solid var(--border);
    cursor: default;
}

.direction-btn.best {
    background: var(--gradient-primary);
    border-color: var(--primary);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.analysis-text {
    text-align: center;
    padding: 16px;
    background: var(--bg-dark);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
}

/* ===== Math Training ===== */
.math-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.stat-item {
    text-align: center;
    background: var(--bg-dark);
    border-radius: var(--radius-sm);
    padding: 16px;
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--secondary);
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
}

.math-question-area {
    text-align: center;
    padding: 32px;
    background: var(--bg-dark);
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.question-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 24px;
}

.equals {
    color: var(--text-muted);
}

#math-answer {
    width: 120px;
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    background: var(--bg-card);
    border: 2px solid var(--primary);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 8px;
}

.progress-bar {
    height: 8px;
    background: var(--bg-dark);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    transition: width 0.3s;
    width: 0%;
}

.history-list {
    max-height: 200px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    font-size: 14px;
}

.history-item.correct {
    background: rgba(0, 184, 148, 0.1);
}

.history-item.wrong {
    background: rgba(225, 112, 85, 0.1);
}

/* ===== 热血传奇样式 ===== */
.mir2-header h2 {
    color: var(--mir2-secondary);
}

.mir2-card {
    background: var(--mir2-card);
    border-color: var(--mir2-border);
}

.mir2-card input,
.mir2-card select {
    background: var(--mir2-bg);
    border-color: var(--mir2-border);
}

.mir2-card input:focus,
.mir2-card select:focus {
    border-color: var(--mir2-secondary);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

.mir2-btn {
    background: var(--mir2-gradient);
    border: 1px solid var(--mir2-secondary);
}

.mir2-btn:hover {
    box-shadow: 0 4px 20px rgba(139, 0, 0, 0.5);
}

.mir2-result {
    background: var(--mir2-card);
    border-color: var(--mir2-border);
}

.mir2-result h3 {
    color: var(--mir2-secondary);
}

.mir2-result .result-item {
    background: var(--mir2-bg);
}

.mir2-result .result-value {
    color: var(--mir2-secondary);
}

.mir2-tips {
    background: rgba(139, 0, 0, 0.2);
    border-color: var(--mir2-border);
}

.mir2-tips h4 {
    color: var(--mir2-secondary);
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 30px 0;
    text-align: center;
}

.footer p {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 8px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .header .container {
        flex-wrap: wrap;
    }
    
    .nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero h1 {
        font-size: 32px;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .calculator-card,
    .result-card {
        padding: 20px;
    }
    
    .input-row {
        grid-template-columns: 1fr;
    }
    
    .math-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .question-display {
        font-size: 28px;
        flex-wrap: wrap;
    }
    
    #math-answer {
        width: 100px;
        font-size: 28px;
    }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ===== Selection ===== */
::selection {
    background: var(--primary);
    color: white;
}

/* ===== Game Card Icon Styles ===== */
.game-card-icon-inline {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

/* ===== Hero Section Upgrade ===== */
.hero-section {
    position: relative;
    padding: 80px 0 60px;
    text-align: center;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(108, 92, 231, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(0, 206, 201, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(253, 121, 168, 0.08) 0%, transparent 60%);
    z-index: -1;
}

.hero-section h1 {
    font-size: 52px;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #6C5CE7 0%, #00CEC9 50%, #FD79A8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s ease-in-out infinite;
    background-size: 200% 100%;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-section .subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.hero-section .tagline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    padding: 10px 20px;
    background: rgba(108, 92, 231, 0.15);
    border: 1px solid rgba(108, 92, 231, 0.3);
    border-radius: 30px;
    font-size: 14px;
    color: var(--primary);
}

/* ===== Category Cards with Icons ===== */
.category-card {
    position: relative;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.category-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.category-icon-wrapper.young { background: linear-gradient(135deg, rgba(253, 121, 168, 0.2), rgba(253, 121, 168, 0.1)); }
.category-icon-wrapper.middle { background: linear-gradient(135deg, rgba(253, 203, 110, 0.2), rgba(253, 203, 110, 0.1)); }
.category-icon-wrapper.kids { background: linear-gradient(135deg, rgba(0, 184, 148, 0.2), rgba(0, 184, 148, 0.1)); }
.category-icon-wrapper.game { background: linear-gradient(135deg, rgba(108, 92, 231, 0.2), rgba(108, 92, 231, 0.1)); }

.category-icon-wrapper svg {
    width: 28px;
    height: 28px;
}

/* ===== Tool Buttons with Icons ===== */
.tool-btn {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tool-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.8;
}

/* ===== FAQ Upgrade ===== */
.faq-section details summary {
    position: relative;
    padding-left: 36px;
}

.faq-section summary .faq-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.faq-section summary .faq-icon svg {
    width: 14px;
    height: 14px;
}

/* ===== Games Section ===== */
.games-section {
    margin-top: 20px;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.game-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-decoration: none;
    transition: all 0.3s;
    display: block;
    position: relative;
    overflow: hidden;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.game-card:hover::before {
    transform: scaleX(1);
}

.game-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.2), rgba(0, 206, 201, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.game-card-icon svg {
    width: 32px;
    height: 32px;
}

.game-card h3 {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.game-card p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.game-card-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.game-tag {
    font-size: 11px;
    padding: 4px 10px;
    background: rgba(108, 92, 231, 0.15);
    color: var(--primary);
    border-radius: 12px;
}

/* ===== Card Hover Effects ===== */
.category-card {
    position: relative;
}

.category-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(108, 92, 231, 0.2);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.category-card:hover::after {
    opacity: 1;
}

/* ===== Background Animation ===== */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.floating-element {
    animation: float 4s ease-in-out infinite;
}

/* ===== Section Divider ===== */
.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 40px 0;
    color: var(--text-muted);
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* ===== Responsive Updates ===== */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0 40px;
    }
    
    .hero-section h1 {
        font-size: 36px;
    }
    
    .hero-section .subtitle {
        font-size: 16px;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .category-icon-wrapper {
        width: 40px;
        height: 40px;
    }
    
    .category-icon-wrapper svg {
        width: 24px;
        height: 24px;
    }
}

/* ===== Game Arcade Style Background ===== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(180deg, rgba(13, 13, 26, 0.97) 0%, rgba(26, 26, 46, 0.98) 50%, rgba(13, 13, 26, 0.97) 100%),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 50px,
            rgba(108, 92, 231, 0.03) 50px,
            rgba(108, 92, 231, 0.03) 51px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 50px,
            rgba(108, 92, 231, 0.03) 50px,
            rgba(108, 92, 231, 0.03) 51px
        );
    z-index: -2;
    pointer-events: none;
}
