/**
 * KBBET Main Stylesheet
 * Aesthetic: Modern, Clean, Professional with Coral & Deep Teal accent
 * Typography: Lexend (primary), JetBrains Mono (code)
 */

/* ========================================
   CSS Variables
======================================== */
:root {
    /* Primary Colors - Coral & Deep Teal */
    --color-primary: #0028bb;
    --color-primary-dark: #0028bb;
    --color-primary-light: #0028bb;
    --color-secondary: #0D7377;
    --color-secondary-dark: #0A5C5F;
    --color-secondary-light: #14A3A8;

    /* Accent Colors */
    --color-accent: #FFD93D;
    --color-accent-muted: #FFF3CD;

    /* Neutral Colors */
    --color-bg: #FDFCFB;
    --color-bg-alt: #F5F3F0;
    --color-bg-dark: #1A1A2E;
    --color-surface: #FFFFFF;
    --color-surface-elevated: #FFFFFF;

    /* Text Colors */
    --color-text: #2D2D3A;
    --color-text-secondary: #5A5A6E;
    --color-text-muted: #8A8A9A;
    --color-text-inverse: #FFFFFF;

    /* Border & Shadow */
    --color-border: #E8E6E3;
    --color-border-light: #F0EEEB;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.15);

    /* Typography */
    --font-primary: 'Lexend', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;

    /* Container */
    --container-max: 1200px;
    --container-narrow: 800px;
}

/* ========================================
   Reset & Base
======================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-weight: 400;
    line-height: 1.7;
    color: var(--color-text);
    background: var(--color-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(255, 107, 91, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(13, 115, 119, 0.03) 0%, transparent 50%),
        linear-gradient(135deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);
    pointer-events: none;
    z-index: -1;
}

main {
    flex: 1;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: #0028bb;
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-dark);
}

ul,
ol {
    list-style-position: inside;
}

/* ========================================
   Typography
======================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-text);
    margin-bottom: var(--space-md);
}

h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    letter-spacing: -0.01em;
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: var(--space-md);
}

.lead {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    font-weight: 300;
}

/* ========================================
   Container
======================================== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.container-narrow {
    max-width: var(--container-narrow);
}

/* ========================================
   App Download Bar
======================================== */
.app-bar {
    background: linear-gradient(135deg, var(--color-bg-dark), #2a2a4a);
    color: var(--color-text-inverse);
    padding: var(--space-sm) 0;
    display: none;
    /* Hidden on desktop by default */
}

.app-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
}

.app-bar-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.app-bar-icon,
.app-bar-emoji {
    width: 32px;
    height: 32px;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.app-bar-text {
    display: flex;
    flex-direction: column;
    font-size: 0.75rem;
    line-height: 1.3;
}

.app-bar-text strong {
    font-size: 0.875rem;
    color: var(--color-accent);
}

.app-bar-text span {
    opacity: 0.8;
}

.btn-app-download {
    background: #ffffff;
    color: #000000;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.btn-app-download:hover {
    background: var(--color-primary-dark);
    color: white;
}

/* ========================================
   Header
======================================== */
.site-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

/* Spacer for fixed header */
body {
    padding-top: 70px;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    gap: var(--space-lg);
    position: relative;
    height: 70px;
}

/* Header Right Side */
.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* Header Auth Buttons */
.header-auth {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.btn-auth {
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-fast);
    border: none;
    cursor: pointer;
    display: inline-block;
}

.btn-auth-register {
    background: #0028bb;
    color: white;
}

.btn-auth-register:hover {
    background: var(--color-primary-dark);
    color: white;
}

.btn-auth-login {
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-auth-login:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* Search Toggle Button */
.search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.search-toggle:hover {
    background: var(--color-bg-alt);
    color: var(--color-primary);
}

/* Search Modal */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.search-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.search-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.search-modal-content {
    position: relative;
    width: 100%;
    max-width: 600px;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    margin: 0 var(--space-lg);
    transform: translateY(-20px) scale(0.95);
    transition: transform var(--transition-base);
    overflow: hidden;
}

.search-modal.is-open .search-modal-content {
    transform: translateY(0) scale(1);
}

.search-modal-header {
    border-bottom: 1px solid var(--color-border-light);
}

.search-form {
    display: flex;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    gap: var(--space-md);
}

.search-icon {
    flex-shrink: 0;
    color: var(--color-text-muted);
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1.125rem;
    font-family: var(--font-primary);
    color: var(--color-text);
    outline: none;
}

.search-input::placeholder {
    color: var(--color-text-muted);
}

.search-close {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--color-bg-alt);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.search-close:hover {
    background: var(--color-primary);
    color: white;
}

.search-modal-body {
    padding: var(--space-lg);
    max-height: 50vh;
    overflow-y: auto;
}

.search-hint {
    color: var(--color-text-muted);
    text-align: center;
    padding: var(--space-lg) 0;
}

.search-popular {
    margin-top: var(--space-lg);
}

.search-popular h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
}

.search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.search-tag {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    background: var(--color-bg-alt);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.search-tag:hover {
    background: var(--color-primary);
    color: white;
}

/* Search Results */
.search-results {
    list-style: none;
}

.search-result-item {
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.search-result-item:hover {
    background: var(--color-bg-alt);
}

.search-result-item a {
    text-decoration: none;
    color: var(--color-text);
}

.search-result-title {
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.search-result-excerpt {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--color-text);
    text-decoration: none;
    transition: transform var(--transition-fast);
}

.logo:hover {
    transform: scale(1.02);
    color: var(--color-text);
}

.logo-image {
    height: 70px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    padding: 8px 0;
}

.logo-text {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation */
.main-nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    gap: var(--space-xs);
    list-style: none;
}

.nav-link {
    display: block;
    padding: var(--space-sm) var(--space-md);
    color: var(--color-text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link:hover {
    color: var(--color-primary);
    background: var(--color-bg-alt);
}

.nav-link.active {
    color: #0028bb;
    background: rgba(255, 107, 91, 0.1);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--color-primary);
    border-radius: var(--radius-full);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: all var(--transition-base);
}

/* ========================================
   Hero Section
======================================== */
.hero {
    padding: var(--space-3xl) 0;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.hero-content {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: var(--color-accent-muted);
    color: var(--color-text);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: var(--space-lg);
}

.hero-badge::before {
    content: '★';
    color: var(--color-accent);
}

.hero h1 {
    margin-bottom: var(--space-lg);
}

.hero h1 span {
    color: #0028bb;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xl);
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

/* Hero Image */
.hero-image-wrapper {
    margin: var(--space-xl) auto;
    max-width: 450px;
}

.hero-image {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

.hero-actions {
    justify-content: center;
}

/* Hero Slider */
.hero-slider {
    position: relative;
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.slider-wrapper {
    position: relative;
    width: 100%;
}

.slider-track {
    position: relative;
    width: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out;
}

.slide:first-child {
    position: relative;
}

.slide.active {
    opacity: 1;
    visibility: visible;
}

.slide img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-lg);
}

/* Slider Navigation Buttons */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    color: #333;
}

.slider-btn:hover {
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.slider-prev {
    left: 15px;
}

.slider-next {
    right: 15px;
}

.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: #fff;
    transform: scale(1.2);
}

.dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

@media (max-width: 768px) {
    .slider-btn {
        width: 36px;
        height: 36px;
    }
    
    .slider-prev {
        left: 10px;
    }
    
    .slider-next {
        right: 10px;
    }
    
    .slider-btn svg {
        width: 18px;
        height: 18px;
    }
}

/* Hero Fullwidth with Background Image */
.hero-fullwidth {
    position: relative;
    min-height: 400px;
    padding: var(--space-2xl) 0;
    text-align: left;
    background-color: #0d1b2a;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(115deg,
            rgba(13, 27, 42, 0) 0%,
            rgba(13, 27, 42, 0) 45%,
            rgba(13, 27, 42, 0.95) 50%,
            rgba(13, 27, 42, 1) 55%,
            rgba(13, 27, 42, 1) 100%);
    z-index: 1;
}

.hero-fullwidth .container {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: flex-end;
}

.hero-inner {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: flex-end;
    width: 100%;
    padding: 0 var(--space-lg);
}

.hero-content-right {
    max-width: 450px;
    padding: var(--space-lg) var(--space-xl);
    color: var(--color-text-inverse);
}

.hero-promo-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
}

.promo-icon {
    font-size: 1.5rem;
}

.promo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.promo-text strong {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}

.promo-text span {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-fullwidth .hero-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: var(--space-sm);
    line-height: 1.15;
}

.hero-fullwidth .hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: var(--space-xl);
}

.hero-fullwidth .hero-actions {
    justify-content: flex-start;
}

.hero-fullwidth .btn-large {
    padding: var(--space-md) var(--space-2xl);
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
    border-radius: var(--radius-md);
}

.hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-fullwidth .btn-large:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

/* Steps Section */
.steps-section {
    background: var(--color-bg-dark);
    padding: var(--space-lg) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.step-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    color: #fff;
}

.step-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.9);
}

.step-content {
    flex: 1;
}

.step-title {
    font-size: 1rem;
    font-weight: 600;
    color: #f59e0b;
    margin-bottom: 0.25rem;
}

.step-desc {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* Responsive Hero Fullwidth */
@media (max-width: 992px) {
    .hero-fullwidth {
        min-height: auto;
        padding: var(--space-2xl) 0;
        background-size: cover;
        background-position: center center;
    }

    .hero-overlay {
        background: rgba(13, 27, 42, 0.85);
    }

    .hero-fullwidth .container {
        justify-content: center;
    }

    .hero-content-right {
        text-align: center;
        max-width: 100%;
        background: transparent;
        backdrop-filter: none;
    }

    .hero-fullwidth .hero-actions {
        justify-content: center;
    }

    .hero-promo-badge {
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 576px) {
    .hero-fullwidth {
        padding: var(--space-xl) 0;
    }

    .hero-content-right {
        padding: var(--space-md);
    }

    .hero-fullwidth .hero-title {
        font-size: 1.5rem;
    }

    .hero-fullwidth .hero-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .steps-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .step-card {
        padding: var(--space-md);
        background: rgba(255, 255, 255, 0.05);
        border-radius: var(--radius-md);
    }
}

/* ========================================
   Buttons
======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #0028bb, #0028bb);
    color: var(--color-text-inverse);
    box-shadow: 0 4px 15px rgba(255, 107, 91, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 91, 0.4);
    color: var(--color-text-inverse);
}

.btn-secondary {
    background: var(--color-surface);
    color: var(--color-text);
    border: 2px solid var(--color-border);
}

.btn-secondary:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-outline {
    background: transparent;
    border: 2px solid #0028bb;
    color: #0028bb;
}

.btn-outline:hover {
    background: var(--color-primary);
    color: var(--color-text-inverse);
}

/* ========================================
   Sections
======================================== */
.section {
    padding: var(--space-3xl) 0;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto var(--space-2xl);
}

.section-subtitle {
    display: inline-block;
    color: #000000;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-sm);
}

/* ========================================
   Cards
======================================== */
.card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border-light);
    transition: all var(--transition-base);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-image {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--color-bg-alt);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: var(--space-lg);
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
}

.card-title a {
    color: var(--color-text);
}

.card-title a:hover {
    color: var(--color-primary);
}

.card-excerpt {
    color: #000000;
    font-size: 0.95rem;
    margin-bottom: var(--space-md);
}

.card-meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: 0.875rem;
    color: #000000;
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-xl);
}

/* ========================================
   Featured Posts
======================================== */
.featured-posts {
    background: var(--color-bg-alt);
}

/* ========================================
   Page Header
======================================== */
.page-header {
    padding: var(--space-3xl) 0 var(--space-2xl);
    text-align: center;
    background: linear-gradient(135deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);
    border-bottom: 1px solid var(--color-border-light);
}

.page-header h1 {
    margin-bottom: var(--space-md);
}

.page-header .lead {
    max-width: 600px;
    margin: 0 auto;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    list-style: none;
    margin-bottom: var(--space-lg);
    font-size: 0.875rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.breadcrumb-item:not(:last-child)::after {
    content: '›';
    color: var(--color-text-muted);
}

.breadcrumb-item a {
    color: var(--color-text-secondary);
}

.breadcrumb-item a:hover {
    color: var(--color-primary);
}

.breadcrumb-item.active {
    color: var(--color-text-muted);
}

/* ========================================
   Content
======================================== */
.content {
    padding: var(--space-2xl) 0;
}

.content-body {
    max-width: var(--container-narrow);
    margin: 0 auto;
}

.content-body h2 {
    margin-top: var(--space-2xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border-light);
}

.content-body h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.content-body ul,
.content-body ol {
    margin-bottom: var(--space-lg);
    padding-left: var(--space-lg);
}

.content-body li {
    margin-bottom: var(--space-sm);
}

.content-body figure {
    margin: var(--space-xl) 0;
}

.content-body figcaption {
    text-align: center;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-top: var(--space-sm);
}

/* ========================================
   Post
======================================== */
.post-header {
    padding: var(--space-2xl) 0;
}

.post-cover {
    margin-bottom: var(--space-xl);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.post-cover img {
    width: 100%;
    aspect-ratio: 21/9;
    object-fit: cover;
}

.post-image {
    margin: var(--space-xl) 0;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.post-image img {
    width: 100%;
}

/* ========================================
   Contact Form
======================================== */
.contact-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: start;
}

.contact-info h3 {
    margin-bottom: var(--space-md);
}

.contact-info p {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xl);
}

.contact-details {
    list-style: none;
}

.contact-details li {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--color-border-light);
}

.contact-details li:last-child {
    border-bottom: none;
}

.contact-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-alt);
    border-radius: var(--radius-sm);
    color: var(--color-primary);
    font-size: 1.25rem;
}

.contact-form {
    background: var(--color-surface);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border-light);
}

.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: var(--space-sm);
    color: var(--color-text);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: var(--space-md);
    font-family: var(--font-primary);
    font-size: 1rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg);
    color: var(--color-text);
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 91, 0.1);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

/* ========================================
   Keyword Page
======================================== */
.keyword-hero {
    text-align: center;
    padding: var(--space-3xl) 0;
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-dark) 100%);
    color: var(--color-text-inverse);
}

.keyword-hero h1 {
    color: var(--color-text-inverse);
}

.keyword-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-full);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--space-lg);
}

/* ========================================
   Footer
======================================== */
.site-footer {
    background: var(--color-bg-dark);
    color: var(--color-text-inverse);
    padding: var(--space-3xl) 0 var(--space-xl);
    margin-top: auto;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.footer-column {
    min-width: 0;
}

.footer-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-inverse);
    margin-bottom: var(--space-lg);
    position: relative;
    padding-bottom: var(--space-sm);
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--color-primary);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-primary);
    padding-left: var(--space-sm);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
    margin: 0;
}

/* ========================================
   FAQ Section
======================================== */
.faq-section {
    margin-top: var(--space-2xl);
}

.faq-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    overflow: hidden;
}

.faq-question {
    padding: var(--space-lg);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.faq-question:hover {
    background: var(--color-bg-alt);
}

.faq-answer {
    padding: 0 var(--space-lg) var(--space-lg);
    color: var(--color-text-secondary);
}

/* ========================================
   Utilities
======================================== */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--color-text-muted);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.mt-0 {
    margin-top: 0;
}

.mt-1 {
    margin-top: var(--space-sm);
}

.mt-2 {
    margin-top: var(--space-md);
}

.mt-3 {
    margin-top: var(--space-lg);
}

.mt-4 {
    margin-top: var(--space-xl);
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: var(--space-sm);
}

.mb-2 {
    margin-bottom: var(--space-md);
}

.mb-3 {
    margin-bottom: var(--space-lg);
}

.mb-4 {
    margin-bottom: var(--space-xl);
}

/* ========================================
   Responsive Design
======================================== */
@media (max-width: 1024px) {
    .footer-columns {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-section {
        grid-template-columns: 1fr;
    }

    .hero-image-wrapper {
        max-width: 320px;
    }
}

@media (max-width: 768px) {
    :root {
        --space-3xl: 3rem;
    }

    /* Show App Bar on mobile */
    .app-bar {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1001;
    }

    /* Adjust header position when app-bar is visible */
    .site-header {
        top: 48px;
    }

    /* Adjust body padding for app-bar + header (48px app-bar + 56px header) */
    body {
        padding-top: 104px;
    }

    /* Adjust header for mobile */
    .header-inner {
        gap: var(--space-sm);
        height: 56px;
    }

    .logo-image {
        height: 100px;
        padding: 0px 0;
    }

    /* Header right on mobile */
    .header-right {
        gap: var(--space-xs);
    }

    /* Keep auth buttons visible on mobile but smaller */
    .header-auth {
        display: flex;
    }

    .btn-auth {
        padding: var(--space-xs) var(--space-sm);
        font-size: 0.75rem;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-surface);
        padding: var(--space-md);
        box-shadow: var(--shadow-lg);
        border-top: 1px solid var(--color-border);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all var(--transition-base);
    }

    .main-nav.is-open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
    }

    .nav-link {
        padding: var(--space-md);
        font-size: 1.1rem;
        border-bottom: 1px solid var(--color-border-light);
    }

    .nav-link.active::after {
        display: none;
    }

    .hamburger span:nth-child(1) {
        transform: rotate(0);
    }

    .hamburger span:nth-child(2) {
        opacity: 1;
    }

    .hamburger span:nth-child(3) {
        transform: rotate(0);
    }

    .mobile-menu-toggle[aria-expanded="true"] .hamburger span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-toggle[aria-expanded="true"] .hamburger span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle[aria-expanded="true"] .hamburger span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .footer-columns {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    :root {
        --space-lg: 1rem;
        --space-xl: 1.5rem;
        --space-2xl: 2rem;
    }

    .breadcrumb {
        font-size: 0.8rem;
    }
}

/* ========================================
   Print Styles
======================================== */
@media print {

    .site-header,
    .site-footer,
    .mobile-menu-toggle {
        display: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    .container {
        max-width: 100%;
    }
}

/* ========================================
   Mobile App Interface Styles
   ======================================== */

/* Quick Access Grid */
.quick-access-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    margin-top: -30px;
    /* Overlap hero */
    position: relative;
    z-index: 10;
    box-shadow: var(--shadow-lg);
    margin-left: var(--space-md);
    margin-right: var(--space-md);
}

.quick-access-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-xs);
    color: var(--color-text);
    font-size: 0.75rem;
    font-weight: 500;
}

.quick-access-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast);
}

.quick-access-item:hover .quick-access-icon {
    transform: translateY(-2px);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
}

/* Game Category Grid */
.game-grid-section {
    padding: var(--space-xl) 0;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    padding: 0 var(--space-md);
}

.game-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 16/10;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-base);
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.game-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.game-card:hover img {
    transform: scale(1.1);
}

.game-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.95);
    background-color: #ffffff;
    color: #000000;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.game-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    color: #000000;
    text-shadow: none;
}

/* Notification Ticker */
.notice-bar {
    background: var(--color-bg-alt);
    padding: var(--space-xs) 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.notice-icon {
    padding-left: var(--space-md);
    color: var(--color-accent);
}

.notice-marquee {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.notice-content {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%;
    animation: marquee 60s linear infinite;
    /* Slowed down for readability */
}

@keyframes marquee {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .hero-fullwidth {
        min-height: 200px;
        padding: var(--space-xl) 0;
        align-items: flex-end;
    }

    .hero-bg-image {
        height: 100%;
    }

    .hero-content-right {
        padding: var(--space-md);
        text-align: center;
        width: 100%;
    }

    .hero-title {
        font-size: 1.5rem !important;
    }

    .hero-subtitle {
        display: none;
    }

    .hero-actions {
        display: none;
        /* Hide default buttons on mobile hero, rely on quick access */
    }

    .container {
        padding: 0 var(--space-sm);
    }
}

/* ========================================
   Content Page Styles (App Style)
   ======================================== */

/* Page Background with Mesh Gradient */
.page-content {
    background-color: var(--color-bg-alt);
    background-image:
        radial-gradient(at 0% 0%, rgba(56, 189, 248, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(236, 72, 153, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(56, 189, 248, 0.1) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(236, 72, 153, 0.05) 0px, transparent 50%);
    min-height: 100vh;
}

.page-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: var(--space-sm) var(--space-md);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.page-header h1 {
    font-size: 1.1rem;
    margin: 0;
    color: var(--color-text);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 700;
}

.back-button {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    color: var(--color-text);
    font-size: 1.2rem;
    transition: all var(--transition-fast);
    text-decoration: none;
    border: 1px solid var(--color-border-light);
}

.back-button:hover {
    transform: translateX(-2px);
    box-shadow: var(--shadow-sm);
}

.content-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid white;
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin: var(--space-md) 0 var(--space-xl);
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.content-body h2 {
    font-size: 1.5rem;
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
    background: linear-gradient(135deg, var(--color-primary) 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    border-left: none;
    padding-left: 0;
    position: relative;
    padding-bottom: 12px;
}

.content-body h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, var(--color-primary), #60a5fa);
    border-radius: 2px;
}

.content-body h3 {
    font-size: 1.1rem;
    margin-top: var(--space-lg);
    margin-bottom: var(--space-sm);
    color: var(--color-text);
}

.content-body p,
.content-body ul,
.content-body ol {
    margin-bottom: var(--space-md);
    line-height: 1.6;
    color: var(--color-text);
}

.content-body ul {
    list-style-type: none;
    padding-left: 0;
}

.content-body ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.content-body ul li::before {
    content: "•";
    color: var(--color-primary);
    font-weight: bold;
    position: absolute;
    left: 0;
}

@media (max-width: 480px) {
    .content-card {
        padding: var(--space-md);
        margin: var(--space-sm) 0 var(--space-lg);
        border-radius: var(--radius-md);
    }
}

/* Guides Section Scroll */
.guides-scroll {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.guides-scroll::-webkit-scrollbar {
    display: none;
}