:root {
    --surface: rgba(255,255,255,0.03);
    --border: rgba(255,255,255,0.08);
    --text: #e0e0e0;
    --text-muted: #8888a0;
    --accent: #7b2ff7;
    --accent-glow: rgba(123,47,247,0.3);
    --air: #a8d5ff;
    --fire: #ff7b54;
    --water: #54d4ff;
    --earth: #8b6f47;
    --death: #9d4edd;
}

body {
    background: #0a0a14;
    color: var(--text);
    font-family: 'Oswald', 'Segoe UI', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background: url('/images/astral/back_2.png') center/cover no-repeat fixed;
    opacity: 0.30;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: rgba(10,10,20,0.92);
    backdrop-filter: blur(8px);
    z-index: 100;
    max-width: 1100px;
    margin: 0 auto;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #fff;
}

.header-logo img {
    height: 32px;
    width: auto;
}

.header-logo span {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.header-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: color 0.2s;
    text-transform: uppercase;
}

.header-nav a:hover { color: #fff; }

.hero {
    text-align: center;
    padding: 5rem 1rem 3rem;
}

@keyframes logo-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes hat-bob {
    0%, 100% { transform: rotate(10deg) translateY(0); }
    50% { transform: rotate(20deg) translateY(-10px); }
}

.hero-logo-wrapper {
    position: relative;
    display: inline-block;
    max-width: 380px;
    width: 90%;
    margin-bottom: 1.5rem;
}

.hero-hat {
    position: absolute;
    z-index: 1;
    height: 120px;
    width: auto;
    right: -30px;
    top: -79px;
    transform: rotate(20deg);
    animation: hat-bob 2.4s ease-in-out infinite;
}

.hero-logo {
    width: 100%;
    height: auto;
    display: block;
    animation: logo-float 4s ease-in-out infinite;
}

.hero-tagline {
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(0.6rem, 2vw, 0.85rem);
    color: var(--accent);
    letter-spacing: 2px;
    margin-bottom: 1.2rem;
    line-height: 1.5;
}

.hero-desc {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.cta-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 2rem;
    border-radius: 4px;
    text-decoration: none;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.6rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.25s ease;
    border: 2px solid transparent;
    position: relative;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 20px var(--accent-glow);
    border-color: var(--accent);
}

.btn-primary:hover {
    background: transparent;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--accent-glow);
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,0.25);
}

.btn-secondary:hover {
    border-color: #fff;
    background: rgba(255,255,255,0.05);
    transform: translateY(-2px);
}

.btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.stats-bar {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

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

.stat-number {
    font-family: 'Press Start 2P', monospace;
    font-size: 1.6rem;
    color: var(--accent);
    margin-bottom: 0.3rem;
}

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

section {
    padding: 4rem 0;
}

.section-title {
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(1rem, 3vw, 1.4rem);
    text-align: center;
    letter-spacing: 2px;
    color: #fff;
    margin-bottom: 3rem;
    line-height: 1.5;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.feature-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    position: relative;
}

.feature-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.feature-title {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.65rem;
    margin-bottom: 0.7rem;
    color: #fff;
    letter-spacing: 1px;
    line-height: 1.4;
}

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

.elements-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

.element-card {
    background: var(--surface);
    border-radius: 8px;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all 0.3s ease;
    border-top: 4px solid;
    z-index: 1;
}

.element-fire { border-color: var(--fire); }
.element-water { border-color: var(--water); }
.element-air { border-color: var(--air); }
.element-earth { border-color: var(--earth); }
.element-death { border-color: var(--death); }

.element-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 0.5rem;
    display: block;
}

.element-card-visual {
    position: relative;
    width: 104px;
    height: 134px;
    margin: 0.5rem auto;
    transition: transform 0.3s ease;
}

.element-card:nth-child(1):hover .element-card-visual { transform: scale(1.5) rotate(-4deg); z-index: 10; }
.element-card:nth-child(2):hover .element-card-visual { transform: scale(1.5) rotate(3deg); z-index: 10; }
.element-card:nth-child(3):hover .element-card-visual { transform: scale(1.5) rotate(-3deg); z-index: 10; }
.element-card:nth-child(4):hover .element-card-visual { transform: scale(1.5) rotate(5deg); z-index: 10; }
.element-card:nth-child(5):hover .element-card-visual { transform: scale(1.5) rotate(-2deg); z-index: 10; }

.card-character {
    position: absolute;
    left: 12px;
    top: 28px;
    width: 80px;
    height: 80px;
    z-index: 1;
}

.card-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.element-name {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.7rem;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    color: #fff;
}

.element-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.screenshot-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.screenshot-card:hover {
    border-color: var(--accent);
    transform: scale(1.03);
}

.screenshot-card img {
    width: 100%;
    height: auto;
    display: block;
}

.gameplay-section {
    background: linear-gradient(180deg, transparent 0%, rgba(123,47,247,0.04) 100%);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.gameplay-content {
    max-width: 800px;
    margin: 0 auto;
}

.rule-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: flex-start;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.2rem;
    transition: border-color 0.2s;
}

.rule-item:hover {
    border-color: var(--accent);
}

.rule-number {
    background: var(--accent);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.6rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.rule-text {
    color: var(--text);
    font-size: 1rem;
    line-height: 1.5;
}

.rule-text strong {
    color: #fff;
}

.cta-section {
    text-align: center;
    padding: 4rem 0;
}

.cta-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.footer {
    margin-top: 2rem;
    padding: 2rem 1.5rem;
    text-align: center;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.footer a {
    color: var(--accent);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

@media (max-width: 900px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    body { background: #0a0a14; }
    .hero { padding: 6rem 1rem 2rem; }
    .cta-group { flex-direction: column; align-items: center; }
    .btn { width: 100%; max-width: 300px; justify-content: center; }
    .stats-bar { gap: 1.5rem; }
    .features-grid { grid-template-columns: 1fr; }
    .elements-grid {
        display: flex;
        gap: 1rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        padding-bottom: 0.5rem;
    }
    .element-card {
        flex: 0 0 160px;
        scroll-snap-align: start;
    }
    .screenshots-grid {
        display: flex;
        gap: 1rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        padding-bottom: 0.5rem;
    }
    .screenshot-card {
        flex: 0 0 240px;
        scroll-snap-align: start;
    }
}
