:root {
    --bg: #090b13;
    --bg-2: #121625;
    --surface: rgba(12, 16, 28, 0.82);
    --surface-strong: rgba(19, 24, 39, 0.92);
    --surface-soft: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.09);
    --text: #f5f7ff;
    --muted: #a0a8c3;
    --gold: #f7b733;
    --gold-2: #fc4a1a;
    --accent: #64f6d3;
    --danger: #ff6f6f;
    --success: #69f0ae;
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
    --radius: 28px;
}

* {
    box-sizing: border-box;
}

html, body {
    min-height: 100%;
}

body {
    margin: 0;
    color: var(--text);
    font-family: "Trebuchet MS", "Segoe UI", Tahoma, sans-serif;
    background:
        radial-gradient(circle at 20% 10%, rgba(252, 74, 26, 0.18), transparent 30%),
        radial-gradient(circle at 80% 0%, rgba(247, 183, 51, 0.16), transparent 28%),
        linear-gradient(180deg, #06070c 0%, #0a0d16 40%, #111522 100%);
    overflow-x: hidden;
}

h1, h2, h3, .brand-block strong {
    font-family: Georgia, "Times New Roman", serif;
    letter-spacing: 0.02em;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
}

input, textarea, select, button {
    font: inherit;
}

input, textarea, select {
    width: 100%;
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 14px 16px;
    outline: none;
    transition: 0.25s ease;
}

input:focus, textarea:focus, select:focus {
    border-color: rgba(247, 183, 51, 0.5);
    box-shadow: 0 0 0 4px rgba(247, 183, 51, 0.12);
}

button {
    border: 0;
    cursor: pointer;
}

label {
    display: grid;
    gap: 10px;
    font-size: 14px;
    color: var(--muted);
}

small, .muted {
    color: var(--muted);
}

.cinema-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.cinema-glow {
    position: absolute;
    border-radius: 999px;
    filter: blur(90px);
    opacity: 0.4;
}

.glow-1 {
    width: 36rem;
    height: 36rem;
    top: -8rem;
    right: -8rem;
    background: rgba(252, 74, 26, 0.3);
}

.glow-2 {
    width: 30rem;
    height: 30rem;
    bottom: -8rem;
    left: -6rem;
    background: rgba(100, 246, 211, 0.16);
}

.cinema-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(180deg, rgba(0,0,0,0.4), transparent 75%);
}

.cinema-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
}

.page-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    gap: 28px;
    padding: 24px 18px 42px;
}

.topbar-shell {
    display: flex;
    justify-content: center;
}

.topbar {
    width: min(1280px, 100%);
    display: grid;
    gap: 18px;
    padding: 18px 22px;
    border-radius: calc(var(--radius) + 6px);
    background: linear-gradient(180deg, rgba(10, 13, 22, 0.92), rgba(15, 19, 31, 0.85));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow);
}

.brand-block {
    display: grid;
    gap: 6px;
    text-align: center;
}

.brand-kicker,
.eyebrow {
    display: inline-flex;
    width: fit-content;
    align-self: center;
    justify-self: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(247, 183, 51, 0.12);
    border: 1px solid rgba(247, 183, 51, 0.18);
    color: var(--gold);
    font-size: 12px;
    letter-spacing: 0.18em;
}

.brand-block strong {
    font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.brand-block small {
    font-size: 0.95rem;
    color: var(--muted);
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-links a {
    padding: 12px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.nav-links a:hover {
    transform: translateY(-2px);
    background: rgba(247, 183, 51, 0.1);
    border-color: rgba(247, 183, 51, 0.25);
}

.content {
    width: min(1280px, 100%);
    margin: 0 auto;
    display: grid;
    gap: 24px;
}

.content.centered,
.content.guest-mode {
    width: min(1180px, 100%);
    min-height: calc(100vh - 48px);
    align-content: center;
}

.page-banner,
.card,
.login-card,
.auth-card,
.auth-hero,
.topbar {
    backdrop-filter: blur(18px);
}

.card,
.login-card,
.auth-card,
.auth-hero {
    background: linear-gradient(180deg, rgba(16, 20, 34, 0.88), rgba(12, 15, 26, 0.82));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    padding: 24px;
}

.cinematic-panel {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(247, 183, 51, 0.12), rgba(252, 74, 26, 0.08) 35%, rgba(100, 246, 211, 0.05) 100%),
        linear-gradient(180deg, rgba(16, 20, 34, 0.92), rgba(10, 12, 20, 0.86));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.cinematic-panel::after {
    content: "";
    position: absolute;
    inset: auto -8% -40% auto;
    width: 18rem;
    height: 18rem;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(247, 183, 51, 0.2), transparent 70%);
    filter: blur(20px);
}

.page-banner {
    display: grid;
    gap: 18px;
    padding: 34px 30px;
    border-radius: calc(var(--radius) + 4px);
}

.page-banner h1,
.auth-hero h1 {
    margin: 0 0 10px;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.05;
}

.page-banner p,
.auth-hero p {
    max-width: 760px;
    margin: 0;
    color: #d5dbef;
    font-size: 1.02rem;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #f1f4ff;
}

.auth-shell {
    min-height: calc(100vh - 48px);
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 24px;
    align-items: center;
}

.auth-hero,
.auth-card {
    min-height: 520px;
    display: grid;
    align-content: center;
    gap: 20px;
}

.auth-card h2 {
    margin: 0;
    font-size: 2rem;
}

.section-heading {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
}

.section-heading h2,
.section-heading p {
    margin: 0;
}

.cards-grid,
.grid-2,
.install-grid,
.checks-grid,
.hero-stats {
    display: grid;
    gap: 20px;
}

.cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-2,
.install-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.checks-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.single-column {
    grid-template-columns: 1fr;
}

.compact-checks {
    margin-bottom: 16px;
}

.spotlight-card {
    position: relative;
    overflow: hidden;
}

.spotlight-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(247, 183, 51, 0.16), transparent 50%);
    pointer-events: none;
}

.stat-card {
    display: grid;
    gap: 10px;
}

.stat-card span {
    color: var(--muted);
}

.stat-card strong {
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1;
}

.form-card,
.install-form-card {
    padding: 28px;
}

.subcard {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 24px;
    padding: 22px;
}

.source-mode-panel {
    display: grid;
    gap: 12px;
    padding: 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.stack,
.form-grid {
    display: grid;
    gap: 16px;
}

.full-width {
    grid-column: 1 / -1;
}

.row-between,
.logo-row,
.actions-cell,
.form-submit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.logo-card {
    padding: 18px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.logo-card:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.effects-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.effects-builder {
    display: grid;
    gap: 12px;
}

.effect-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.effect-chip {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #edf2ff;
    font-size: 13px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn.primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-2));
    color: #180b04;
    box-shadow: 0 18px 35px rgba(252, 74, 26, 0.28);
}

.btn.danger {
    color: #ffd0d0;
    background: rgba(255, 111, 111, 0.08);
    border-color: rgba(255, 111, 111, 0.18);
}

.btn.wide {
    min-width: 220px;
}

.alert {
    padding: 15px 18px;
    border-radius: 20px;
    border: 1px solid transparent;
}

.alert.success {
    background: rgba(105, 240, 174, 0.08);
    border-color: rgba(105, 240, 174, 0.18);
    color: var(--success);
}

.alert.error {
    background: rgba(255, 111, 111, 0.08);
    border-color: rgba(255, 111, 111, 0.18);
    color: #ffc7c7;
}

.badge,
.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #eef2ff;
}

.progress {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
}

.progress.small {
    height: 9px;
}

.progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), var(--gold));
}

.job-item,
.version-box {
    display: grid;
    gap: 12px;
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.check-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 15px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.check-item strong {
    color: var(--text);
    font-size: 14px;
}

.check-item.ok {
    color: var(--success);
}

.check-item.bad {
    color: #ffb0b0;
}

.table-wrap {
    overflow-x: auto;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.07);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.03);
}

thead {
    background: rgba(255, 255, 255, 0.05);
}

th, td {
    padding: 15px 14px;
    text-align: right;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    vertical-align: top;
}

tr:last-child td {
    border-bottom: 0;
}

.log-box {
    margin: 0;
    padding: 20px;
    border-radius: 22px;
    background: rgba(2, 5, 14, 0.85);
    color: #d9e1f8;
    border: 1px solid rgba(255, 255, 255, 0.06);
    white-space: pre-wrap;
    word-break: break-word;
    min-height: 420px;
    max-height: 620px;
    overflow: auto;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.checkbox-row input {
    width: auto;
}

.preview-card {
    display: grid;
    gap: 18px;
}

.badge-preview-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 20px;
    align-items: center;
}

.badge-preview-stage {
    min-height: 360px;
    display: grid;
    place-items: center;
    border-radius: 24px;
    padding: 22px;
    background:
        radial-gradient(circle at center, rgba(255,255,255,0.06), transparent 42%),
        linear-gradient(180deg, rgba(6, 10, 18, 0.86), rgba(12, 16, 28, 0.96));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.badge-preview-video {
    position: relative;
    width: min(100%, 560px);
    aspect-ratio: 16 / 9;
    border-radius: 24px;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(252, 74, 26, 0.2), transparent 30%),
        radial-gradient(circle at 60% 35%, rgba(247, 183, 51, 0.18), transparent 28%),
        linear-gradient(180deg, #0a0f1a, #161d2d);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

.badge-preview-video::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 44px 44px;
    opacity: 0.3;
}

.badge-preview-circle {
    --badge-size: 280px;
    --badge-font-size: 96px;
    position: absolute;
    z-index: 1;
    width: calc(var(--badge-size) * 1.7);
    height: var(--badge-size);
    border-radius: 22px;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.6);
    box-shadow:
        0 12px 42px rgba(0, 0, 0, 0.46);
}

.badge-preview-circle[data-position="center"] {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.badge-preview-circle[data-position="top-center"] {
    left: 50%;
    top: 22px;
    transform: translateX(-50%);
}

.badge-preview-circle[data-position="bottom-center"] {
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
}

.badge-preview-circle[data-position="left-center"] {
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
}

.badge-preview-circle[data-position="right-center"] {
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
}

.badge-preview-circle[data-position="top-left"] {
    left: 22px;
    top: 22px;
}

.badge-preview-circle[data-position="top-right"] {
    right: 22px;
    top: 22px;
}

.badge-preview-circle[data-position="bottom-left"] {
    left: 22px;
    bottom: 22px;
}

.badge-preview-circle[data-position="bottom-right"] {
    right: 22px;
    bottom: 22px;
}

.badge-preview-circle span {
    font-size: var(--badge-font-size);
    line-height: 1;
    color: #fff;
    font-weight: 700;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.75);
}

.badge-preview-notes {
    display: grid;
    gap: 12px;
}

.logo-preview-box {
    --logo-width: 220px;
    --logo-height: 64px;
    position: absolute;
    z-index: 1;
    width: var(--logo-width);
    height: var(--logo-height);
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(247, 183, 51, 0.22), rgba(252, 74, 26, 0.18));
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.38);
}

.logo-preview-box span {
    color: #fff4d6;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.logo-preview-box[data-position="top-center"] {
    left: 50%;
    top: 22px;
    transform: translateX(-50%);
}

.logo-preview-box[data-position="top-left"] {
    left: 22px;
    top: 22px;
}

.logo-preview-box[data-position="top-right"] {
    right: 22px;
    top: 22px;
}

.logo-preview-box[data-position="bottom-left"] {
    left: 22px;
    bottom: 22px;
}

.logo-preview-box[data-position="bottom-right"] {
    right: 22px;
    bottom: 22px;
}

.install-centered {
    width: 100%;
}

code {
    font-family: Consolas, monospace;
    color: #ffe4a7;
}

@media (max-width: 980px) {
    .content,
    .content.centered,
    .content.guest-mode {
        width: min(100%, 100%);
    }

    .auth-shell,
    .cards-grid,
    .grid-2,
    .install-grid,
    .checks-grid,
    .badge-preview-shell,
    .effects-grid {
        grid-template-columns: 1fr;
    }

    .auth-hero,
    .auth-card {
        min-height: auto;
    }

    .topbar {
        padding: 18px 16px;
    }

    .page-banner,
    .card,
    .auth-card,
    .auth-hero {
        padding: 22px 18px;
    }
}
