:root {
    --bg: #0f1724;
    --card: #0b1220;
    --accent: #ff6b6b;
    --muted: #94a3b8;
    --glass: rgba(255, 255, 255, 0.03);
    --radius: 16px;
    --max: 1100px;
    --gap: 24px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI",
        Roboto, "Helvetica Neue", Arial;
}
* {
    box-sizing: border-box;
}
html,
body {
    height: 100%;
    margin: 0;
    background: linear-gradient(180deg, var(--bg), #081020);
    color: #e6eef8;
}
.wrap {
    max-width: var(--max);
    margin: 36px auto;
    padding: 24px;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: relative;
}
.brand {
    display: flex;
    gap: 12px;
    align-items: center;
}
.logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), #ff9a9a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #081020;
}

nav {
    display: flex;
    gap: 18px;
    align-items: center;
}
nav a {
    color: var(--muted);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 10px;
}
nav a.primary {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.03), transparent);
    color: #fff;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}
.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #e6eef8;
    border-radius: 2px;
}

.menu {
    display: none;
    position: absolute;
    top: 100%;
    z-index: 99;
    right: 0;
    background: var(--card);
    border-radius: 12px;
    padding: 12px;
    flex-direction: column;
    gap: 8px;
    width: 180px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}
.menu a {
    color: #fff;
    text-decoration: none;
    padding: 8px;
    border-radius: 8px;
}
.menu a:hover {
    background: rgba(255, 255, 255, 0.06);
}

.user-panel {
    display: none;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.04);
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
}
.user-panel img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}
.user-panel span {
    font-weight: 600;
}

.user-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card);
    border-radius: 12px;
    padding: 10px;
    flex-direction: column;
    gap: 6px;
    width: 160px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}
.user-menu a {
    color: #fff;
    text-decoration: none;
    padding: 8px;
    border-radius: 8px;
}
.user-menu a:hover {
    background: rgba(255, 255, 255, 0.06);
}

/* AUTH OVERLAY */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
    display: none;
    align-items: flex-start;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.overlay.active {
    display: flex;
    opacity: 1;
}

.auth-panel {
    background: var(--card);
    padding: 18px;
    border-radius: 0 0 var(--radius) var(--radius);
    width: 100%;
    max-width: 420px;
    margin-top: -100%;
    box-shadow: 0 6px 30px rgba(2, 6, 23, 0.6);
    transition: margin-top 0.4s ease;
    position: relative;
}
.overlay.active .auth-panel {
    margin-top: 60px;
}
.auth-panel h2 {
    margin: 0 0 12px;
    text-align: center;
}
.auth-panel form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.auth-panel input {
    padding: 10px 12px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}
.auth-panel button {
    padding: 10px 14px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--accent), #ff9a9a);
    font-weight: 600;
    color: #081020;
    cursor: pointer;
}
.auth-panel button:hover {
    opacity: 0.9;
}
.auth-close {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 20px;
    cursor: pointer;
    color: var(--muted);
}

.hero {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 32px;
    align-items: center;
    margin-top: 36px;
}
.hero-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
    padding: 28px;
    border-radius: var(--radius);
    backdrop-filter: blur(6px);
    box-shadow: 0 6px 30px rgba(2, 6, 23, 0.7);
}
.hero h1 {
    margin: 0 0 8px;
    font-size: 32px;
    letter-spacing: -0.02em;
}
.hero p {
    color: var(--muted);
    margin: 0 0 18px;
}
.cta-row {
    display: flex;
    gap: 12px;
}
.btn {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
}
.btn.primary {
    background: linear-gradient(90deg, var(--accent), #ff9a9a);
    color: #081020;
}
.btn.ghost {
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--muted);
    background: transparent;
}

.stats {
    display: flex;
    gap: 12px;
    margin-top: 18px;
}
.stat {
    background: var(--glass);
    padding: 10px;
    border-radius: 12px;
    color: var(--muted);
    min-width: 80px;
    text-align: center;
}

.right-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.card-small {
    background: var(--card);
    padding: 14px;
    border-radius: 12px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 28px;
}
.grid .card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
    padding: 18px;
    border-radius: 14px;
}

footer {
    margin-top: 40px;
    color: var(--muted);
    text-align: center;
}

@media (max-width: 980px) {
    .hero {
        grid-template-columns: 1fr;
    }
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 720px) {
    .menu-toggle {
        display: flex;
    }
    nav {
        display: none;
    }
    .grid {
        grid-template-columns: 1fr;
    }
    .logo {
        width: 40px;
        height: 40px;
    }
}
@media (max-width: 560px) {
    .wrap {
        padding: 16px;
        margin: 18px auto;
    }
    .auth-panel {
        width: 100%;
    }
}

.card:hover {
    transform: translateY(-6px);
    transition: transform 0.25s;
}
.logo,
.btn,
nav a.primary {
    transition: transform 0.18s;
}
.logo:active,
.btn:active {
    transform: scale(0.98);
}
