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

:root {
    /* Color Palette */
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --primary-dark: #3730a3;
    --secondary-color: #ec4899;
    --secondary-hover: #db2777;
    --accent-color: #f59e0b;
    --background-dark: #0f172a;
    --background-light: #1e293b;
    --background-card: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #475569;
    --success-color: #10b981;
    --error-color: #ef4444;
    
    /* Typography */
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing */
    --container-width: 1200px;
    --section-padding: 80px 20px;
    --card-padding: 30px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.4);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

/* ===================================
   Header Styles
   =================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.site-name {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.1);
}

.nav-link.cta-link {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-weight: 600;
    padding: 10px 24px;
}

.nav-link.cta-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.nav-link.lang-link {
    padding: 8px 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-link.lang-link:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: var(--transition-fast);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ===================================
   Game Section Styles
   =================================== */
.game-section {
    margin-top: 70px;
    padding: 40px 20px;
    background: var(--background-dark);
}

.game-container {
    max-width: 1400px;
    margin: 0 auto;
}

.game-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.game-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Loading Screen */
.loading-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--background-dark), var(--background-light));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(99, 102, 241, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.loading-tip {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Error Screen */
.error-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.error-content {
    text-align: center;
    padding: 30px;
}

.error-content h3 {
    font-size: 1.8rem;
    color: var(--error-color);
    margin-bottom: 15px;
}

.error-content p {
    color: var(--text-secondary);
    margin-bottom: 25px;
}

.retry-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.retry-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Fullscreen Button */
.fullscreen-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    z-index: 5;
}

.fullscreen-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: var(--primary-color);
    transform: scale(1.1);
}

/* ===================================
   Content Area Styles
   =================================== */
.content-area {
    background: var(--background-dark);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hero Section */
.hero-section {
    padding: var(--section-padding);
    text-align: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(236, 72, 153, 0.1));
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 25px;
    line-height: 1.2;
}

.hero-description {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 900px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    padding: 14px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 10px;
    transition: var(--transition-fast);
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

/* Features Section */
.features-section {
    padding: var(--section-padding);
    background: var(--background-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.feature-card {
    background: var(--background-card);
    padding: var(--card-padding);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.feature-card h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.features-link {
    text-align: center;
    margin-top: 30px;
}

.features-link a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: underline;
}

.features-link a:hover {
    color: var(--secondary-color);
}

/* What Is Section */
.what-is-section {
    padding: var(--section-padding);
}

.content-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

.text-column p {
    margin-bottom: 20px;
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.text-column strong {
    color: var(--text-primary);
    font-weight: 600;
}

.video-column {
    position: sticky;
    top: 90px;
}

.video-wrapper h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.video-wrapper iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 12px;
    margin-bottom: 15px;
}

.video-description {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* How To Section */
.how-to-section {
    padding: var(--section-padding);
    background: var(--background-light);
}

.how-to-content {
    max-width: 900px;
    margin: 0 auto;
}

.instructions-intro {
    text-align: center;
    margin-bottom: 50px;
}

.instructions-intro p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.instruction-block {
    background: var(--background-card);
    padding: var(--card-padding);
    border-radius: 12px;
    margin-bottom: 30px;
    border-left: 4px solid var(--primary-color);
}

.instruction-block h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.instruction-block ul,
.instruction-block ol {
    margin-left: 20px;
}

.instruction-block li {
    margin-bottom: 12px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.instruction-block strong {
    color: var(--text-primary);
    font-weight: 600;
}

.how-to-cta {
    text-align: center;
    margin-top: 40px;
    padding: 25px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 12px;
}

.how-to-cta p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.how-to-cta a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: underline;
}

.how-to-cta a:hover {
    color: var(--secondary-color);
}

/* Why Section */
.why-section {
    padding: var(--section-padding);
}

.why-intro {
    text-align: center;
    margin-bottom: 50px;
}

.why-intro p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.why-item {
    background: var(--background-card);
    padding: var(--card-padding);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.why-item h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.why-item p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.why-conclusion {
    text-align: center;
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(236, 72, 153, 0.1));
    border-radius: 12px;
}

.why-conclusion p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.why-conclusion a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: underline;
}

.why-conclusion a:hover {
    color: var(--secondary-color);
}

/* FAQ Section */
.faq-section {
    padding: var(--section-padding);
    background: var(--background-light);
}

.faq-intro {
    text-align: center;
    margin-bottom: 50px;
}

.faq-intro p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
}

.faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    transition: var(--transition-normal);
}

.faq-item:hover {
    border-color: var(--primary-color);
}

.faq-item summary {
    padding: 20px 25px;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: var(--transition-fast);
}

.faq-item[open] summary::after {
    content: '−';
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 25px 25px;
    border-top: 1px solid var(--border-color);
}

.faq-answer p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-top: 15px;
}

.faq-answer a {
    color: var(--primary-color);
    text-decoration: underline;
}

.faq-answer a:hover {
    color: var(--secondary-color);
}

.faq-cta {
    text-align: center;
    margin-top: 50px;
    padding: 30px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 12px;
}

.faq-cta p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.faq-cta a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: underline;
}

.faq-cta a:hover {
    color: var(--secondary-color);
}

/* ===================================
   Footer Styles
   =================================== */
.footer {
    background: var(--background-dark);
    border-top: 1px solid var(--border-color);
    padding: 60px 20px 30px;
}

.footer-container {
    max-width: var(--container-width);
    margin: 0 auto;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-brand p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.footer-links h4,
.footer-nav h4 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.footer-links ul,
.footer-nav ul {
    list-style: none;
}

.footer-links li,
.footer-nav li {
    margin-bottom: 10px;
}

.footer-links a,
.footer-nav a {
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

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

.data-notice {
    margin-top: 15px;
    font-size: 0.9rem;
    color: var(--success-color);
    font-weight: 500;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.lang-switch {
    margin-top: 8px;
}

.lang-switch a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
}

.lang-switch a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 968px) {
    .content-columns {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .video-column {
        position: static;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 30px 20px;
        gap: 15px;
        transform: translateX(-100%);
        transition: var(--transition-normal);
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-menu.active {
        transform: translateX(0);
    }
    
    .hamburger {
        display: flex;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .why-grid {
        grid-template-columns: 1fr;
    }
    
    .game-wrapper {
        padding-bottom: 75%; /* More vertical on mobile */
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.6rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        text-align: center;
    }
    
    .site-name {
        font-size: 1.2rem;
    }
    
    .logo-img {
        width: 32px;
        height: 32px;
    }
}

/* ===================================
   Utility Classes
   =================================== */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    .header,
    .game-section,
    .footer {
        display: none;
    }
}
