:root {
    --bg: #0b1220;
    --bg-soft: #111a2d;
    --panel: rgba(16, 24, 40, 0.82);
    --panel-border: rgba(148, 163, 184, 0.2);
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --primary: #3b82f6;
    --primary-strong: #2563eb;
    --secondary: #14b8a6;
    --success: #22c55e;
    --danger: #ef4444;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background: radial-gradient(circle at top right, #1d4ed8 0%, transparent 40%),
                radial-gradient(circle at bottom left, #0f766e 0%, transparent 42%),
                var(--bg);
}

body {
    position: relative;
    overflow-x: hidden;
}

.bg-orb {
    position: fixed;
    border-radius: 999px;
    filter: blur(90px);
    z-index: 0;
    pointer-events: none;
    opacity: 0.25;
}

.orb-1 {
    width: 280px;
    height: 280px;
    background: #1d4ed8;
    top: -80px;
    right: -60px;
}

.orb-2 {
    width: 360px;
    height: 360px;
    background: #0f766e;
    bottom: -120px;
    left: -100px;
}

.page {
    max-width: 980px;
    margin: 0 auto;
    padding: 32px 18px 42px;
    position: relative;
    z-index: 1;
}

.center-page {
    min-height: 100dvh;
    display: grid;
    place-items: center;
}

.hero-card,
.panel,
.display-waiting,
.starter-card {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 22px;
    backdrop-filter: blur(12px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.hero-card {
    width: min(720px, 100%);
    padding: 34px 28px;
    text-align: center;
}

.login-card {
    width: min(500px, 100%);
}

.login-form {
    margin-top: 24px;
    display: grid;
    gap: 14px;
    text-align: left;
}

.eyebrow {
    margin: 0 0 10px;
    font-size: 0.86rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
}

h1 {
    margin: 0;
    font-size: clamp(1.7rem, 3.8vw, 2.65rem);
    font-weight: 800;
}

.subline {
    margin: 12px 0 0;
    color: var(--text-muted);
}

.button-grid {
    margin-top: 30px;
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border: 0;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.98rem;
    padding: 14px 20px;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.45);
}

.btn-secondary {
    color: #fff;
    background: linear-gradient(135deg, #0d9488, var(--secondary));
    box-shadow: 0 8px 24px rgba(20, 184, 166, 0.4);
}

.page-header {
    margin-bottom: 22px;
}

.top-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.top-actions.left {
    justify-content: space-between;
}

.page-header h1 {
    margin-top: 10px;
}

.page-header p {
    margin: 8px 0 0;
    color: var(--text-muted);
}

.back-link {
    color: #bfdbfe;
    text-decoration: none;
    font-weight: 600;
}

.back-link:hover {
    text-decoration: underline;
}

.form-panel {
    padding: 22px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group span {
    font-size: 0.92rem;
    color: var(--text-muted);
    font-weight: 600;
}

input,
select {
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.85);
    color: var(--text);
    font-size: 1rem;
    padding: 12px 13px;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

input:focus,
select:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

input[readonly] {
    opacity: 0.95;
}

.full-width {
    grid-column: 1 / -1;
    margin-top: 8px;
}

.status-message {
    min-height: 24px;
    margin: 14px 2px 0;
    font-weight: 600;
}

.status-message.info {
    color: #bfdbfe;
}

.status-message.success {
    color: #86efac;
}

.status-message.error {
    color: #fca5a5;
}

.display-body {
    min-height: 100dvh;
}

.display-page {
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 24px;
    position: relative;
}

.display-top-actions {
    position: absolute;
    top: 18px;
    left: 24px;
    right: 24px;
    display: flex;
    justify-content: space-between;
}

.display-waiting,
.starter-card {
    width: min(1100px, 100%);
    text-align: center;
    padding: clamp(24px, 4vw, 48px);
    display: none;
}

.display-waiting.show,
.starter-card.show {
    display: block;
}

.display-waiting h1 {
    font-size: clamp(1.8rem, 3.6vw, 3.2rem);
}

.starter-label {
    margin: 0;
    font-size: clamp(1rem, 2vw, 1.35rem);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #bfdbfe;
    font-weight: 700;
}

.starter-name {
    margin-top: 18px;
    font-size: clamp(2.4rem, 6vw, 5rem);
    font-weight: 800;
    line-height: 1.04;
}

.starter-meta-grid {
    margin-top: 26px;
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.meta-item {
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 15px;
    background: rgba(15, 23, 42, 0.65);
    padding: 16px 14px;
}

.meta-item span {
    display: block;
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}

.meta-item strong {
    font-size: clamp(1.2rem, 2.5vw, 2rem);
}

@media (max-width: 860px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .button-grid {
        grid-template-columns: 1fr;
    }

    .starter-meta-grid {
        grid-template-columns: 1fr;
    }

    .top-actions.left,
    .display-top-actions {
        gap: 8px;
        flex-direction: column;
        align-items: flex-start;
    }
}