:root {
    --bg: #020208;
    --bg-deep: #070111;
    --panel: rgba(11, 14, 28, 0.74);
    --panel-strong: rgba(13, 17, 34, 0.9);
    --line: rgba(0, 234, 255, 0.16);
    --line-strong: rgba(255, 77, 255, 0.24);
    --text: #f4f6ff;
    --muted: #9ca7cb;
    --cyan: #00eaff;
    --cyan-soft: #69f3ff;
    --purple: #8e53ff;
    --pink: #ff4dff;
    --magenta: #ff86ff;
    --shadow: 0 32px 90px rgba(0, 0, 0, 0.5);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
    background:
        radial-gradient(circle at top left, rgba(0, 234, 255, 0.08), transparent 26%),
        radial-gradient(circle at bottom right, rgba(255, 77, 255, 0.11), transparent 28%),
        linear-gradient(180deg, #020208 0%, #050510 42%, #020208 100%);
    color: var(--text);
    font-family: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
    letter-spacing: 0.02em;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 25% 20%, rgba(0, 234, 255, 0.08), transparent 18%),
        radial-gradient(circle at 75% 75%, rgba(255, 77, 255, 0.1), transparent 24%);
    mix-blend-mode: screen;
}

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

button, input, textarea, select {
    font: inherit;
}

.page-shell {
    width: min(100%, 1180px);
    margin: 0 auto;
    padding: 14px 14px 90px;
}

.content {
    display: grid;
    gap: 16px;
}

.glass-card,
.card,
.hero,
.form-card,
.auth-panel,
.splash-stage,
.timeline-item,
.list-item,
.metric,
.focus-room,
.mobile-nav,
.topbar,
.ad-banner {
    backdrop-filter: blur(22px);
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(14, 18, 36, 0.82), rgba(9, 11, 25, 0.72));
    box-shadow: var(--shadow);
}

.topbar,
.mobile-nav,
.card,
.hero,
.form-card,
.auth-panel,
.splash-stage,
.focus-room,
.ad-banner {
    border-radius: 28px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 14px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand strong,
.brand small,
.metric strong,
.metric span {
    display: block;
}

.brand small,
.muted,
.topbar-user small,
.site-footer p,
.timeline-item small,
.list-item small {
    color: var(--muted);
}

.brand-mark,
.topbar-avatar {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    border: 1px solid rgba(0, 234, 255, 0.28);
    background: linear-gradient(135deg, rgba(0, 234, 255, 0.12), rgba(255, 77, 255, 0.14));
    box-shadow:
        0 0 24px rgba(0, 234, 255, 0.18),
        0 0 30px rgba(255, 77, 255, 0.14);
}

.brand-mark img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    filter: drop-shadow(0 0 16px rgba(0, 234, 255, 0.36));
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-nav {
    position: sticky;
    top: 12px;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(6, minmax(84px, 1fr));
    gap: 8px;
    padding: 10px;
    margin-bottom: 18px;
    overflow-x: auto;
}

.mobile-nav a {
    min-width: 84px;
    text-align: center;
    padding: 11px 12px;
    border-radius: 16px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.03);
    transition: 180ms ease;
}

.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--text);
    border: 1px solid rgba(0, 234, 255, 0.24);
    background: linear-gradient(135deg, rgba(0, 234, 255, 0.1), rgba(255, 77, 255, 0.09));
    box-shadow: 0 0 24px rgba(0, 234, 255, 0.1);
}

.ad-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
}

.hero,
.card,
.form-card {
    position: relative;
    overflow: hidden;
    padding: 18px;
}

.hero::before,
.card::before,
.form-card::before {
    content: "";
    position: absolute;
    inset: auto -50px -60px auto;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 77, 255, 0.16), transparent 62%);
    pointer-events: none;
}

.hero::after,
.card::after,
.form-card::after {
    content: "";
    position: absolute;
    inset: -40px auto auto -40px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 234, 255, 0.12), transparent 70%);
    pointer-events: none;
}

.section-grid,
.dashboard-grid,
.two-col,
.three-col,
.stats-grid {
    display: grid;
    gap: 16px;
}

.dashboard-grid,
.two-col,
.three-col {
    grid-template-columns: 1fr;
}

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

.metric,
.timeline-item,
.list-item {
    position: relative;
    z-index: 1;
    padding: 15px;
    border-radius: 20px;
}

.metric {
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.btn,
.btn-secondary,
.tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    padding: 12px 16px;
    border: none;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.btn:hover,
.btn-secondary:hover {
    transform: translateY(-1px);
}

.btn {
    color: #070814;
    font-weight: 700;
    background: linear-gradient(135deg, var(--cyan-soft), var(--pink));
    box-shadow:
        0 0 22px rgba(0, 234, 255, 0.28),
        0 0 30px rgba(255, 77, 255, 0.2);
}

.btn:hover {
    box-shadow:
        0 0 28px rgba(0, 234, 255, 0.34),
        0 0 36px rgba(255, 77, 255, 0.28);
}

.btn-secondary {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(0, 234, 255, 0.18);
}

.btn-secondary:hover {
    border-color: rgba(255, 77, 255, 0.3);
    box-shadow: 0 0 24px rgba(255, 77, 255, 0.15);
}

.tag {
    padding: 8px 12px;
    color: var(--cyan-soft);
    border: 1px solid rgba(0, 234, 255, 0.18);
    background: rgba(0, 234, 255, 0.08);
}

.field {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.field input,
.field textarea,
.field select {
    width: 100%;
    padding: 13px 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(6, 8, 20, 0.86);
    color: var(--text);
    box-shadow: inset 0 0 0 1px rgba(0, 234, 255, 0.04);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
    outline: none;
    border-color: rgba(0, 234, 255, 0.38);
    box-shadow: 0 0 0 3px rgba(0, 234, 255, 0.08);
}

.range-grid,
.timeline,
.list-stack {
    display: grid;
    gap: 12px;
}

.range-row {
    display: grid;
    gap: 6px;
}

.range-row output {
    color: var(--cyan-soft);
    font-weight: 700;
}

.progress {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.progress > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--cyan), var(--pink));
}

.auth-shell,
.splash-screen {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
}

.auth-shell {
    background:
        radial-gradient(circle at top, rgba(0, 234, 255, 0.12), transparent 25%),
        radial-gradient(circle at bottom, rgba(255, 77, 255, 0.15), transparent 32%),
        linear-gradient(180deg, #020208 0%, #06020d 100%);
}

.auth-panel {
    width: min(100%, 470px);
    padding: 28px;
}

.auth-brand {
    display: grid;
    justify-items: center;
    gap: 10px;
    margin-bottom: 18px;
    text-align: center;
}

.auth-brand img {
    width: 112px;
    max-width: 44vw;
    filter: drop-shadow(0 0 28px rgba(0, 234, 255, 0.26));
}

.splash-screen {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(rgba(2, 4, 10, 0.4), rgba(0, 0, 0, 0.78)),
        url("../splash-bg.jpg") center/cover no-repeat;
}

.splash-stage {
    position: relative;
    width: min(86vw, 420px);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.splash-wave {
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    width: min(92vw, 700px);
    height: 180px;
    opacity: 0.6;
    background:
        radial-gradient(circle at center, rgba(255, 77, 255, 0.2), transparent 35%),
        linear-gradient(90deg, transparent 0%, rgba(0, 234, 255, 0.8) 22%, rgba(255, 255, 255, 0.95) 50%, rgba(255, 77, 255, 0.82) 78%, transparent 100%);
    clip-path: polygon(0% 53%, 5% 53%, 10% 46%, 14% 63%, 18% 40%, 23% 66%, 28% 37%, 32% 70%, 36% 42%, 40% 57%, 45% 26%, 50% 75%, 55% 33%, 60% 60%, 65% 46%, 70% 67%, 76% 35%, 81% 60%, 86% 48%, 92% 55%, 100% 55%, 100% 62%, 0% 62%);
    filter: blur(1px) drop-shadow(0 0 20px rgba(0, 234, 255, 0.3)) drop-shadow(0 0 18px rgba(255, 77, 255, 0.26));
    animation: wavePulse 2.6s ease-in-out forwards;
}

.splash-logo-wrap {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    width: min(66vw, 280px);
    aspect-ratio: 1;
    border-radius: 50%;
    box-shadow:
        0 0 34px rgba(0, 234, 255, 0.24),
        0 0 52px rgba(255, 77, 255, 0.24);
    animation: logoSequence 2.8s cubic-bezier(0.18, 0.78, 0.2, 1) forwards;
}

.splash-logo-wrap::before {
    content: "";
    position: absolute;
    inset: -16%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 234, 255, 0.18), rgba(255, 77, 255, 0.12) 48%, transparent 72%);
    filter: blur(18px);
}

.splash-logo {
    position: relative;
    width: 100%;
    display: block;
    filter: drop-shadow(0 0 24px rgba(0, 234, 255, 0.28)) drop-shadow(0 0 28px rgba(255, 77, 255, 0.22));
}

.splash-copy {
    position: absolute;
    inset: auto 0 -52px;
    z-index: 2;
    text-align: center;
}

.splash-copy h1 {
    margin: 0;
    font-size: clamp(2.1rem, 8vw, 3.6rem);
    letter-spacing: 0.26em;
    text-transform: uppercase;
}

.splash-copy p {
    margin: 10px 0 0;
    color: #d8dcff;
}

.focus-room {
    padding: 24px;
    min-height: 240px;
}

.sound-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
}

.alert {
    padding: 12px 14px;
    border-radius: 14px;
    margin-bottom: 14px;
}

.alert-error {
    background: rgba(255, 77, 255, 0.1);
    color: var(--magenta);
}

.alert-success {
    background: rgba(0, 234, 255, 0.1);
    color: var(--cyan-soft);
}

.site-footer {
    padding: 18px 8px 0;
    text-align: center;
}

.inline-form {
    display: inline;
}

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

.calendar-cell {
    min-height: 124px;
}

.lock-note {
    color: var(--magenta);
    font-size: 0.92rem;
}

.embed-frame,
.audio-preview {
    width: 100%;
    border: 0;
    border-radius: 18px;
}

.audio-preview {
    height: 54px;
}

@keyframes wavePulse {
    0% { transform: translate(-50%, -50%) scale(0.92); opacity: 0; }
    18% { opacity: 0.62; }
    72% { opacity: 0.84; }
    100% { transform: translate(-50%, -50%) scale(1.08); opacity: 0; }
}

@keyframes logoSequence {
    0% { transform: scale(0.88) rotate(0deg); opacity: 0; }
    12% { opacity: 1; }
    70% { transform: scale(1) rotate(220deg); opacity: 1; }
    82% { transform: scale(1.08) rotate(250deg); opacity: 1; }
    100% { transform: scale(6.8) rotate(262deg); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .splash-wave,
    .splash-logo-wrap {
        animation: none;
    }
}

@media (min-width: 768px) {
    .page-shell {
        padding: 22px 22px 96px;
    }

    .dashboard-grid {
        grid-template-columns: 1.2fr 1fr;
    }

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

    .three-col {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

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