:root {
    --bg-dark: #050711;
    --bg-darker: #020308;
    --bg-card: #0d101f;
    --accent: #10b981;
    --accent-soft: rgba(16, 185, 129, 0.15);
    --text-main: #f9fafb;
    --text-muted: #9ca3af;
    --border-subtle: rgba(156, 163, 175, 0.3);
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.55);
    --shadow-subtle: 0 10px 28px rgba(0, 0, 0, 0.45);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #1f2937 0, #020308 45%, #000 100%);
    color: var(--text-main);
    scroll-behavior: smooth;
}

/* Layout */

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    width: 100%;
    max-width: 1420px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Navbar */

.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(16px);
    background: linear-gradient(to bottom, rgba(2,6,23,0.95), rgba(2,6,23,0.7));
    border-bottom: 1px solid rgba(55,65,81,0.5);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1.05rem;
}

.logo-icon {
    font-size: 1.3rem;
    width: 50px;
    border-radius: 50px;
}

.logo-text {
    letter-spacing: 0.03em;
}

.nav-links {
    display: flex;
    gap: 1.25rem;
    font-size: 0.95rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    position: relative;
    padding-bottom: 0.1rem;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.25rem;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.18s ease;
}

.nav-links a:hover {
    color: var(--text-main);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(156,163,175,0.5);
    border-radius: 999px;
    color: var(--text-main);
    padding: 0.3rem 0.8rem;
    font-size: 1.1rem;
}

/* Hero */

.hero {
    position: relative;
    min-height: 78vh;
    display: flex;
    align-items: center;
    padding: 4.5rem 0 4rem;
    background-image: radial-gradient(circle at top, rgba(16,185,129,0.25), transparent 55%);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("../img/bg.jpg");
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    mix-blend-mode: screen;
    pointer-events: none;
}

.overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top, rgba(16,185,129,0.18), transparent 60%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-text {
    max-width: 640px;
}

.hero h1 {
    font-size: clamp(2.4rem, 3vw + 1.4rem, 3.3rem);
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero h1 span {
    color: var(--accent);
    text-shadow: 0 0 18px rgba(16,185,129,0.35);
}

.hero p {
    color: var(--text-muted);
    font-size: 1.02rem;
    max-width: 520px;
}

/* Buttons & IP Box */

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1.8rem 0 1.2rem;
    align-items: center;
}

.btn-primary,
.btn-secondary {
    border-radius: 999px;
    border: none;
    padding: 0.8rem 1.4rem;
    font-size: 0.97rem;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.btn-primary {
    background: linear-gradient(90deg, #22c55e, #14b8a6);
    color: #020617;
    box-shadow: 0 12px 30px rgba(16,185,129,0.45);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 40px rgba(16,185,129,0.55);
}

.btn-secondary {
    background: rgba(15,23,42,0.85);
    color: var(--text-main);
    border: 1px solid rgba(148,163,184,0.6);
    box-shadow: 0 12px 30px rgba(15,23,42,0.7);
}

.btn-secondary:hover {
    background: rgba(15,23,42,1);
    transform: translateY(-1px);
}

.btn-primary.disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

.ip-box {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    padding: 0.7rem 0.9rem;
    border-radius: 999px;
    background: rgba(15,23,42,0.9);
    border: 1px solid rgba(148,163,184,0.6);
    box-shadow: var(--shadow-soft);
}

.ip-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    color: var(--text-muted);
}

.ip-address {
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.92rem;
    background: rgba(15,23,42,0.85);
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(55,65,81,0.8);
}

.copy-feedback {
    font-size: 0.8rem;
    color: var(--accent);
}

/* Status */

.status-box {
    display: inline-flex;
    gap: 0.45rem;
    align-items: center;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background: rgba(15,23,42,0.85);
    border: 1px dashed rgba(55,65,81,0.8);
    margin-top: 0.8rem;
    font-size: 0.84rem;
    color: var(--text-muted);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #f97316;
    box-shadow: 0 0 0 4px rgba(248,113,113,0.15);
}

.status-offline {
    background: #f97316;
}

.status-online {
    background: #22c55e;
}

/* Sections */

.section {
    padding: 4rem 0;
}

.section-alt {
    background: radial-gradient(circle at top, rgba(15,23,42,0.9), rgba(2,6,23,1));
}

.section h2 {
    font-size: 1.8rem;
    margin-bottom: 0.4rem;
}

.section-subtitle {
    color: var(--text-muted);
    max-width: 600px;
}

/* Grid */

.grid {
    display: grid;
    gap: 1.3rem;
}

.features-grid {
    margin-top: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

/* Cards */

.card {
    background: linear-gradient(145deg, rgba(15,23,42,0.95), rgba(15,23,42,0.85));
    border-radius: var(--radius-lg);
    border: 1px solid rgba(55,65,81,0.9);
    padding: 1.4rem 1.5rem;
    box-shadow: var(--shadow-subtle);
}

.card h3 {
    margin-top: 0;
    margin-bottom: 0.45rem;
    font-size: 1.1rem;
}

.card p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Join section */

.join-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.1fr);
    gap: 2rem;
    align-items: flex-start;
}

.steps-list {
    margin: 1.2rem 0 0.5rem;
    padding-left: 1.2rem;
    color: var(--text-muted);
    font-size: 0.96rem;
}

.steps-list li + li {
    margin-top: 0.4rem;
}

.hint-text {
    margin-top: 0.7rem;
    font-size: 0.86rem;
    color: var(--text-muted);
}

.hint-text.small {
    font-size: 0.8rem;
}

.join-card {
    background: linear-gradient(145deg, rgba(15,23,42,0.98), rgba(15,23,42,0.85));
    border-radius: var(--radius-xl);
    border: 1px solid rgba(55,65,81,1);
    padding: 1.5rem 1.6rem;
    box-shadow: var(--shadow-soft);
}

.join-card h3 {
    margin-top: 0;
    margin-bottom: 0.8rem;
}

.join-card ul {
    padding-left: 1.1rem;
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.join-card li + li {
    margin-top: 0.3rem;
}

/* Rules */

.rules-grid {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.3rem;
}

/* Contact */

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.2fr);
    gap: 2rem;
    align-items: flex-start;
}

.contact-grid h2 {
    margin-top: -5px;
}

.contact-list {
    margin-top: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.contact-item {
    display: flex;
    gap: 0.8rem;
    align-items: baseline;
    font-size: 0.96rem;
}

.contact-label {
    min-width: 70px;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.11em;
}

.contact-value a {
    color: var(--accent);
    text-decoration: none;
}

.contact-value a:hover {
    text-decoration: underline;
}

.contact-card {
    background: linear-gradient(145deg, rgba(15,23,42,0.98), rgba(15,23,42,0.93));
    border-radius: var(--radius-xl);
    border: 1px solid rgba(55,65,81,1);
    padding: 1.6rem;
    box-shadow: var(--shadow-soft);
}

/* Form */

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.form-group label {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.form-group input,
.form-group textarea {
    background: rgba(15,23,42,0.95);
    border-radius: 12px;
    border: 1px solid rgba(55,65,81,0.95);
    padding: 0.6rem 0.8rem;
    font-size: 0.95rem;
    color: var(--text-main);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(16,185,129,0.4);
}

/* Footer */

.footer {
    border-top: 1px solid rgba(55,65,81,0.8);
    background: rgba(2,6,23,0.96);
    padding: 1rem 0;
    margin-top: 2rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 1rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--text-main);
}

/* Responsive */

@media (max-width: 860px) {
    .nav-links {
        position: absolute;
        top: 100%;
        right: 1.5rem;
        background: rgba(15,23,42,0.98);
        border-radius: 16px;
        border: 1px solid rgba(55,65,81,0.9);
        padding: 0.75rem 1rem;
        flex-direction: column;
        gap: 0.6rem;
        margin-top: 0.4rem;
        box-shadow: var(--shadow-soft);
        transform-origin: top right;
        transform: scale(0.9);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.14s ease, transform 0.14s ease;
    }

    .nav-links.show {
        opacity: 1;
        pointer-events: all;
        transform: scale(1);
    }

    .nav-toggle {
        display: inline-flex;
    }
}

@media (max-width: 800px) {
    .hero {
        padding-top: 3.6rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .join-grid,
    .contact-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
}

@media (max-width: 480px) {
    .ip-box {
        border-radius: 18px;
        flex-direction: column;
        align-items: flex-start;
    }
}
