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

:root {
    color-scheme: dark;
    font-family: 'Space Grotesk', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.4;
    --primary: #0084ff;
    --secondary: #050c1a;
    --bg: #020512;
    --card: #0b1224;
    --muted: rgba(255, 255, 255, 0.6);
    --border: rgba(255, 255, 255, 0.1);
    --radius: 16px;
}

body {
    margin: 0;
    background: radial-gradient(circle at top, rgba(0, 119, 255, 0.35), transparent 40%), var(--bg);
    color: #f7f8ff;
    min-height: 100vh;
}

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

.layout {
    padding: 2rem clamp(1rem, 5vw, 5rem);
}

.is-hidden {
    display: none !important;
}

.layout--home .hero,
.layout--station .station-hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    align-items: center;
}

.hero__content h1,
.station-hero__content h1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    margin: 0 0 1rem;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.75rem;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.subtitle {
    max-width: 500px;
    color: var(--muted);
    margin-bottom: 1.5rem;
}

.hero__actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    color: #fff;
}

.button--primary {
    background: linear-gradient(120deg, var(--primary), #4c7fff);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 132, 255, 0.35);
}

.button--ghost {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--muted);
}

.button--small {
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
}

.button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.hero__visual {
    position: relative;
    min-height: 280px;
}

.neon-disc {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 132, 255, 0.8), transparent 60%);
    filter: blur(1px);
    position: absolute;
    top: 0;
    right: 0;
}

.floating-card {
    position: absolute;
    bottom: 0;
    right: 2rem;
    background: #0f1730;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem 1.25rem;
    border-radius: 18px;
    width: min(320px, 90vw);
    backdrop-filter: blur(12px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.floating-card .live {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    color: var(--primary);
}

.content {
    margin-top: 3rem;
}

.section {
    margin-bottom: 4rem;
}

.section__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.section__description {
    max-width: 380px;
    color: var(--muted);
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.grid--stations {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.grid--two {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.station-card {
    background: rgba(5, 15, 35, 0.95);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.station-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, var(--station-secondary, var(--secondary)), transparent);
    opacity: 0.4;
    z-index: 0;
}

.station-card__body,
.station-card__actions {
    position: relative;
    z-index: 1;
}

.station-card__actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.empty-state {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    padding: 2rem;
}

.station-hero {
    margin-bottom: 1.5rem;
}

.station-hero__visual {
    position: relative;
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.station-tabs {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 0 0 2rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.tab-button {
    border: none;
    background: transparent;
    color: var(--muted);
    padding: 0.65rem 1.25rem;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.tab-button.is-active {
    background: linear-gradient(120deg, var(--primary), #4c7fff);
    color: #fff;
    box-shadow: 0 8px 20px rgba(0, 132, 255, 0.35);
}

.player-card {
    width: 100%;
    padding: 1.5rem;
    border-radius: var(--radius);
    background: rgba(5, 10, 25, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
}

.player-card--full {
    max-width: 960px;
    margin: 0 auto;
}

.player-card__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--muted);
}

.player-links {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1rem;
    width: 100%;
}

audio {
    width: 100%;
    margin-bottom: 1rem;
}

.live-dot {
    width: 10px;
    height: 10px;
    background: #ff2147;
    border-radius: 50%;
    animation: pulse 1.6s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 33, 71, 0.6); }
    70% { box-shadow: 0 0 0 10px rgba(255, 33, 71, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 33, 71, 0); }
}

.station-content .card {
    background: rgba(4, 9, 22, 0.9);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tab-panel {
    display: none;
}

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

.card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.9rem;
}

.field input,
.field textarea,
.field select {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(2, 8, 21, 0.8);
    color: #fff;
    padding: 0.7rem 1rem;
    font-family: inherit;
    resize: vertical;
}

.field--checkbox {
    flex-direction: row;
    align-items: center;
}

.field--checkbox input {
    width: auto;
}

.list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.list--requests li {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.list--requests li:last-child {
    border-bottom: none;
}

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

.card--raffle {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    align-items: center;
}

.raffle__media img,
.raffle__placeholder {
    width: 100%;
    border-radius: var(--radius);
    height: 260px;
    object-fit: cover;
    background: rgba(0, 0, 0, 0.3);
}

.raffle__info {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
}

.raffle__info li {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.5rem 0;
}

.slider {
    position: relative;
    overflow: hidden;
}

.slider__item {
    border-radius: var(--radius);
    overflow: hidden;
    margin: 0;
}

.slider__item img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
}

.slider__item figcaption {
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.35);
}

.slider-controls {
    display: flex;
    gap: 0.5rem;
}

.card--chat .chat-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.chat-panel {
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
}

.chat-forms {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-panel--locked {
    border-style: dashed;
}

.chat-panel__messages {
    flex: 1;
    padding: 1rem;
    max-height: 360px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.chat-message {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.8rem;
    border-radius: 12px;
}

.chat-message__meta {
    font-size: 0.75rem;
    color: var(--muted);
    margin-bottom: 0.2rem;
}

.chat-message__gif img {
    max-width: 100%;
    border-radius: 10px;
    margin-top: 0.35rem;
    display: block;
}

.chat-panel__form {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
}

.chat-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    background: rgba(2, 8, 21, 0.8);
    padding-right: 0.35rem;
}

.chat-input-wrapper input {
    border: none;
    background: transparent;
    color: #fff;
    flex: 1;
    padding: 0.7rem 1rem;
    font: inherit;
}

.chat-input-actions {
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

.chat-panel__form button[disabled] {
    opacity: 0.6;
}

.chat-emoji-picker,
.chat-gif-picker {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1rem;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
    gap: 0.35rem;
    margin-top: 0.5rem;
}

.emoji-grid button {
    font-size: 1.4rem;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    padding: 0.3rem;
}

.gif-results {
    margin-top: 0.75rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
}

.gif-results button {
    border: none;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

.gif-results img {
    width: 100%;
    border-radius: 10px;
    display: block;
}

.status-dot {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: #4ade80;
}

.status-dot::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4ade80;
    display: inline-block;
    margin-right: 0.5rem;
}

.chat-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-auth__start {
    text-align: center;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.chat-auth__actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.auth-switch {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    font-size: 0.85rem;
}

.text-button {
    background: none;
    border: none;
    padding: 0;
    color: var(--primary);
    cursor: pointer;
    font-weight: 600;
}

.chat-panel__placeholder {
    text-align: center;
    padding: 2rem;
    color: var(--muted);
}

.form-feedback {
    font-size: 0.85rem;
    min-height: 1rem;
}

.layout--admin {
    background: var(--bg);
    color: #fff;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.admin-nav {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.admin-nav__button {
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: transparent;
    color: var(--muted);
    padding: 0.6rem 1.1rem;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
}

.admin-nav__button.is-active {
    background: linear-gradient(120deg, var(--primary), #4c7fff);
    color: #fff;
    box-shadow: 0 10px 25px rgba(0, 132, 255, 0.35);
}

.admin-section {
    display: none;
}

.admin-section.is-active {
    display: block;
}

.admin-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.panel {
    background: rgba(8, 12, 26, 0.95);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.5rem;
}

.panel--wide .panel__content--stack {
    display: grid;
    gap: 1.25rem;
}

.card--compact {
    background: rgba(4, 8, 18, 0.85);
    border-radius: var(--radius);
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.table th,
.table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.75rem;
    text-align: left;
    vertical-align: top;
}

.inline-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.inline-form select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 0.35rem;
    border-radius: 8px;
}

.badge {
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    text-transform: uppercase;
    font-size: 0.7rem;
}

.status-pending { background: #f97316; color: #0b0f1d; }
.status-accepted { background: #22d3ee; color: #04101a; }
.status-rejected { background: #f43f5e; color: #ffe4e7; }

.gallery-list {
    display: grid;
    gap: 1rem;
}

.station-manager,
.raffle-manager {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1.5rem;
}

.station-manager__list,
.raffle-manager__list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.station-item,
.raffle-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    text-align: left;
    color: inherit;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.station-item--create,
.raffle-item--create {
    border-style: dashed;
    color: var(--primary);
}

.station-item.is-active,
.raffle-item.is-active {
    border-color: var(--primary);
    background: rgba(0, 132, 255, 0.1);
}

.station-manager__forms,
.raffle-manager__forms {
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
}

.station-form,
.raffle-form {
    display: none;
}

.station-form:not(.is-hidden),
.raffle-form:not(.is-hidden) {
    display: block;
}

.table-controls {
    color: var(--muted);
}

.table-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: 1rem;
}

.raffle-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.gallery-item {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 1rem;
    align-items: center;
    background: rgba(1, 6, 17, 0.7);
    border-radius: var(--radius);
    padding: 0.75rem;
}

.gallery-item img {
    width: 100px;
    height: 70px;
    object-fit: cover;
    border-radius: 10px;
}

.alert {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.alert--error {
    background: rgba(244, 63, 94, 0.1);
    color: #ff8ba3;
}

.alert--success {
    background: rgba(45, 212, 191, 0.1);
    color: #5eead4;
}

.admin-login {
    max-width: 420px;
    margin: 5rem auto;
    padding: 2rem;
    background: rgba(5, 10, 24, 0.9);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.layout--error {
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-card {
    text-align: center;
    padding: 3rem;
    border-radius: var(--radius);
    background: rgba(5, 10, 24, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .layout {
        padding: 1.5rem;
    }

    .hero__actions,
    .player-links {
        flex-direction: column;
        width: 100%;
    }

    .card--raffle {
        grid-template-columns: 1fr;
    }

    .station-manager,
    .raffle-manager {
        grid-template-columns: 1fr;
    }

    .gallery-item {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .inline-form {
        flex-direction: column;
        align-items: flex-start;
    }
}
