/* ============================================
   Elemental War: Strategy Battle - Official Site
   ============================================ */

/* CSS Variables */
:root {
    --primary: #6c5ce7;
    --primary-dark: #5a4bd1;
    --primary-light: #a29bfe;
    --accent: #fd79a8;
    --accent-dark: #e84393;
    --bg-dark: #0a0a1a;
    --bg-card: #12122a;
    --bg-section: #0f0f25;
    --text-primary: #ffffff;
    --text-secondary: #b0b0d0;
    --text-muted: #6c6c8a;
    --border-color: rgba(108, 92, 231, 0.2);
    --gradient-1: linear-gradient(135deg, #6c5ce7, #a29bfe);
    --gradient-2: linear-gradient(135deg, #6c5ce7, #fd79a8);
    --gradient-hero: linear-gradient(135deg, #0a0a1a 0%, #1a0a2e 50%, #0a0a1a 100%);
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Orbitron', 'Inter', sans-serif;
    --max-width: 1200px;
    --nav-height: 72px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* ============================================
   Navigation
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(10, 10, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
}

.logo-icon {
    font-size: 1.5rem;
}

.logo-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width 0.3s ease;
}

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

.nav-links a:hover::after {
    width: 100%;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: var(--gradient-hero);
    overflow: hidden;
    padding-top: var(--nav-height);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(108, 92, 231, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(253, 121, 168, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(162, 155, 254, 0.08) 0%, transparent 40%);
    animation: bgPulse 8s ease-in-out infinite alternate;
}

@keyframes bgPulse {
    0% { opacity: 0.6; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.05); }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 0;
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    border: 1px solid var(--primary);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--primary-light);
    margin-bottom: 32px;
    animation: fadeInUp 0.8s ease;
}

.hero-title {
    margin-bottom: 24px;
    animation: fadeInUp 0.8s ease 0.1s both;
}

.title-line {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 900;
    line-height: 1.1;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.title-sub {
    display: block;
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: 300;
    color: var(--text-secondary);
    margin-top: 8px;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.hero-desc {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto 40px;
    line-height: 1.8;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.3s both;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient-1);
    color: #fff;
    box-shadow: 0 4px 20px rgba(108, 92, 231, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(108, 92, 231, 0.6);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--primary);
    background: rgba(108, 92, 231, 0.1);
}

.btn-large {
    padding: 18px 40px;
    font-size: 1.1rem;
}

.app-icon {
    flex-shrink: 0;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 60px;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

/* ============================================
   Section Shared Styles
   ============================================ */

section {
    padding: 100px 0;
}

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

.section-header.left {
    text-align: left;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 12px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto;
}

.section-header.left p {
    margin: 0;
}

/* ============================================
   Features Section
   ============================================ */

.features {
    background: var(--bg-section);
    position: relative;
}

.features::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 36px 28px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-1);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 20px 60px rgba(108, 92, 231, 0.15);
}

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

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

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

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

/* ============================================
   How It Works Section
   ============================================ */

.how-it-works {
    position: relative;
}

.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    position: relative;
}

.step {
    text-align: center;
    padding: 0 20px;
    position: relative;
}

.step-number {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 900;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.3;
    margin-bottom: 16px;
    line-height: 1;
}

.step h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.step p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.step-connector {
    display: none;
}

/* ============================================
   About Section
   ============================================ */

.about {
    background: var(--bg-section);
    position: relative;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 1rem;
    line-height: 1.8;
}

.about-list {
    list-style: none;
    margin-top: 24px;
}

.about-list li {
    padding: 10px 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border-color);
}

.about-list li:last-child {
    border-bottom: none;
}

/* Card Showcase */
.about-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.card-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 320px;
}

.card-item {
    width: 130px;
    height: 180px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    transition: all 0.4s ease;
    cursor: default;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.card-item:hover {
    transform: translateY(-12px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card-fire {
    border-color: #e74c3c;
    box-shadow: 0 4px 20px rgba(231, 76, 60, 0.2);
}
.card-fire:hover {
    box-shadow: 0 20px 40px rgba(231, 76, 60, 0.3);
}

.card-water {
    border-color: #3498db;
    box-shadow: 0 4px 20px rgba(52, 152, 219, 0.2);
}
.card-water:hover {
    box-shadow: 0 20px 40px rgba(52, 152, 219, 0.3);
}

.card-earth {
    border-color: #2ecc71;
    box-shadow: 0 4px 20px rgba(46, 204, 113, 0.2);
}
.card-earth:hover {
    box-shadow: 0 20px 40px rgba(46, 204, 113, 0.3);
}

.card-air {
    border-color: #f39c12;
    box-shadow: 0 4px 20px rgba(243, 156, 18, 0.2);
}
.card-air:hover {
    box-shadow: 0 20px 40px rgba(243, 156, 18, 0.3);
}

/* ============================================
   Download Section
   ============================================ */

.download {
    text-align: center;
    position: relative;
    overflow: hidden;
}

.download::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at center, rgba(108, 92, 231, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.download-content {
    position: relative;
    z-index: 1;
}

.download-content h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 16px;
}

.download-content > p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.download-note {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 20px;
}

/* ============================================
   Footer
   ============================================ */

.footer {
    border-top: 1px solid var(--border-color);
    padding: 40px 0 24px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

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

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

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

/* ============================================
   Animations
   ============================================ */

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

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

@media (max-width: 1024px) {
    .steps {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-visual {
        order: -1;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: rgba(10, 10, 26, 0.98);
        flex-direction: column;
        padding: 24px;
        gap: 16px;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero-stats {
        gap: 24px;
        flex-wrap: wrap;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .steps {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    section {
        padding: 60px 0;
    }

    .footer-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        justify-content: center;
    }

    .hero-stats {
        gap: 16px;
    }

    .stat-value {
        font-size: 1.2rem;
    }

    .card-showcase {
        gap: 12px;
    }

    .card-item {
        width: 100px;
        height: 140px;
        font-size: 2.5rem;
    }
}
