@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

/* ─── Variables ────────────────────────────────────────────── */
:root {
    --bg: #050505;
    --surface: rgba(18, 18, 18, 0.95);
    --surface2: rgba(30, 30, 30, 0.9);
    --border: rgba(255, 255, 255, 0.08);
    --accent: #e63946;
    --accent-glow: rgba(230, 57, 70, 0.3);
    --accent-dim: rgba(230, 57, 70, 0.15);
    --text: #f0f0f0;
    --text-dim: #999;
    --radius: 12px;
    --transition: cubic-bezier(0.4, 0, 0.2, 1);
    --glass: blur(8px) saturate(150%);
}

/* ─── Premium Glow Background ─────────────────────────────── */
body::before {
    content: "";
    position: fixed;
    top: -10%;
    left: -10%;
    width: 40%;
    height: 40%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    z-index: -1;
    filter: blur(80px);
    opacity: 0.3;
    animation: drift 15s infinite alternate ease-in-out;
    pointer-events: none;
    transition: transform 0.2s cubic-bezier(0.1, 0.7, 1.0, 0.1);
}

.playing-audio body::before {
    animation: drift 15s infinite alternate ease-in-out, backgroundBeat 0.5s infinite;
}

@keyframes backgroundBeat {
    0% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.4); opacity: 0.5; }
    100% { transform: scale(1); opacity: 0.3; }
}

@keyframes drift {
    from { transform: translate(0, 0); }
    to { transform: translate(40vw, 20vh); }
}

/* ─── Skeleton Loader ───────────────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg, var(--surface2) 25%, var(--border) 50%, var(--surface2) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius);
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ─── Updated Card ─────────────────────────────────────────── */
.card {
    background: var(--surface);
    backdrop-filter: var(--glass);
    -webkit-backdrop-filter: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    transition: all 0.3s var(--transition);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.card:hover {
    border-color: rgba(230, 57, 70, 0.3);
    transform: translateY(-2px);
}

/* ─── Smooth Modal Transition ──────────────────────────────── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 999;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-overlay.open {
    display: flex;
}

.modal-box {
    transform: scale(0.95);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    width: 100%;
    max-width: 520px;
}

.modal-overlay.open .modal-box {
    transform: scale(1);
    opacity: 1;
    visibility: visible;
}

/* Force animate-pop visibility inside open modals */
.modal-overlay.open .animate-pop {
    opacity: 1 !important;
    visibility: visible !important;
}

/* ─── Fluid Buttons ────────────────────────────────────────── */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s var(--transition);
}

.btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 25px var(--accent-glow);
}

.btn:active {
    transform: translateY(0) scale(0.98);
}

/* ─── Prevent horizontal overflow globally ───────────────────── */
html,
body {
    overflow-x: hidden;
    max-width: 100%;
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ─── Layout ────────────────────────────────────────────────── */
.wrapper {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.wrapper.wide {
    max-width: 680px;
}

/* ─── Header ────────────────────────────────────────────────── */
.site-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.site-header .logo {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2.2rem, 8vw, 3rem);
    letter-spacing: 4px;
    color: var(--text);
    line-height: 1;
}

.site-header .logo span {
    color: var(--accent);
}

.site-header .tagline {
    color: var(--text-dim);
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: 0.25rem;
}

/* ─── Card ──────────────────────────────────────────────────── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    transition: border-color var(--transition);
}

.card-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(1.3rem, 4vw, 1.6rem);
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
    color: var(--text);
}

/* ─── Forms ─────────────────────────────────────────────────── */
.form-group {
    margin-bottom: 1.2rem;
}

label {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 0.4rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
select,
textarea {
    width: 100%;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    padding: 0.75rem 1rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ─── Buttons ───────────────────────────────────────────────── */
.btn {
    display: inline-block;
    width: 100%;
    padding: 0.85rem 2rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: opacity var(--transition), transform 0.1s, box-shadow var(--transition);
    text-align: center;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.btn:hover {
    opacity: 0.88;
    box-shadow: 0 4px 20px rgba(230, 57, 70, 0.25);
}

.btn:active {
    transform: scale(0.98);
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 0;
    margin-top: 0.75rem;
}

.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--text);
    opacity: 1;
    box-shadow: none;
}

.btn:disabled {
    cursor: not-allowed;
    animation: submitting 1s infinite;
}

@keyframes submitting {

    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 0.4;
    }
}

/* ─── Alerts ────────────────────────────────────────────────── */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.alert-error {
    background: rgba(230, 57, 70, 0.1);
    border: 1px solid rgba(230, 57, 70, 0.3);
    color: #ff6b6b;
}

.alert-success {
    background: rgba(42, 157, 143, 0.1);
    border: 1px solid rgba(42, 157, 143, 0.3);
    color: #4ecdc4;
}

/* ─── Song Fields ───────────────────────────────────────────── */
.song-fields {
    margin-top: 1rem;
}

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

.song-number {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    color: var(--accent);
    min-width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.song-field input {
    flex: 1;
    margin: 0;
}

/* ─── Song Count Selector ───────────────────────────────────── */
.song-count-selector {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.count-btn {
    width: 40px;
    height: 40px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-dim);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.count-btn:hover,
.count-btn.active {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent);
}

/* ─── User Bar ──────────────────────────────────────────────── */
.user-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.user-bar .user-name {
    color: var(--text-dim);
    flex-shrink: 0;
}

.user-bar .user-name span {
    color: var(--accent);
    font-weight: 500;
}

.user-bar-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.user-bar a,
.user-bar button.theme-toggle {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
    transition: color var(--transition);
}

.user-bar a:hover {
    color: var(--accent);
}

/* ─── Footer ────────────────────────────────────────────────── */
.site-footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-dim);
    font-size: 0.75rem;
    letter-spacing: 1px;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

/* ─── Misc ──────────────────────────────────────────────────── */
.link {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.85rem;
    transition: opacity var(--transition);
}

.link:hover {
    text-decoration: underline;
}

.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: 1rem;
}

.text-dim {
    color: var(--text-dim);
    font-size: 0.85rem;
}

.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.5rem 0;
}

@keyframes fadeSlideUp {
    from {
        opacity: 0; visibility: hidden;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.spotify-item {
    animation: fadeSlideUp 0.3s var(--transition) forwards;
}

.skeleton-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.5rem;
    align-items: center;
}

.skeleton-img {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.skeleton-text {
    flex: 1;
    height: 12px;
    margin-bottom: 6px;
}

.skeleton-text.short {
    width: 60%;
}

/* ─── Pending Notice ────────────────────────────────────────── */
.pending-notice {
    text-align: center;
    padding: 3rem 1.5rem;
}

.pending-notice h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    letter-spacing: 3px;
    margin-bottom: 1rem;
}

.pending-notice p {
    color: var(--text-dim);
    line-height: 1.6;
}

/* ─── Theme Toggle ──────────────────────────────────────────── */
.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 0.3rem 0.75rem;
    color: var(--text-dim);
    font-size: 0.8rem;
    cursor: pointer;
    letter-spacing: 1px;
    transition: all var(--transition);
    white-space: nowrap;
}

.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--text);
}

/* ─── Spinner ───────────────────────────────────────────────── */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 4px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ─── Privacy Blur ──────────────────────────────────────────── */
.private {
    filter: blur(6px);
    user-select: none;
    transition: filter var(--transition);
    display: inline-block;
}

.privacy-off .private {
    filter: none;
    user-select: auto;
}

.blurred {
    filter: blur(6px);
    user-select: none;
    transition: filter var(--transition);
}

/* ─── Badges / Roles ────────────────────────────────────────── */
.role-dj {
    background: rgba(78, 205, 196, 0.15);
    color: #4ecdc4;
    border: 1px solid rgba(78, 205, 196, 0.3);
}

/* ─── Announcement Banner ───────────────────────────────────── */
.announcement-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    background: rgba(230, 57, 70, 0.12);
    border-bottom: 1px solid rgba(230, 57, 70, 0.35);
    border-left: 3px solid var(--accent);
    font-size: 0.9rem;
    color: var(--text);
    width: 100%;
    box-sizing: border-box;
}

@keyframes slideDown {
    from {
        opacity: 0; visibility: hidden;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.announcement-content {
    flex: 1;
    line-height: 1.5;
}

.ann-dismiss {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem;
    line-height: 1;
    flex-shrink: 0;
    transition: color var(--transition);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ann-dismiss:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}


/* ─── Admin / DJ Shared Top Bar ────────────────────────────────── */
.user-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    gap: 0.75rem;
}

.user-bar .user-name {
    font-size: 0.8rem;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
    min-width: 0;
}

.user-bar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* ─── Hamburger button ──────────────────────────────────────────── */
.admin-hamburger {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    padding: 0.35rem 0.45rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.admin-hamburger span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s;
}

.admin-hamburger:hover {
    border-color: var(--accent);
}

.admin-hamburger:hover span {
    background: var(--accent);
}

/* ─── Drawer overlay ────────────────────────────────────────────── */
.admin-drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 199;
}

.admin-drawer-overlay.open {
    display: block;
}

/* ─── Drawer panel ──────────────────────────────────────────────── */
.admin-drawer {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100%;
    background: var(--surface);
    border-left: 1px solid var(--border);
    z-index: 200;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 0;
}

.admin-drawer.open {
    right: 0;
}

.admin-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem 1.25rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.5rem;
}

.admin-drawer-name span {
    display: block;
    font-size: 0.72rem;
    letter-spacing: 1px;
    color: var(--text-dim);
    text-transform: uppercase;
}

.admin-drawer-name strong {
    display: block;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 2px;
    color: var(--accent);
}

.admin-drawer-close {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.2s;
}

.admin-drawer-close:hover {
    color: var(--text);
}

.admin-drawer a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.5rem;
    color: var(--text);
    text-decoration: none;
    font-size: 0.92rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.admin-drawer a:hover {
    background: var(--surface2);
}

.admin-drawer a:last-child {
    border-bottom: none;
}

.admin-drawer-footer {
    margin-top: auto;
    padding: 1rem 0 0;
    border-top: 1px solid var(--border);
}

/* ─── Light Mode ────────────────────────────────────────────── */
:root.light {
    --bg: #f4f4f4;
    --surface: #ffffff;
    --surface2: #eeeeee;
    --border: #d8d8d8;
    --text: #111111;
    --text-dim: #666666;
    --accent: #e63946;
    --accent-dim: rgba(230, 57, 70, 0.1);
}

/* ─── Responsive ────────────────────────────────────────────── */

/* ─── Table scroll (global) ─────────────────────────────────── */
.table-scroll {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius);
}

/* Tablet / Fold inner screen (up to 960px) */
@media (max-width: 960px) {

    .wrapper,
    .wrapper.wide {
        padding: 1.5rem 1.25rem;
    }

    .card {
        padding: 1.5rem;
    }

    .user-bar {
        flex-wrap: wrap;
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
        gap: 0.5rem;
    }

    .user-bar-links {
        gap: 0.75rem;
        flex-wrap: wrap;
    }
}

/* Mobile */
@media (max-width: 600px) {

    .wrapper,
    .wrapper.wide {
        padding: 1rem;
        justify-content: flex-start;
        padding-top: 1.5rem;
    }

    .card {
        padding: 1.25rem;
    }

    .card-title {
        font-size: 1.2rem !important;
    }

    .site-header {
        margin-bottom: 1.75rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    /* Song fields stack nicely on mobile */
    .song-field {
        gap: 0.5rem;
    }

    .song-number {
        min-width: 18px;
        font-size: 1rem;
    }

    .song-count-selector {
        gap: 0.4rem;
    }

    .count-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    /* User bar: scrollable row instead of stacking */
    .user-bar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
        padding: 0.6rem 1rem;
        overflow: hidden;
        gap: 0.5rem;
    }

    .user-bar-links {
        gap: 0.6rem;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        max-width: calc(100% - 100px);
        padding-bottom: 2px;
    }

    .user-bar-links::-webkit-scrollbar {
        display: none;
    }

    .user-bar-links a,
    .user-bar-links button {
        white-space: nowrap;
        font-size: 0.72rem;
        flex-shrink: 0;
    }

    table {
        font-size: 0.8rem;
        min-width: 480px;
    }

    th,
    td {
        padding: 0.6rem 0.75rem;
    }

    /* Announcement banner tighter on mobile */
    .announcement-banner {
        padding: 0.65rem 1rem;
        font-size: 0.85rem;
    }

    /* Stats grid 2 cols always on mobile */
    .stats-bar {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem;
    }

    .stat-card {
        padding: 0.75rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    /* Settings grid single col */
    .settings-grid {
        grid-template-columns: 1fr !important;
    }

    /* Admin table actions wrap */
    .icon-btn-group {
        flex-wrap: wrap;
    }

    /* DJ header wraps */
    .dj-header {
        flex-wrap: wrap;
        gap: 0.75rem;
        padding: 0.75rem 1rem !important;
    }

    .dj-title {
        font-size: 1.1rem !important;
    }

    /* Requests grid single col */
    .requests-grid,
    .history-grid {
        grid-template-columns: 1fr !important;
        padding: 1rem !important;
    }

    /* Tabs scroll horizontally */
    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 0 0.5rem !important;
    }

    .tabs::-webkit-scrollbar {
        display: none;
    }

    .tab-btn {
        padding: 0.75rem 1rem !important;
        font-size: 0.9rem !important;
        white-space: nowrap;
    }

    /* History toolbar stacks on mobile */
    .history-toolbar {
        padding: 1rem !important;
        gap: 0.6rem !important;
        flex-direction: column;
        align-items: flex-start;
    }

    .history-toolbar input[type="date"] {
        width: 100%;
    }

    /* Modal full screen on mobile */
    .modal-overlay {
        padding: 0 !important;
        align-items: flex-end !important;
    }

    .modal-box {
        border-radius: var(--radius) var(--radius) 0 0 !important;
        max-height: 90vh;
        overflow-y: auto;
    }

    /* Folder modal full height */
    .folder-modal {
        max-height: 92vh !important;
        border-radius: var(--radius) var(--radius) 0 0 !important;
    }
}

/* Very small screens */
@media (max-width: 380px) {
    .stats-bar {
        grid-template-columns: 1fr 1fr !important;
    }

    .count-btn {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .tab-btn {
        padding: 0.65rem 0.75rem !important;
    }
}

/* ─── View Transitions (App-like Page Flips) ────────────────── */
@view-transition {
    navigation: auto;
}

/* ─── Pulsing "NEW" Badge ─────────────────────────────────── */
.new-badge {
    background: var(--accent);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-left: 8px;
    box-shadow: 0 0 10px var(--accent-glow);
    animation: pulse-glow 2s infinite;
    display: inline-block;
    vertical-align: middle;
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 5px var(--accent-glow); transform: scale(1); }
    50% { box-shadow: 0 0 15px var(--accent-glow); transform: scale(1.05); }
    100% { box-shadow: 0 0 5px var(--accent-glow); transform: scale(1); }
}

/* ─── Micro-Haptics for Interaction ────────────────────────── */
.btn, .count-btn, .icon-btn, .tab-btn {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.btn:active, .count-btn:active, .icon-btn:active, .tab-btn:active {
    transform: scale(0.94) !important;
    filter: brightness(1.2);
}

/* ─── Music Visualizer ─────────────────────────────────────── */
.visualizer {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 15px;
    width: 20px;
}

.visualizer span {
    width: 3px;
    background: var(--accent);
    animation: bounce 0.5s ease-in-out infinite alternate;
    border-radius: 1px;
}

.visualizer span:nth-child(2) { animation-delay: 0.1s; height: 60%; }
.visualizer span:nth-child(3) { animation-delay: 0.2s; height: 30%; }
.visualizer span:nth-child(4) { animation-delay: 0.3s; height: 80%; }

@keyframes bounce {
    from { height: 20%; }
    to { height: 100%; }
}

/* ─── Floating Labels ──────────────────────────────────────── */
.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-group input {
    padding-top: 1.2rem !important;
}

.input-group label {
    position: absolute;
    top: 0.8rem;
    left: 1rem;
    font-size: 0.9rem;
    letter-spacing: 0;
    text-transform: none;
    pointer-events: none;
    transition: all 0.2s var(--transition);
    color: var(--text-dim);
}

.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label {
    top: 0.3rem;
    left: 1rem;
    font-size: 0.65rem;
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ─── Success Confetti ────────────────────────────────────── */
@keyframes confettiFall {
    0% { transform: translate(-50%, -50%) scale(0) rotate(0deg); opacity: 1; }
    30% { transform: translate(calc(-50% + var(--tx) * 0.5), calc(-50% + var(--ty) * 0.5)) scale(1); opacity: 1; }
    100% { transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty) + 200px)) scale(0) rotate(720deg); opacity: 0; visibility: hidden; }
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 2px;
    pointer-events: none;
    z-index: 99999;
    animation: confettiFall 1.8s cubic-bezier(0.1, 0.5, 0.3, 1) forwards;
}

/* ─── Scrollbar styling ─────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-dim);
}

/* ─── Card Pop Entrance ────────────────────────────────────── */
.animate-pop {
    opacity: 0;
    visibility: hidden;
    will-change: transform, opacity;
    animation: cardPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* Disable animations during View Transitions to prevent double-flashing */
::view-transition-new(root),
::view-transition-old(root) {
    animation-duration: 0.3s;
}

/* :root::view-transition-new(*) {
    animation: none !important;
} */

.no-animate .animate-pop {
    opacity: 1 !important;
    visibility: visible !important;
    animation: none !important;
    transform: none !important;
    will-change: auto !important;
}

@keyframes cardPop {
    0% { 
        opacity: 0; 
        visibility: hidden;
        transform: scale(0.96) translateY(10px); 
    }
    1% {
        visibility: visible;
    }
    100% { 
        opacity: 1; 
        visibility: visible;
        transform: scale(1) translateY(0); 
    }
}

/* ─── Admin Stats Elevation ───────────────────────────────── */
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.4s var(--transition);
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--accent);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5), 0 0 15px var(--accent-dim);
}

.stat-value {
    transition: transform 0.4s var(--transition);
}

.stat-card:hover .stat-value {
    transform: scale(1.1);
}

/* ─── Selection ─────────────────────────────────────────────── */
::selection {
    background: rgba(230, 57, 70, 0.3);
    color: var(--text);
}

.preview-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--surface2);
    border: 2px solid #4ecdc4;
    color: #4ecdc4;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s var(--transition);
    margin-left: auto;
    font-size: 0.9rem;
    box-shadow: 0 0 10px rgba(78, 205, 196, 0.2);
    flex-shrink: 0;
}

.preview-btn:hover {
    background: #4ecdc4;
    color: #000;
    transform: scale(1.15);
    box-shadow: 0 0 20px rgba(78, 205, 196, 0.5);
}

.preview-btn.playing {
    background: #4ecdc4;
    color: #000;
    animation: pulse-glow-teal 1s infinite;
}

@keyframes pulse-glow-teal {
    0% { box-shadow: 0 0 5px #4ecdc4; }
    50% { box-shadow: 0 0 20px #4ecdc4; }
    100% { box-shadow: 0 0 5px #4ecdc4; }
}
/* ─── Live Similarity Warning ───────────────────────────────── */
.live-warning {
    font-size: 0.8rem;
    color: #ffb703;
    background: rgba(255, 183, 3, 0.08);
    border: 1px solid rgba(255, 183, 3, 0.3);
    border-radius: 6px;
    padding: 0.4rem 0.75rem;
    margin-top: 0.5rem;
    animation: fadeSlideUp 0.2s ease;
}

.hidden { visibility: hidden; }


/* ── Elite Navigation (Site-wide) ── */
.top-bar { position: sticky; top: 0; z-index: 100; background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 1rem; height: 52px; }
.top-bar-logo { font-family: 'Bebas Neue', sans-serif; font-size: 1.3rem; letter-spacing: 3px; color: var(--text); text-decoration: none; }
.top-bar-logo span { color: var(--accent); }
.top-bar-right { display: flex; align-items: center; gap: 0.75rem; }
.hamburger { background: none; border: none; cursor: pointer; padding: 0.4rem; color: var(--text); font-size: 1.3rem; display: flex; flex-direction: column; gap: 5px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all 0.3s; }

.nav-drawer {
    position: fixed; top: 0; right: -280px; width: 280px; height: 100%;
    background: var(--surface); border-left: 1px solid var(--border);
    z-index: 200; transition: right 0.3s ease; display: flex; flex-direction: column; padding: 1.5rem 0;
}
.nav-drawer.open { right: 0; }
.nav-drawer-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); z-index: 199; }
.nav-drawer-overlay.open { display: block; }
.nav-drawer-header { display: flex; justify-content: space-between; align-items: center; padding: 0 1.5rem 1.5rem; border-bottom: 1px solid var(--border); margin-bottom: 0.5rem; }
.nav-drawer-name { font-size: 0.8rem; letter-spacing: 1px; color: var(--text-dim); }
.nav-drawer-name strong { display: block; font-size: 1rem; color: var(--accent); font-family: 'Bebas Neue', sans-serif; letter-spacing: 2px; }
.nav-drawer a { display: flex; align-items: center; gap: 0.75rem; padding: 0.9rem 1.5rem; color: var(--text); text-decoration: none; font-size: 0.95rem; transition: background 0.15s; border-bottom: 1px solid var(--border); }
.nav-drawer a:hover { background: var(--surface2); }
.nav-drawer a:last-child { border-bottom: none; }
.nav-drawer a .nav-icon { font-size: 1.1rem; width: 24px; text-align: center; }
.nav-drawer-footer { margin-top: auto; padding: 1rem 1.5rem 0; border-top: 1px solid var(--border); }

.bottom-nav {
    display: none; position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--surface); border-top: 1px solid var(--border); z-index: 100; height: 60px;
}
.bottom-nav-inner { display: flex; height: 100%; }
.bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--text-dim); font-size: 0.6rem; letter-spacing: 1px; text-transform: uppercase; transition: color 0.15s; }
.bottom-nav a.active, .bottom-nav a:hover { color: var(--accent); }
.bottom-nav a .bn-icon { font-size: 1.2rem; line-height: 1; }

@media (max-width: 600px) {
    .bottom-nav { display: block; }
    .wrapper, .wrapper.wide { padding-bottom: 70px; }
    .user-bar { display: none !important; }
    .top-bar { display: flex; }
}
@media (min-width: 601px) {
    .hamburger, .top-bar { display: none; }
    .user-bar { display: flex !important; }
}

/* ═══════════════════════════════════════════════════════════════
   VISUAL POLISH & FLUIDITY ENHANCEMENTS
   ═══════════════════════════════════════════════════════════════ */

/* ─── Second Ambient Glow Orb (background "breathes") ─────── */
body::after {
    content: "";
    position: fixed;
    bottom: -10%;
    right: -10%;
    width: 45%;
    height: 45%;
    background: radial-gradient(circle, rgba(78, 205, 196, 0.15) 0%, transparent 70%);
    z-index: -1;
    filter: blur(90px);
    opacity: 0.25;
    animation: drift-reverse 18s infinite alternate ease-in-out;
    pointer-events: none;
}

@keyframes drift-reverse {
    from { transform: translate(0, 0); }
    to   { transform: translate(-30vw, -15vh); }
}

/* ─── Enhanced Card Hover — Magnetic Glow Lift ─────────────── */
.card:hover {
    border-color: rgba(230, 57, 70, 0.4);
    transform: translateY(-4px);
    box-shadow:
        0 4px 12px rgba(0,0,0,0.4),
        0 16px 40px rgba(0,0,0,0.5),
        0 0 0 1px rgba(230, 57, 70, 0.12),
        0 0 30px rgba(230, 57, 70, 0.1);
}

/* ─── Button Ripple Effect ──────────────────────────────────── */
.btn {
    isolation: isolate;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, transparent 60%);
    border-radius: inherit;
    pointer-events: none;
}

.btn-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: scale(0);
    animation: ripple-out 0.55s ease-out forwards;
    pointer-events: none;
}

@keyframes ripple-out {
    to { transform: scale(4); opacity: 0; }
}

/* ─── Primary Button Shimmer Sweep ─────────────────────────── */
.btn:not(.btn-ghost):not(.btn-secondary)::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transform: skewX(-20deg);
    animation: btn-shimmer 3.5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes btn-shimmer {
    0%   { left: -100%; }
    40%  { left: 160%; }
    100% { left: 160%; }
}

/* ─── Animated Nav Link Underlines (desktop) ────────────────── */
.user-bar a {
    position: relative;
}

.user-bar a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.25s ease;
}

.user-bar a:hover::after {
    width: 100%;
}

/* ─── Drawer Link Stagger (applied by JS when open) ────────── */
.nav-drawer.open a {
    animation: drawer-link-in 0.3s ease both;
}
.nav-drawer.open a:nth-child(1) { animation-delay: 0.04s; }
.nav-drawer.open a:nth-child(2) { animation-delay: 0.08s; }
.nav-drawer.open a:nth-child(3) { animation-delay: 0.12s; }
.nav-drawer.open a:nth-child(4) { animation-delay: 0.16s; }
.nav-drawer.open a:nth-child(5) { animation-delay: 0.20s; }
.nav-drawer.open a:nth-child(6) { animation-delay: 0.24s; }

@keyframes drawer-link-in {
    from { opacity: 0; transform: translateX(16px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ─── Bottom Nav Active Dot Indicator ──────────────────────── */
.bottom-nav a.active {
    position: relative;
}

.bottom-nav a.active::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse-glow 2s infinite;
}

/* ─── Input Focus Pulse ─────────────────────────────────────── */
input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow:
        0 0 0 3px rgba(230, 57, 70, 0.12),
        0 0 12px rgba(230, 57, 70, 0.08);
    animation: focus-pulse 0.4s ease;
}

@keyframes focus-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.4); }
    70%  { box-shadow: 0 0 0 8px rgba(230, 57, 70, 0); }
    100% { box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.12), 0 0 12px rgba(230, 57, 70, 0.08); }
}

/* ─── Logo Shimmer on Load ──────────────────────────────────── */
.site-header .logo {
    position: relative;
    overflow: hidden;
}

.site-header .logo::after {
    content: '';
    position: absolute;
    top: 0;
    left: -80%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
    transform: skewX(-20deg);
    animation: logo-shimmer 1.2s ease 0.3s 1 forwards;
    pointer-events: none;
}

@keyframes logo-shimmer {
    from { left: -80%; }
    to   { left: 160%; }
}

/* ─── Scroll Reveal (cards not in viewport) ─────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─── Deeper User-bar Backdrop ──────────────────────────────── */
.user-bar {
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    background: rgba(12, 12, 12, 0.85);
}

.top-bar {
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    background: rgba(12, 12, 12, 0.85);
}

/* ─── Site Header Tagline Glow ──────────────────────────────── */
.site-header .tagline {
    animation: fadeSlideUp 0.6s ease 0.2s both;
}

/* ─── Song Field Wrapper subtle entrance ────────────────────── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.song-field-wrapper {
    animation: fadeIn 0.35s ease both;
}

/* ─── Dash Buttons (dashboard grid) ── Enhanced Hover ──────── */
.dash-btn:hover {
    border-color: var(--accent);
    transform: translateY(-6px) scale(1.01);
    box-shadow:
        0 12px 35px rgba(0,0,0,0.4),
        0 0 20px rgba(230, 57, 70, 0.12);
}

/* ─── Landing buttons depth ─────────────────────────────────── */
.landing-btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(230, 57, 70, 0.35);
    transition: all 0.25s ease;
}

.landing-btn-secondary:hover {
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    transition: all 0.25s ease;
}
