/* GUSSINE dark theme */
:root {
    --color-bg: #0b101b;
    --color-surface: #151922;
    --color-input: #1c2230;
    --color-accent: #ff5a3d;
    --color-accent-hover: #ff6f55;
    --color-text: #ffffff;
    --color-text-muted: #a0a0a0;
    --color-border: rgba(255, 255, 255, 0.08);
    --radius-card: 20px;
    --radius-input: 14px;
    --radius-btn: 14px;
    --shadow-soft: 0 12px 32px rgba(0, 0, 0, 0.35);
    --shadow-accent: 0 8px 24px rgba(255, 90, 61, 0.35);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
}

body.theme-auth {
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 4vw, 2rem);
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--color-surface);
    border-radius: var(--radius-card);
    padding: clamp(1.5rem, 5vw, 2rem);
    box-shadow: var(--shadow-soft);
}

.auth-card__logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-card__logo img {
    max-width: 100%;
    height: auto;
    border-radius: calc(var(--radius-card) - 6px);
}

.auth-card__label {
    display: block;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    color: var(--color-accent);
    margin-bottom: 1.25rem;
}

.auth-field {
    margin-bottom: 0.875rem;
}

.auth-field:last-of-type {
    margin-bottom: 1.25rem;
}

.auth-input {
    width: 100%;
    min-height: 50px;
    padding: 0.875rem 1rem;
    font-family: inherit;
    font-size: 0.9375rem;
    color: var(--color-text);
    background: var(--color-input);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-input);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input::placeholder {
    color: var(--color-text-muted);
}

.auth-input:focus {
    border-color: rgba(255, 90, 61, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 90, 61, 0.15);
}

.auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 52px;
    padding: 0.9375rem 1.5rem;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--color-text);
    background: var(--color-accent);
    border: none;
    border-radius: var(--radius-btn);
    box-shadow: var(--shadow-accent);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-submit:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(255, 90, 61, 0.42);
}

.auth-submit:active {
    transform: translateY(0);
    background: #e84e32;
}

.auth-back {
    display: block;
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-back:hover {
    color: var(--color-accent);
}

/* ----- Admin layout ----- */
body.theme-admin {
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    min-height: 100vh;
    min-height: 100dvh;
}

.admin-nav {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 0.75rem 0.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-soft);
}

.admin-nav__list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.35rem 0.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.admin-nav__list a {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.875rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    text-decoration: none;
    border-radius: 10px;
    transition: color 0.2s ease, background 0.2s ease;
}

.admin-nav__list a:hover,
.admin-nav__list a.is-active {
    color: var(--color-text);
    background: rgba(255, 90, 61, 0.12);
}

.admin-nav__list a.is-active {
    color: var(--color-accent);
}

.admin-nav__icon {
    font-size: 1.125rem;
    color: var(--color-accent);
}

.admin-main {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    padding: clamp(1.25rem, 4vw, 2rem);
}

.admin-panel {
    background: var(--color-surface);
    border-radius: var(--radius-card);
    padding: clamp(1.25rem, 4vw, 2rem);
    box-shadow: var(--shadow-soft);
}

.admin-panel__title {
    text-align: center;
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: 0.02em;
}

.admin-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.admin-row__check {
    flex-shrink: 0;
    width: 1.125rem;
    height: 1.125rem;
    accent-color: var(--color-accent);
    cursor: pointer;
}

.admin-input {
    flex: 1;
    min-width: 0;
    min-height: 48px;
    padding: 0.75rem 1rem;
    font-family: inherit;
    font-size: 0.9375rem;
    color: var(--color-text);
    background: var(--color-input);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-input);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-input:focus {
    border-color: rgba(255, 90, 61, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 90, 61, 0.15);
}

.admin-block {
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: var(--color-input);
    border-radius: var(--radius-input);
    border: 1px solid var(--color-border);
}

.admin-block__label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.75rem;
}

.admin-block__label em {
    font-style: normal;
    color: var(--color-accent);
}

.admin-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
}

.admin-option {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    cursor: pointer;
}

.admin-option input {
    accent-color: var(--color-accent);
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

.admin-option:has(input:checked) {
    color: var(--color-text);
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

@media (max-width: 400px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

.admin-field label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.admin-field label em {
    font-style: normal;
    color: var(--color-accent);
}

.admin-field .admin-input {
    width: 100%;
}

.admin-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 52px;
    margin-top: 0.5rem;
    padding: 0.9375rem 1.5rem;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--color-text);
    background: var(--color-accent);
    border: none;
    border-radius: var(--radius-btn);
    box-shadow: var(--shadow-accent);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.admin-submit:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(255, 90, 61, 0.42);
}

.admin-submit:active {
    transform: translateY(0);
    background: #e84e32;
}

.admin-info {
    margin-top: 1.25rem;
    padding: 1rem 1.25rem;
    font-size: 0.8125rem;
    line-height: 1.7;
    color: var(--color-text-muted);
    background: var(--color-surface);
    border-radius: var(--radius-input);
    border: 1px solid var(--color-border);
    text-align: center;
}

/* ----- URL page ----- */
.channel-tabs {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.channel-tab {
    flex: 1;
    min-height: 48px;
    padding: 0.75rem 1rem;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text-muted);
    background: var(--color-input);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-btn);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.channel-tab:hover {
    color: var(--color-text);
    border-color: rgba(255, 90, 61, 0.35);
}

.channel-tab.is-active {
    color: var(--color-text);
    background: var(--color-accent);
    border-color: var(--color-accent);
    box-shadow: var(--shadow-accent);
}

.channel-tab--b.is-active {
    background: #e84e32;
    border-color: #e84e32;
    box-shadow: 0 8px 24px rgba(232, 78, 50, 0.35);
}

.url-panel {
    display: none;
}

.url-panel.is-active {
    display: block;
}

.url-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.url-card {
    padding: 1rem 1.125rem;
    background: var(--color-input);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-input);
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.url-card:hover {
    border-color: rgba(255, 90, 61, 0.45);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.url-card--b:hover {
    border-color: rgba(232, 78, 50, 0.5);
}

.url-card__title {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--color-text);
    background: rgba(255, 90, 61, 0.2);
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.url-card--b .url-card__title {
    background: rgba(232, 78, 50, 0.25);
    color: #ffb4a6;
}

.url-card__text {
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--color-text-muted);
    word-break: break-all;
}

@media (max-width: 480px) {
    .url-card__text {
        font-size: 0.6875rem;
    }
}

.admin-toast {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    left: 1.25rem;
    max-width: 320px;
    margin-left: auto;
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
    background: #2d8a4e;
    border-radius: var(--radius-btn);
    box-shadow: var(--shadow-soft);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    z-index: 200;
}

.admin-toast.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ----- Banner page ----- */
.banner-section {
    margin-bottom: 1.25rem;
}

.banner-section:last-of-type {
    margin-bottom: 0;
}

.banner-section__title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-border);
}

.banner-preview {
    margin: 1rem 0;
    padding: 0.75rem;
    background: var(--color-input);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-input);
    text-align: center;
}

.banner-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    display: none;
}

.banner-preview img.is-visible {
    display: inline-block;
}

.banner-preview__empty {
    display: none;
    padding: 2rem 1rem;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.banner-preview__empty.is-visible {
    display: block;
}

.banner-upload {
    margin-top: 0.75rem;
}

.banner-upload__label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

.admin-file-input {
    width: 100%;
    padding: 0.75rem;
    font-family: inherit;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    background: var(--color-input);
    border: 1px dashed rgba(255, 90, 61, 0.35);
    border-radius: var(--radius-input);
    cursor: pointer;
}

.admin-file-input::file-selector-button {
    margin-right: 0.75rem;
    padding: 0.5rem 0.875rem;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text);
    background: var(--color-accent);
    border: none;
    border-radius: 8px;
    cursor: pointer;
}
