:root {
    --ink: #14081f;
    --paper: #fff8ef;
    --sun: #ffe14a;
    --hot: #ff4d8d;
    --cyan: #3ef0d0;
    --violet: #7c5cff;
    --card: rgba(255, 248, 239, 0.88);
    --shadow: 0 18px 50px rgba(40, 8, 70, 0.28);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: Outfit, "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(1200px 600px at 10% -10%, #ff9ad5 0%, transparent 55%),
        radial-gradient(900px 500px at 110% 10%, #7af0ff 0%, transparent 50%),
        linear-gradient(160deg, #24113c 0%, #4a1d73 45%, #12263f 100%);
    background-attachment: fixed;
}

.blobs { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.55;
    animation: float 14s ease-in-out infinite;
}
.blob-a { width: 280px; height: 280px; background: var(--hot); top: 12%; left: -60px; }
.blob-b { width: 340px; height: 340px; background: var(--cyan); bottom: -80px; right: 8%; animation-delay: -4s; }
.blob-c { width: 220px; height: 220px; background: var(--sun); top: 40%; right: 18%; animation-delay: -8s; opacity: .35; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -24px) scale(1.08); }
}

.topbar, .wrap { position: relative; z-index: 1; }

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 8vw 8px;
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center;
    color: white;
    text-decoration: none;
}

.brand strong {
    display: block;
    font-family: Fredoka, Outfit, sans-serif;
    font-size: 1.6rem;
    letter-spacing: 0.04em;
}

.brand small {
    display: block;
    opacity: 0.8;
    font-size: 0.85rem;
}

.logo { color: var(--sun); filter: drop-shadow(0 0 10px rgba(255, 225, 74, 0.7)); }

.wrap {
    width: min(980px, calc(100% - 40px));
    margin: 18px auto 80px;
}

.hero-lite {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    color: white;
    margin-bottom: 24px;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--cyan);
    margin: 0 0 6px;
}

.eyebrow a { color: var(--cyan); }

h1, h2 { font-family: Fredoka, Outfit, sans-serif; margin: 0 0 8px; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }

.lead { margin: 0; opacity: 0.85; max-width: 42ch; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    padding: 12px 20px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover { transform: translateY(-2px) rotate(-1deg); }

.btn-primary {
    background: linear-gradient(90deg, var(--sun), #ffb347);
    color: var(--ink);
    box-shadow: 0 10px 24px rgba(255, 225, 74, 0.35);
}

.btn-secondary {
    background: var(--cyan);
    color: #08332c;
}

.btn-ghost {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,.45);
}

.btn-danger {
    background: var(--hot);
    color: white;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

.card, .panel-form, .auth-card, .empty {
    background: var(--card);
    backdrop-filter: blur(16px);
    border: 3px solid #fff;
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.card { padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.card h2 { font-size: 1.45rem; }
.meta, .muted, .hint { color: #5c4a6a; }
.label { font-weight: 800; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--violet); margin: 4px 0 0; }

.chips, .channel-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li, .channel-list li {
    background: #fff;
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 700;
    box-shadow: 0 6px 0 rgba(124, 92, 255, 0.18);
}

.channel-list li {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 16px;
}

.card-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
    padding-top: 12px;
}

.card-actions form { margin: 0; }

.empty, .auth-card, .panel-form { padding: 32px; }
.empty { text-align: center; color: var(--ink); }
.empty-art { font-size: 3rem; }

.auth-card { width: min(460px, 100%); margin: 40px auto; color: var(--ink); }
.auth-card h1, .auth-card .lead { color: var(--ink); }
.auth-card .eyebrow { color: var(--hot); }
.is-auth .wrap { display: block; }

.stack { display: grid; gap: 16px; }
label { display: grid; gap: 8px; font-weight: 700; }
input[type="text"], input[type="password"], input[type="url"] {
    font: inherit;
    padding: 14px 16px;
    border-radius: 16px;
    border: 2px solid #eadff8;
    background: white;
}

input:focus {
    outline: 3px solid var(--violet);
    border-color: white;
}

.yt-box {
    border: 2px dashed var(--violet);
    border-radius: 20px;
    padding: 16px;
}

.add-row { display: flex; gap: 10px; flex-wrap: wrap; }
.add-row input { flex: 1; min-width: 180px; }

.link-btn {
    background: none;
    border: 0;
    color: var(--hot);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.flash {
    border-radius: 18px;
    padding: 14px 16px;
    margin-bottom: 18px;
    font-weight: 700;
}
.flash-ok { background: #d7ffe8; color: #0d5c38; }
.flash-error { background: #ffd6e5; color: #8a103f; }
.flash-warn { background: #fff3c4; color: #5c4300; }
.plain { margin: 0; padding-left: 18px; }
code { font-family: ui-monospace, Consolas, monospace; }

@media (max-width: 700px) {
    .hero-lite, .topbar { flex-direction: column; align-items: flex-start; }
    .topbar { padding: 18px 20px 0; }
}
