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

:root {
    --bg-gradient-start: #1e3c72;
    --bg-gradient-end: #2a5298;
    --panel-bg: rgba(0, 0, 0, 0.3);
    --panel-strong: rgba(0, 0, 0, 0.38);
    --card-bg: rgba(255, 255, 255, 0.1);
    --card-border: rgba(255, 255, 255, 0.2);
    --text-primary: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.78);
    --brand: #667eea;
    --brand-hover: #5568d3;
    --success: #4CAF50;
    --accent: #e94560;
    --radius-lg: 14px;
    --radius-md: 10px;
    --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.28);
    --shadow-strong: 0 20px 60px rgba(0, 0, 0, 0.35);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--panel-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
}

nav,
.hero,
.features,
.community-content,
.games,
.cta-content,
.footer-content,
.footer-bottom {
    width: min(1200px, calc(100% - 2rem));
    margin: 0 auto;
}

nav {
    min-height: 74px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.35rem;
}

.dart-icon {
    font-size: 1.8rem;
}

.logo-text {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.35);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    transition: 0.25s ease;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.12);
}

.lang-switcher-wrap {
    position: relative;
}

.lang-button {
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-radius: 999px;
    padding: 0.4rem 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    font-weight: 700;
}

.lang-button:hover {
    background: rgba(255, 255, 255, 0.16);
}

.lang-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    list-style: none;
    min-width: 170px;
    padding: 0.35rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(21, 27, 47, 0.95);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
    display: none;
    z-index: 1200;
}

.lang-menu.active {
    display: block;
}

.lang-option {
    width: 100%;
    border: none;
    background: transparent;
    color: #fff;
    border-radius: 8px;
    padding: 0.45rem 0.55rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    text-align: left;
}

.lang-option:hover {
    background: rgba(255, 255, 255, 0.14);
}

.btn-nav {
    border: 1px solid rgba(102, 126, 234, 0.55);
    background: rgba(102, 126, 234, 0.25);
    font-weight: 700;
}

.btn-nav:hover {
    background: rgba(102, 126, 234, 0.38);
    transform: translateY(-1px);
}

.hero,
.features,
.community,
.games,
.cta {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.hero {
    min-height: calc(100vh - 74px);
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    gap: 2rem;
}

.hero-content,
.community-content,
.cta-content {
    background: var(--panel-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-soft);
}

.hero h1 {
    font-size: clamp(2rem, 4.7vw, 3.25rem);
    line-height: 1.15;
    margin-bottom: 0.8rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.35);
}

.highlight {
    color: #ffd86b;
}

.tagline {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.btn {
    display: inline-block;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.85rem 1.2rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
}

.btn-primary {
    background: var(--brand);
    color: #fff;
}

.btn-primary:hover {
    background: var(--brand-hover);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.hero-animation {
    display: flex;
    justify-content: center;
}

.hero-dart-demo {
    width: min(460px, 92vw);
    display: grid;
    gap: 0.8rem;
    justify-items: center;
}

.hero-dartboard-host {
    width: min(440px, 92vw);
    aspect-ratio: 1;
    background: radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.12), rgba(0, 0, 0, 0.26));
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-strong);
    padding: 0.4rem;
}

.hero-dartboard-host .rtc-dartboard-container {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
}

.hero-dartboard-host .rtc-dartboard-svg {
    width: 100%;
    height: 100%;
}

.hero-shot-status {
    width: 100%;
    max-width: 420px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    padding: 0.7rem 0.9rem;
    text-align: center;
}

.hero-shot-title {
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ffd86b;
    font-weight: 700;
}

.hero-shot-text {
    font-size: 1rem;
    color: #ffffff;
    font-weight: 700;
}

.hero-dart-travel {
    transform-box: fill-box;
    transform-origin: center;
    opacity: 1;
}

.hero-dart-flight {
    stroke: #ff2d2d;
    stroke-width: 3;
    stroke-linecap: round;
    filter: drop-shadow(0 0 6px rgba(255, 45, 45, 0.95));
}

.hero-dart-hit {
    animation: heroHitPulse 420ms ease-out;
}

.hero-dart-mark {
    fill: rgba(255, 45, 45, 0.34);
    stroke: #ff2d2d;
    stroke-width: 1.6;
    filter: drop-shadow(0 0 6px rgba(255, 45, 45, 0.95));
}

.rtc-current-segment {
    filter: drop-shadow(0 0 8px rgba(0, 206, 209, 0.95));
}

.rtc-current-number {
    text-shadow: 0 0 8px rgba(0, 206, 209, 0.95);
}

@keyframes heroHitPulse {
    0% {
        opacity: 0.2;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.65;
    }
}

.features h2,
.games h2,
.community h2,
.cta h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    margin-bottom: 1.4rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.25);
}

.feature-grid,
.community-stats,
.games-grid,
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.feature-card,
.stat-card,
.game-card,
.footer-section {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.feature-card:hover,
.stat-card:hover,
.game-card:hover {
    transform: translateY(-4px);
    border-color: rgba(102, 126, 234, 0.85);
    background: rgba(255, 255, 255, 0.14);
}

.feature-icon,
.game-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.feature-card h3,
.game-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.45rem;
}

.feature-card p,
.game-card p,
.community p,
.stat-label,
.form-note,
.footer-section p,
.footer-section a,
.cta p {
    color: var(--text-muted);
}

.community {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.18) 100%);
}

.community-content,
.cta-content {
    text-align: center;
}

.stat-number {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 800;
    color: #ffd86b;
    line-height: 1.1;
}

.game-link {
    color: #e6ecff;
    font-weight: 700;
    text-decoration: none;
}

.game-link:hover {
    color: #ffd86b;
}

.signup-form {
    margin-top: 1rem;
    display: flex;
    gap: 0.65rem;
    justify-content: center;
    flex-wrap: wrap;
}

.signup-form input {
    width: min(440px, 100%);
    padding: 0.82rem 0.95rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: var(--panel-strong);
    color: #fff;
    font-size: 1rem;
}

.signup-form input::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.signup-form input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.24);
}

footer {
    margin-top: 1rem;
    padding: 0 0 2rem;
}

.footer-section h4 {
    margin-bottom: 0.8rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li + li {
    margin-top: 0.35rem;
}

.footer-section a {
    text-decoration: none;
}

.footer-section a:hover {
    color: #fff;
}

.footer-bottom {
    margin-top: 1rem;
    text-align: center;
    padding: 1rem;
    border-radius: var(--radius-md);
    background: var(--panel-bg);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--text-muted);
}

@media (max-width: 960px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .hero-animation {
        order: -1;
    }

    .nav-links {
        gap: 0.2rem;
        flex-wrap: wrap;
        justify-content: flex-end;
    }
}

@media (max-width: 640px) {
    nav {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.7rem 0;
    }

    .nav-links {
        width: 100%;
        justify-content: flex-start;
    }

    .hero,
    .features,
    .community,
    .games,
    .cta {
        padding-top: 2.2rem;
        padding-bottom: 2.2rem;
    }

    .hero-content,
    .community-content,
    .cta-content {
        padding: 1.2rem;
    }
}
