@font-face {
    font-family: Outfit;
    src: url("/fonts/outfit-v15-latin-regular.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: Outfit;
    src: url("/fonts/outfit-v15-latin-700.woff2") format("woff2");
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: Outfit;
    src: url("/fonts/outfit-v15-latin-900.woff2") format("woff2");
    font-weight: 900;
    font-display: swap;
}

:root {
    color-scheme: dark;
    --bg: #090a12;
    --panel: rgba(17, 19, 28, 0.88);
    --panel-strong: rgba(27, 31, 44, 0.95);
    --line: rgba(255, 255, 255, 0.11);
    --text: #f8fbff;
    --muted: #a6b0c2;
    --cyan: #00f0ff;
    --pink: #ff3e75;
    --green: #4cffb0;
}

* { box-sizing: border-box; }

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 14% 3%, rgba(0, 240, 255, 0.14), transparent 32%),
        radial-gradient(circle at 86% 5%, rgba(255, 62, 117, 0.13), transparent 34%),
        var(--bg);
    font-family: Outfit, system-ui, sans-serif;
}

button,
input,
select {
    font: inherit;
}

.topbar {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 72px;
    padding: 14px 30px;
    border-bottom: 1px solid var(--line);
    background: rgba(8, 9, 15, 0.86);
    backdrop-filter: blur(18px);
}

.brand,
.nav a {
    color: var(--text);
    text-decoration: none;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brand img {
    width: 34px;
    height: 34px;
}

.nav {
    display: flex;
    gap: 18px;
    margin-left: auto;
}

.nav a {
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
}

.nav a:hover { color: var(--cyan); }

.settings-shell {
    width: min(1340px, calc(100vw - 32px));
    margin: 0 auto;
    padding: 24px 0 56px;
}

.hero-panel,
.global-panel,
.singers-panel {
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--panel);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.32);
}

.hero-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    padding: 32px;
}

.eyebrow {
    margin: 0 0 9px;
    color: var(--cyan);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    max-width: 820px;
    margin-bottom: 12px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 0.94;
    font-weight: 900;
}

h2 {
    margin-bottom: 0;
    font-size: 24px;
    font-weight: 900;
}

p {
    color: var(--muted);
    line-height: 1.55;
}

.status-card {
    align-self: stretch;
    display: grid;
    align-content: center;
    gap: 6px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.22);
}

.status-card span,
.field span,
.meter-row span,
.save-status {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.status-card strong {
    color: var(--green);
    font-size: 24px;
    font-weight: 900;
}

.global-panel,
.singers-panel {
    margin-top: 18px;
    padding: 22px;
}

.section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.section-head p {
    margin: 6px 0 0;
}

.action-row,
.test-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.primary-btn,
.secondary-btn,
.ghost-btn {
    min-height: 40px;
    border-radius: 10px;
    padding: 9px 15px;
    font-weight: 900;
    cursor: pointer;
}

.primary-btn {
    border: 0;
    color: #061014;
    background: linear-gradient(135deg, var(--cyan), #7d5cff);
}

.secondary-btn,
.ghost-btn {
    color: var(--text);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.06);
}

.ghost-btn {
    color: var(--muted);
    background: transparent;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 12px;
}

.field {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.field input,
.field select,
.singer-name {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.32);
    outline: none;
}

.field select option {
    background: #11131c;
    color: #fff;
}

.check-field {
    align-content: center;
    grid-template-columns: auto 1fr;
    align-items: center;
    min-height: 64px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.2);
}

.check-field input {
    width: 18px;
    min-height: 18px;
}

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

.singer-card {
    min-width: 0;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    background: var(--panel-strong);
}

.singer-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.singer-name {
    color: var(--cyan);
    font-size: 18px;
    font-weight: 900;
}

.switch-line {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.meter-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    margin-bottom: 12px;
}

.meter-row div {
    min-width: 0;
    padding: 11px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.22);
}

.meter-row strong {
    display: block;
    margin-top: 5px;
    overflow: hidden;
    color: var(--cyan);
    font-size: 20px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.test-row {
    margin-top: 12px;
}

.error-line {
    min-height: 18px;
    margin: 10px 0 0;
    color: #ffb4c7;
    font-size: 13px;
}

@media (max-width: 980px) {
    .hero-panel,
    .singer-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 700px) {
    .topbar,
    .nav,
    .section-head {
        align-items: stretch;
        flex-direction: column;
    }

    .nav {
        margin-left: 0;
        flex-wrap: wrap;
    }

    .settings-grid,
    .singer-form,
    .meter-row {
        grid-template-columns: 1fr;
    }
}
