:root {
    --bg: #0a0d18;
    --bg-soft: #12182a;
    --panel: rgba(12, 18, 34, 0.78);
    --panel-strong: rgba(8, 12, 24, 0.9);
    --line: rgba(135, 159, 255, 0.16);
    --text: #f3f5fb;
    --muted: #a6b0cf;
    --accent: #63d2ff;
    --accent-warm: #ff845b;
    --success: #42d392;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    font-family: "Manrope", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(99, 210, 255, 0.18), transparent 30%),
        radial-gradient(circle at 85% 10%, rgba(255, 132, 91, 0.16), transparent 26%),
        linear-gradient(180deg, #05070d 0%, #091020 40%, #070c18 100%);
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
    opacity: 0.5;
}

a {
    color: inherit;
    text-decoration: none;
}

.page-shell {
    position: relative;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding-bottom: 72px;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 0 18px;
}

.header-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(99, 210, 255, 0.95), rgba(90, 108, 255, 0.92));
    color: #05111f;
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
}

.brand-logo {
    width: 48px;
    height: 48px;
    border-radius: 15px;
    object-fit: cover;
    display: block;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.brand-copy {
    display: flex;
    flex-direction: column;
}

.brand-copy strong {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.05rem;
}

.brand-copy small {
    color: var(--muted);
    font-size: 0.82rem;
}

.site-nav {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    color: var(--muted);
}

.language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
}

.language-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 800;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.language-link:hover {
    color: var(--text);
    transform: translateY(-1px);
}

.language-link.is-active {
    color: #06111f;
    background: linear-gradient(135deg, rgba(99, 210, 255, 0.98), rgba(90, 108, 255, 0.92));
}

.site-nav a:hover {
    color: var(--text);
}

.nav-pill,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    padding: 13px 20px;
    font-weight: 700;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.button:hover,
.nav-pill:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.35);
}

.button.primary,
.nav-pill {
    background: linear-gradient(135deg, rgba(99, 210, 255, 0.98), rgba(90, 108, 255, 0.92));
    color: #06111f;
    border-color: transparent;
}

.button.secondary {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
}

.button.full {
    width: 100%;
}

.landing,
.dashboard-page,
.state-page {
    display: grid;
    gap: 42px;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.hero,
.dashboard-hero,
.premium-section {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
    align-items: center;
}

.hero {
    padding: 40px 0 20px;
}

.hero-copy h1,
.dashboard-hero h1,
.section-heading h2,
.state-card h1 {
    margin: 12px 0 14px;
    font-family: "Space Grotesk", sans-serif;
    line-height: 1;
    letter-spacing: -0.03em;
}

.hero-copy h1 {
    font-size: clamp(2.6rem, 6vw, 5.4rem);
    max-width: 11ch;
}

.dashboard-hero h1,
.section-heading h2,
.state-card h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
}

.hero-copy p,
.dashboard-hero p,
.section-heading + p,
.story-card p,
.feature-card p,
.premium-copy p,
.state-card p {
    color: var(--muted);
    font-size: 1.02rem;
    line-height: 1.75;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 800;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 22px;
}

.hero-metrics,
.story-layout,
.feature-grid,
.guild-grid {
    display: grid;
    gap: 18px;
}

.hero-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 28px;
}

.hero-metrics article,
.feature-card,
.story-card,
.guild-card,
.state-card,
.premium-card,
.user-chip,
.glass-panel,
.image-placeholder,
.empty-state {
    background: var(--panel);
    border: 1px solid var(--line);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.hero-metrics article,
.feature-card,
.story-card,
.guild-card,
.premium-card,
.empty-state,
.state-card {
    border-radius: 24px;
    padding: 24px;
}

.hero-metrics article span {
    color: var(--accent);
    display: block;
    font-size: 0.82rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.hero-visual {
    display: grid;
    gap: 16px;
}

.glass-panel {
    border-radius: 22px;
    padding: 20px 22px;
}

.glass-panel small,
.premium-card small,
.guild-meta small {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 800;
}

.glass-panel strong,
.premium-card strong {
    display: block;
    margin: 8px 0;
    font-size: 1.45rem;
    font-family: "Space Grotesk", sans-serif;
}

.glass-panel span,
.premium-card span,
.guild-details span {
    color: var(--muted);
    line-height: 1.6;
}

.placeholder-stack {
    display: grid;
    grid-template-columns: 1.35fr 0.95fr;
    gap: 16px;
}

.image-placeholder {
    min-height: 240px;
    border-radius: 26px;
    display: grid;
    place-items: center;
    color: var(--muted);
    background:
        linear-gradient(135deg, rgba(99, 210, 255, 0.07), rgba(255, 132, 91, 0.08)),
        rgba(8, 12, 24, 0.82);
}

.image-frame {
    overflow: hidden;
    padding: 0;
}

.hero-image {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 240px;
    object-fit: cover;
}

.image-placeholder-small {
    min-height: 240px;
}

.feature-section,
.story-section,
.premium-section {
    padding-top: 18px;
}

.section-heading {
    max-width: 760px;
}

.feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-card h3,
.story-card h3,
.guild-card h2 {
    margin: 0 0 10px;
    font-family: "Space Grotesk", sans-serif;
}

.story-layout {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.premium-section {
    padding: 40px 0 0;
}

.premium-list {
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 12px;
}

.premium-list li {
    position: relative;
    padding-left: 18px;
    color: var(--text);
}

.premium-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-warm));
}

.premium-card {
    background:
        radial-gradient(circle at top right, rgba(99, 210, 255, 0.16), transparent 36%),
        linear-gradient(180deg, rgba(14, 20, 38, 0.95), rgba(7, 10, 18, 0.92));
}

.premium-card strong {
    font-size: clamp(2rem, 4vw, 3.6rem);
}

.premium-card p {
    color: var(--muted);
    line-height: 1.7;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border-radius: 22px;
    justify-self: end;
}

.user-chip img {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    object-fit: cover;
}

.guild-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.guild-meta {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.82rem;
    white-space: nowrap;
}

.status-badge.active {
    color: var(--success);
    border-color: rgba(66, 211, 146, 0.42);
    background: rgba(66, 211, 146, 0.08);
}

.guild-details {
    display: grid;
    gap: 8px;
    margin-bottom: 24px;
}

.state-page {
    min-height: calc(100vh - 140px);
    place-items: center;
}

.state-card {
    max-width: 720px;
    margin: 40px auto 0;
}

.state-card.success {
    border-color: rgba(66, 211, 146, 0.24);
}

.admin-card h2 {
    margin-top: 0;
    font-family: "Space Grotesk", sans-serif;
}

.admin-form {
    display: grid;
    gap: 18px;
}

.admin-field {
    display: grid;
    gap: 10px;
}

.admin-field span {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.admin-field input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 15px 16px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    font: inherit;
}

.admin-field input:focus {
    outline: none;
    border-color: rgba(99, 210, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(99, 210, 255, 0.12);
}

.admin-feedback {
    display: grid;
    gap: 8px;
    border-radius: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
}

.admin-feedback strong {
    font-family: "Space Grotesk", sans-serif;
}

.admin-feedback p,
.admin-summary span {
    color: var(--muted);
}

.admin-feedback-success {
    border-color: rgba(66, 211, 146, 0.35);
    background: rgba(66, 211, 146, 0.08);
}

.admin-feedback-error {
    border-color: rgba(255, 132, 91, 0.35);
    background: rgba(255, 132, 91, 0.08);
}

.admin-summary {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

@media (max-width: 1024px) {
    .hero,
    .dashboard-hero,
    .premium-section,
    .feature-grid,
    .story-layout,
    .hero-metrics,
    .admin-grid {
        grid-template-columns: 1fr;
    }

    .user-chip {
        justify-self: start;
    }

    .placeholder-stack {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .page-shell {
        width: min(100% - 20px, 1240px);
    }

    .site-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-controls {
        width: 100%;
        justify-content: flex-start;
    }

    .site-nav {
        width: 100%;
        flex-wrap: wrap;
    }

    .language-switcher {
        width: 100%;
        justify-content: space-between;
    }

    .language-link {
        flex: 1;
        min-width: 0;
    }

    .hero-copy h1 {
        max-width: none;
    }
}
