:root {
    --bg-dark: #130E26;
    --bg-light-dark: #1F1936;
    --bg-deep-space: #0F0A1F;
    --primary-gold: #DDBC4D;
    --primary-gold-rgb: 221, 188, 77;
    --sage-white: #E0E5D5;
    --sage-white-rgb: 224, 229, 213;
    --glow-color: rgba(221, 188, 77, 0.4);
    --glass-bg: rgba(31, 25, 54, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --error-red: #EF4444;
    --success-green: #10B981;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-dark);
    color: var(--sage-white);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

h1,
h2,
h3,
h4,
.font-outfit {
    font-family: 'Outfit', sans-serif;
}

/* --- Starry Background Canvas --- */
#starry-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(circle at center, var(--bg-light-dark) 0%, var(--bg-deep-space) 100%);
}

/* --- Main Layout --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Header --- */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
    border-bottom: 1px solid var(--glass-border);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
}

.logo-img {
    height: 72px;
    width: auto;
    filter: drop-shadow(0 0 15px rgba(var(--primary-gold-rgb), 0.35));
    transition: transform 0.3s ease;
}

.logo-container:hover .logo-img {
    transform: scale(1.05);
}

.nav-link {
    color: var(--sage-white);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-gold);
    border-color: var(--primary-gold);
    background: rgba(var(--primary-gold-rgb), 0.05);
}

/* --- Main Hero Content --- */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 40px 0 60px;
    text-align: center;
}

.hero-text {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.hero-badge {
    align-self: center;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(var(--primary-gold-rgb), 0.1);
    border: 1px solid rgba(var(--primary-gold-rgb), 0.3);
    color: var(--primary-gold);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: 4px;
    color: #FFF;
    background: linear-gradient(180deg, #FFFFFF 0%, #C4CBD6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.3)) drop-shadow(0 0 15px rgba(var(--primary-gold-rgb), 0.4));
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.4rem);
    line-height: 1.6;
    color: rgba(var(--sage-white-rgb), 0.8);
    max-width: 800px;
    margin: 0 auto;
}

.play-badges-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
    border-top: 1px solid var(--glass-border);
    padding-top: 2rem;
    max-width: 800px;
    width: 100%;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.3)) drop-shadow(0 0 15px rgba(var(--primary-gold-rgb), 0.4));
}

@media (max-width: 968px) {
    .play-badges-row {
        justify-content: center;
    }
}

.play-badge-link {
    transition: transform 0.2s ease, filter 0.2s ease;
}

.play-badge-link:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 15px rgba(var(--primary-gold-rgb), 0.2));
}

.play-badge-img {
    height: 48px;
    display: block;
}

/* --- Game Container & Interactive Canvas --- */
.game-container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    transition: border-color 0.3s ease;
}

.game-title-row {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 12px;
}

.game-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--sage-white);
    letter-spacing: 0.5px;
}

.game-difficulty {
    background: rgba(16, 185, 129, 0.15);
    color: #34D399;
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.canvas-wrapper {
    width: 100%;
    aspect-ratio: 1;
    background: rgba(0, 0, 0, 0.2);
    /* border-radius: 16px; */
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.game-canvas {
    max-width: 100%;
    max-height: 100%;
    display: block;
    cursor: pointer;
}

.game-controls {
    width: 100%;
    display: flex;
    gap: 12px;
}

.btn {
    flex: 1;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 18px;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-gold);
    color: #130E26;
    box-shadow: 0 0 20px rgba(var(--primary-gold-rgb), 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(var(--primary-gold-rgb), 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    color: var(--sage-white);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.game-status-box {
    width: 100%;
    font-size: 0.82rem;
    line-height: 1.4;
    text-align: center;
    color: rgba(var(--sage-white-rgb), 0.7);
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Victory Overlay Modal --- */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 10, 31, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    padding: 20px;
}

.overlay.active {
    display: flex;
    opacity: 1;
}

.victory-card {
    background: radial-gradient(circle at top, var(--bg-light-dark) 0%, var(--bg-deep-space) 100%);
    border: 1px solid rgba(var(--primary-gold-rgb), 0.3);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 480px;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(var(--primary-gold-rgb), 0.15);
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.overlay.active .victory-card {
    transform: scale(1);
}

.victory-icon {
    font-size: 3rem;
    filter: drop-shadow(0 0 10px rgba(var(--primary-gold-rgb), 0.5));
    animation: bounce 2s infinite ease-in-out;
}

.victory-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #FFF;
    background: var(--gold-gradient);
    letter-spacing: 0.5px;
}

.victory-desc {
    font-size: 0.95rem;
    line-height: 1.5;
    color: rgba(var(--sage-white-rgb), 0.85);
}

.victory-badge {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34D399;
    padding: 8px 16px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    display: inline-block;
}

/* --- Features Section (3 Cards) --- */
.features-section {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding: 60px 0 40px;
}

.features-label {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: #FFF;
    text-align: center;
    letter-spacing: 0.5px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

.feature-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--primary-gold-rgb), 0.3);
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-gold);
}

.feature-icon svg {
    width: 28px;
    height: 28px;
    display: block;
}

.feature-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #FFF;
    letter-spacing: 0.3px;
}

.feature-desc {
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(var(--sage-white-rgb), 0.75);
}

.feature-stat {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(var(--sage-white-rgb), 0.5);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-divider {
    color: rgba(var(--sage-white-rgb), 0.2);
}

.stat-green {
    color: #34D399;
}

.stat-gold {
    color: var(--primary-gold);
}

.stat-glow {
    color: #A78BFA;
}

/* --- Hero Rules --- */
.hero-rules {
    font-size: clamp(0.9rem, 1.8vw, 1.15rem);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 20px 24px;
    max-width: 650px;
}

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

/* --- Pricing Comparison --- */
.pricing-note {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.pricing-card {
    background: rgba(var(--primary-gold-rgb), 0.05);
    border: 1px solid rgba(var(--primary-gold-rgb), 0.2);
    border-radius: 20px;
    padding: 24px 28px;
    text-align: center;
}

.pricing-label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(var(--sage-white-rgb), 0.4);
    margin-bottom: 12px;
}

.pricing-comparison {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.pricing-bad {
    font-size: 0.95rem;
    color: rgba(var(--sage-white-rgb), 0.5);
    text-decoration: line-through;
    text-decoration-color: rgba(239, 68, 68, 0.4);
}

.pricing-vs {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.pricing-good {
    font-size: 1rem;
    color: #FFF;
}

/* --- Download CTA Section --- */
.download-section {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    padding: 20px 0 40px;
}

.download-card {
    background: radial-gradient(circle at top, rgba(221, 188, 77, 0.06) 0%, transparent 70%);
    border: 1px solid rgba(var(--primary-gold-rgb), 0.25);
    border-radius: 28px;
    padding: 44px 36px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(var(--primary-gold-rgb), 0.05);
}

.download-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    color: #FFF;
    letter-spacing: 0.5px;
}

.download-desc {
    font-size: 1rem;
    line-height: 1.7;
    color: rgba(var(--sage-white-rgb), 0.8);
    max-width: 550px;
}

.download-footnote {
    font-size: 0.85rem;
    color: rgba(var(--sage-white-rgb), 0.5);
    margin-top: 4px;
}

/* --- Language Switcher --- */
.lang-switcher {
    display: flex;
    align-items: center;
}

.lang-switcher select {
    background: rgba(255, 255, 255, 0.03);
    color: var(--sage-white);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 8px 28px 8px 16px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: border-color 0.3s ease, background 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23E0E5D5' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.lang-switcher select:hover {
    color: var(--primary-gold);
    border-color: var(--primary-gold);
    background-color: rgba(var(--primary-gold-rgb), 0.05);
}

.lang-switcher select option {
    background: var(--bg-light-dark);
    color: var(--sage-white);
}

/* --- Footer --- */
footer {
    padding: 24px 0;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(var(--sage-white-rgb), 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

/* --- Keyframe Animations --- */
@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.8;
    }
}