/* ---------------------- FONT ---------------------- */
@font-face {
    font-family: 'ContinuumMedium';
    src: url('ContinuumMedium.woff2') format('woff2'); 
    font-weight: normal;
    font-style: normal;
}

/* ---------------------- ANIMATED GRADIENT BACKGROUND ---------------------- */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ---------------------- GLOBAL ---------------------- */
body {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0a1a 25%, #0a1a1a 50%, #1a1a0a 75%, #0a0a0a 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    color: #fff;
    font-family: 'ContinuumMedium', sans-serif;
    text-align: center;
    padding-top: 40px;
    margin: 0;
    overflow-x: hidden;
    opacity: 0;
    animation: fadeIn 1.2s ease forwards, gradientShift 15s ease infinite;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

h1 {
    font-size: 48px;
    margin: 20px 0 10px 0;
    cursor: pointer;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
    z-index: 10;
    position: relative;
}

/* ---------------------- 3D LOGO WITH LIQUID GLASS ---------------------- */
.interactive-logo {
    width: 250px;
    height: 250px; 
    max-width: 70%;
    margin-bottom: 15px;
    cursor: pointer;
    border-radius: 50%;
    object-fit: cover;
    will-change: transform;
    transition: all 0.3s ease;
    transform-style: preserve-3d;
    
    /* Liquid Glass Effect */
    border: 1px solid rgba(115, 183, 255, 0.3);
    box-shadow: 
        0 1px 8px rgba(0, 0, 0, 0.1),
        0 0 2px rgba(0, 0, 0, 0.1),
        inset 0 0 8px rgba(115, 183, 255, 0.15),
        inset 0 0 0 1px rgba(166, 166, 166, 0.2),
        inset -2px -2px 0.5px -2px rgba(38, 38, 38, 0.3),
        inset 2px 2px 0.5px -2px rgba(38, 38, 38, 0.3),
        inset 3px 3px 0.5px -3.5px rgba(255, 255, 255, 0.3);
    
    backdrop-filter: blur(6px) brightness(100%);
    -webkit-backdrop-filter: blur(6px) brightness(100%);
    padding: 8px; 
    background: linear-gradient(135deg, rgba(23, 23, 23, 0.6), rgba(23, 23, 23, 0.6)),
                linear-gradient(135deg, rgba(115, 183, 255, 0.15), rgba(140, 140, 140, 0.15));
    position: relative;
    z-index: 10;
}

.interactive-logo:hover {
    transform: translateY(-8px) scale(1.08) rotateY(10deg);
    box-shadow: 
        0 15px 50px rgba(115, 183, 255, 0.4),
        inset 0 0 30px rgba(115, 183, 255, 0.25),
        inset 0 0 0 1px rgba(255, 255, 255, 0.3);
    border-color: rgba(74, 144, 226, 0.5);
}

.interactive-logo:active {
    transform: translateY(-2px) scale(0.98);
}

/* ---------------------- 3D COUNTDOWN WITH LIQUID GLASS ---------------------- */
#countdown-wrapper {
    position: relative;
    display: inline-block;
    perspective: 1000px;
    z-index: 10;
}

#countdown {
    font-size: 42px;
    letter-spacing: 3px;
    margin: 10px 0 30px 0;
    cursor: pointer;
    position: relative;
    text-shadow: 0 0 20px #ff00cc, 0 0 40px #ff0066;
    font-family: 'ContinuumMedium', monospace;
    color: #ffffff;
    padding: 15px 35px;
    border-radius: 100px;
    
    /* Liquid Glass Effect */
    overflow: hidden;
    box-shadow: 
        0 1px 8px rgba(0, 0, 0, 0.1),
        0 0 2px rgba(0, 0, 0, 0.1),
        inset 0 0 8px rgba(242, 242, 242, 0.1),
        inset 0 0 0 1px rgba(166, 166, 166, 0.2),
        inset -2px -2px 0.5px -2px rgba(38, 38, 38, 0.3),
        inset 2px 2px 0.5px -2px rgba(38, 38, 38, 0.3),
        inset 3px 3px 0.5px -3.5px rgba(255, 255, 255, 0.3);
    
    backdrop-filter: blur(6px) brightness(100%);
    -webkit-backdrop-filter: blur(6px) brightness(100%);
    background: linear-gradient(135deg, rgba(23, 23, 23, 0.7), rgba(23, 23, 23, 0.7)),
                linear-gradient(135deg, rgba(255, 0, 204, 0.15), rgba(140, 140, 140, 0.15));
    
    will-change: transform;
    transition: all 0.3s ease;
    transform-style: preserve-3d;
    border: 1px solid rgba(255, 0, 204, 0.3);
}

#countdown:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 
        0 10px 40px rgba(255, 0, 204, 0.4),
        inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

#countdown:active {
    transform: translateY(0px) scale(0.95);
}

#countdown::after {
    content: "🌸";
    position: absolute;
    right: -60px;
    top: -10px;
    font-size: 32px;
    animation: blossomFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.8));
}

@keyframes blossomFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ---------------------- BACKGROUND FIGURES (BLOSSOMS) ---------------------- */
.blossom {
    position: fixed;
    font-size: 24px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.8;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.6));
}

@keyframes blossomFall {
    0%   { transform: translateY(-50px) rotate(0); opacity: 0; }
    10%  { opacity: 1; }
    100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}

/* ---------------------- LIQUID GLASS BUTTONS ---------------------- */
.nav-tabs {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 15px;
  z-index: 10000;
}

.action-btn {
    background: linear-gradient(135deg, rgba(23, 23, 23, 0.7), rgba(23, 23, 23, 0.7)),
                linear-gradient(135deg, rgba(115, 183, 255, 0.15), rgba(140, 140, 140, 0.15));
    backdrop-filter: blur(6px) brightness(100%);
    -webkit-backdrop-filter: blur(6px) brightness(100%);
    
    color: #fff;
    border: 1px solid rgba(115, 183, 255, 0.3);
    padding: 12px 24px;
    cursor: pointer;
    font-family: 'ContinuumMedium', sans-serif;
    font-size: 14px;
    border-radius: 100px;
    transition: all 0.3s ease;
    overflow: hidden;
    
    /* Liquid Glass Shadow */
    box-shadow: 
        0 1px 8px rgba(0, 0, 0, 0.1),
        0 0 2px rgba(0, 0, 0, 0.1),
        inset 0 0 8px rgba(242, 242, 242, 0.1),
        inset 0 0 0 1px rgba(166, 166, 166, 0.2),
        inset -2px -2px 0.5px -2px rgba(38, 38, 38, 0.3),
        inset 2px 2px 0.5px -2px rgba(38, 38, 38, 0.3),
        inset 3px 3px 0.5px -3.5px rgba(255, 255, 255, 0.3);
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 5px 20px rgba(115, 183, 255, 0.4),
        inset 0 0 0 1px rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, rgba(40, 40, 40, 0.8), rgba(40, 40, 40, 0.8)),
                linear-gradient(135deg, rgba(115, 183, 255, 0.25), rgba(140, 140, 140, 0.2));
    border-color: rgba(255, 255, 255, 0.4);
}

.action-btn:active {
    transform: translateY(-1px);
}

/* ---------------------- IMPROVED LIQUID GLASS PANEL ---------------------- */
.tilt-container {
    perspective: 1000px;
    margin: 40px auto;
    max-width: 500px;
    width: 90%;
    z-index: 10;
    position: relative;
}

.info-panel {
    background: linear-gradient(135deg, rgba(23, 23, 23, 0.6), rgba(23, 23, 23, 0.6)),
                linear-gradient(135deg, rgba(115, 183, 255, 0.1), rgba(140, 140, 140, 0.1));
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 30px;
    
    /* Enhanced Liquid Glass Shadow */
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.5),
        0 1px 8px rgba(0, 0, 0, 0.1),
        0 0 2px rgba(0, 0, 0, 0.1),
        inset 0 0 8px rgba(242, 242, 242, 0.08),
        inset 0 0 0 1px rgba(166, 166, 166, 0.15),
        inset -2px -2px 0.5px -2px rgba(38, 38, 38, 0.3),
        inset 2px 2px 0.5px -2px rgba(38, 38, 38, 0.3),
        inset 3px 3px 0.5px -3.5px rgba(255, 255, 255, 0.2);
    
    will-change: transform;
    transform-style: preserve-3d;
    transition: all 0.3s ease;
}

.panel-header h2 {
    color: #73b7ff;
    font-size: 26px;
    margin: 0 0 20px 0;
    text-shadow: 0 0 15px rgba(115, 183, 255, 0.6);
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.info-item:hover {
    background: rgba(255, 255, 255, 0.05);
    padding-left: 10px;
    padding-right: 10px;
    border-radius: 8px;
    transition: 0.3s;
}

.label { color: #ddd; font-weight: bold; }
.value { color: #fff; text-shadow: 0 0 8px rgba(255,255,255,0.4); }

/* ---------------------- SOCIAL BUTTONS WITH LIQUID GLASS ---------------------- */
.social-buttons {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.social-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(23, 23, 23, 0.6), rgba(23, 23, 23, 0.6)),
                linear-gradient(135deg, rgba(115, 183, 255, 0.1), rgba(140, 140, 140, 0.1));
    backdrop-filter: blur(6px) brightness(100%);
    -webkit-backdrop-filter: blur(6px) brightness(100%);
    
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(115, 183, 255, 0.3);
    
    /* Liquid Glass Shadow */
    box-shadow: 
        0 1px 8px rgba(0, 0, 0, 0.1),
        0 0 2px rgba(0, 0, 0, 0.1),
        inset 0 0 8px rgba(242, 242, 242, 0.1),
        inset 0 0 0 1px rgba(166, 166, 166, 0.2),
        inset -2px -2px 0.5px -2px rgba(38, 38, 38, 0.3),
        inset 2px 2px 0.5px -2px rgba(38, 38, 38, 0.3),
        inset 3px 3px 0.5px -3.5px rgba(255, 255, 255, 0.3);
}

.social-btn:hover {
    transform: translateY(-5px) scale(1.1);
    background: linear-gradient(135deg, rgba(115, 183, 255, 0.8), rgba(115, 183, 255, 0.8)),
                linear-gradient(135deg, rgba(140, 140, 140, 0.2), rgba(115, 183, 255, 0.2));
    box-shadow: 
        0 0 25px rgba(115, 183, 255, 0.9),
        inset 0 0 0 1px rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.5);
}

.social-btn img {
    width: 22px;
    height: 22px;
    filter: brightness(0) invert(1);
}

/* ---------------------- USAGI & PEAM ---------------------- */
#usagi {
    position: fixed;
    bottom: -350px;
    right: 20px;
    width: 200px;
    z-index: 9999;
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
.slide-up { transform: translateY(-350px); }
.slide-down { transform: translateY(350px); }

/* ---------------------- MUSIC OVERLAY ---------------------- */
#musicOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    cursor: pointer;
    transition: opacity 0.8s ease;
}

.music-content h1 {
    font-size: 2.5rem;
    animation: pulseText 2s ease-in-out infinite;
}

@keyframes pulseText {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); text-shadow: 0 0 30px #ff00cc; }
}

body:not(.music-started) .main-content {
    opacity: 0.1;
    filter: blur(5px);
    pointer-events: none;
    transition: all 1s ease;
}

body.music-started .main-content {
    opacity: 1;
    filter: blur(0);
    pointer-events: all;
}

/* ---------------------- VISUALIZER ---------------------- */
#canvasVisualizer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 1;
}

/* ---------------------- RESPONSIVE DESIGN ---------------------- */

/* Tablets and small laptops (768px - 1024px) */
@media (max-width: 1024px) {
    body {
        padding-top: 30px;
    }
    
    h1 {
        font-size: 40px;
    }
    
    .interactive-logo {
        width: 220px;
        height: 220px;
    }
    
    #countdown {
        font-size: 36px;
        padding: 12px 28px;
    }
    
    #countdown::after {
        right: -50px;
        font-size: 28px;
    }
    
    .tilt-container {
        max-width: 450px;
    }
    
    .info-panel {
        padding: 25px;
    }
    
    .panel-header h2 {
        font-size: 24px;
    }
}

/* Mobile landscape and small tablets (481px - 767px) */
@media (max-width: 767px) {
    body {
        padding-top: 20px;
        padding-bottom: 80px;
    }
    
    h1 {
        font-size: 36px;
        margin: 15px 0 8px 0;
    }
    
    .interactive-logo {
        width: 200px;
        height: 200px;
        margin-bottom: 10px;
    }
    
    #countdown {
        font-size: 28px;
        padding: 10px 24px;
        letter-spacing: 2px;
    }
    
    #countdown::after {
        right: -45px;
        top: -8px;
        font-size: 24px;
    }
    
    .nav-tabs {
        top: auto;
        bottom: 15px;
        right: 50%;
        transform: translateX(50%);
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
        max-width: 90%;
    }
    
    .action-btn {
        padding: 10px 18px;
        font-size: 13px;
    }
    
    .tilt-container {
        max-width: 90%;
        margin: 30px auto;
    }
    
    .info-panel {
        padding: 20px;
        border-radius: 12px;
    }
    
    .panel-header h2 {
        font-size: 22px;
        margin: 0 0 15px 0;
    }
    
    .info-item {
        padding: 10px 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .social-buttons {
        gap: 20px;
        margin-top: 20px;
    }
    
    .social-btn {
        width: 42px;
        height: 42px;
    }
    
    .social-btn img {
        width: 20px;
        height: 20px;
    }
    
    #usagi {
        width: 150px;
        right: 10px;
        bottom: -300px;
    }
    
    .slide-up {
        transform: translateY(-300px);
    }
    
    .music-content h1 {
        font-size: 2rem;
        padding: 0 20px;
    }
}

/* Mobile portrait (320px - 480px) */
@media (max-width: 480px) {
    body {
        padding-top: 15px;
        padding-bottom: 90px;
    }
    
    h1 {
        font-size: 28px;
        margin: 10px 0 5px 0;
    }
    
    .interactive-logo {
        width: 160px;
        height: 160px;
        margin-bottom: 8px;
    }
    
    .interactive-logo:hover {
        transform: translateY(-5px) scale(1.05);
    }
    
    #countdown {
        font-size: 20px;
        padding: 8px 16px;
        letter-spacing: 1px;
        margin: 8px 0 20px 0;
    }
    
    #countdown::after {
        right: -35px;
        top: -5px;
        font-size: 20px;
    }
    
    .nav-tabs {
        bottom: 10px;
        gap: 8px;
        width: 100%;
        padding: 0 10px;
        box-sizing: border-box;
    }
    
    .action-btn {
        padding: 8px 14px;
        font-size: 12px;
        flex: 1;
        max-width: 120px;
    }
    
    .tilt-container {
        max-width: 95%;
        margin: 20px auto;
    }
    
    .info-panel {
        padding: 18px;
        border-radius: 10px;
        /* Disable 3D tilt on mobile for better performance */
        transform: none !important;
    }
    
    .panel-header h2 {
        font-size: 20px;
        margin: 0 0 12px 0;
    }
    
    .info-item {
        padding: 8px 0;
        font-size: 14px;
    }
    
    .label {
        font-size: 13px;
    }
    
    .value {
        font-size: 13px;
        word-break: break-all;
    }
    
    .social-buttons {
        gap: 15px;
        margin-top: 18px;
        padding-top: 12px;
    }
    
    .social-btn {
        width: 38px;
        height: 38px;
    }
    
    .social-btn:hover {
        transform: translateY(-3px) scale(1.08);
    }
    
    .social-btn img {
        width: 18px;
        height: 18px;
    }
    
    #usagi {
        width: 120px;
        right: 5px;
        bottom: -250px;
    }
    
    .slide-up {
        transform: translateY(-250px);
    }
    
    .blossom {
        font-size: 18px;
    }
    
    .music-content h1 {
        font-size: 1.5rem;
        padding: 0 15px;
        text-align: center;
    }
}

/* Very small mobile devices (< 360px) */
@media (max-width: 360px) {
    h1 {
        font-size: 24px;
    }
    
    .interactive-logo {
        width: 140px;
        height: 140px;
    }
    
    #countdown {
        font-size: 18px;
        padding: 6px 12px;
    }
    
    #countdown::after {
        right: -30px;
        font-size: 18px;
    }
    
    .action-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .info-panel {
        padding: 15px;
    }
    
    .panel-header h2 {
        font-size: 18px;
    }
    
    .info-item {
        font-size: 13px;
    }
    
    .social-btn {
        width: 35px;
        height: 35px;
    }
}

/* Landscape orientation on mobile */
@media (max-height: 500px) and (orientation: landscape) {
    body {
        padding-top: 10px;
        padding-bottom: 60px;
    }
    
    h1 {
        font-size: 24px;
        margin: 5px 0;
    }
    
    .interactive-logo {
        width: 120px;
        height: 120px;
        margin-bottom: 5px;
    }
    
    #countdown {
        font-size: 18px;
        padding: 6px 12px;
        margin: 5px 0 15px 0;
    }
    
    .tilt-container {
        margin: 15px auto;
    }
    
    .info-panel {
        padding: 15px;
    }
    
    .panel-header h2 {
        font-size: 18px;
        margin: 0 0 10px 0;
    }
    
    .info-item {
        padding: 6px 0;
    }
    
    .social-buttons {
        margin-top: 12px;
        padding-top: 10px;
    }
    
    #usagi {
        width: 100px;
    }
}
/* =====================================================
   DYNAMIC ISLAND MUSIC PLAYER
   ===================================================== */

/* --- Wrapper: always fixed top-center --- */
#di-wrapper {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- The pill itself --- */
#di-pill {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #0a0a0a;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 999px;
    box-shadow:
        0 4px 32px rgba(0,0,0,0.7),
        inset 0 1px 0 rgba(255,255,255,0.06);
    cursor: pointer;
    overflow: hidden;
    user-select: none;

    /* Compact pill dimensions */
    width: 240px;
    height: 48px;
    padding: 0 12px 0 12px;
    gap: 10px;

    /* Smooth morph */
    transition:
        width  0.55s cubic-bezier(0.34,1.56,0.64,1),
        height 0.55s cubic-bezier(0.34,1.56,0.64,1),
        border-radius 0.45s ease,
        padding 0.45s ease,
        box-shadow 0.3s ease;
    will-change: width, height;
}

/* --- Expanded state --- */
#di-pill.expanded {
    width: min(420px, 92vw);
    height: 180px;
    border-radius: 28px;
    padding: 18px 20px;
    cursor: default;
    box-shadow:
        0 12px 50px rgba(0,0,0,0.8),
        inset 0 1px 0 rgba(255,255,255,0.08);
}

/* ---- COMPACT INNER LAYOUT ---- */
#di-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 0;
    opacity: 1;
    transition: opacity 0.2s ease;
}
#di-pill.expanded #di-compact {
    opacity: 0;
    pointer-events: none;
    position: absolute;
}

/* Vinyl disk — compact */
.di-vinyl {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: repeating-radial-gradient(#333 0, #222 2px, #333 4px);
    border: 1.5px solid rgba(115,183,255,0.5);
    flex-shrink: 0;
    position: relative;
    box-shadow: 0 0 8px rgba(0,0,0,0.6);
}
.di-vinyl::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    width: 8px; height: 8px;
    background: #0a0a0a;
    border-radius: 50%;
    border: 1px solid rgba(115,183,255,0.4);
}
.di-vinyl.rotating { animation: diSpin 3s linear infinite; }
@keyframes diSpin { to { transform: rotate(360deg); } }

/* Left group: vinyl + title — takes all available space, clips overflow */
.di-compact-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

/* Track title — constrained so it never pushes EQ out */
.di-track-compact {
    font-size: 12px;
    font-family: 'ContinuumMedium', sans-serif;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
    min-width: 0;
    flex: 1;
}

/* Equalizer bars — pinned to far right with margin-left: auto */
.di-eq {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 20px;
    flex-shrink: 0;
    margin-left: auto;
    padding-left: 10px;
}
.di-eq span {
    display: block;
    width: 3px;
    background: #73b7ff;
    border-radius: 2px;
    transition: height 0.1s ease;
}
.di-eq.playing span:nth-child(1) { animation: eqBar 0.7s ease-in-out infinite alternate; }
.di-eq.playing span:nth-child(2) { animation: eqBar 0.5s ease-in-out 0.1s infinite alternate; }
.di-eq.playing span:nth-child(3) { animation: eqBar 0.8s ease-in-out 0.05s infinite alternate; }
.di-eq.playing span:nth-child(4) { animation: eqBar 0.6s ease-in-out 0.15s infinite alternate; }
@keyframes eqBar {
    0%   { height: 3px;  opacity: 0.5; }
    100% { height: 18px; opacity: 1;   }
}
.di-eq:not(.playing) span { height: 4px; opacity: 0.3; }

/* ---- EXPANDED INNER LAYOUT ---- */
#di-expanded {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    gap: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease 0.15s;
}
#di-pill.expanded #di-expanded {
    opacity: 1;
    pointer-events: all;
}

/* Top row: vinyl + track info + close */
.di-exp-top {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

/* Bigger vinyl for expanded */
.di-vinyl-big {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: repeating-radial-gradient(#3a3a3a 0, #222 2px, #3a3a3a 4px);
    border: 2px solid rgba(115,183,255,0.6);
    flex-shrink: 0;
    position: relative;
    box-shadow: 0 0 16px rgba(115,183,255,0.2), 0 0 6px rgba(0,0,0,0.8);
}
.di-vinyl-big::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    width: 13px; height: 13px;
    background: #0a0a0a;
    border-radius: 50%;
    border: 1.5px solid rgba(115,183,255,0.4);
}
.di-vinyl-big.rotating { animation: diSpin 3s linear infinite; }

.di-track-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}
.di-track-name {
    font-size: 15px;
    font-family: 'ContinuumMedium', sans-serif;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: bold;
}
.di-track-sub {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    font-family: sans-serif;
}

.di-close-btn {
    background: rgba(255,255,255,0.07);
    border: none;
    color: rgba(255,255,255,0.5);
    width: 26px; height: 26px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}
.di-close-btn:hover { background: rgba(255,255,255,0.14); color: #fff; }

/* Progress bar */
.di-progress-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.di-time {
    font-size: 10px;
    font-family: monospace;
    color: rgba(255,255,255,0.4);
    min-width: 30px;
    flex-shrink: 0;
}
.di-time:last-child { text-align: right; }

/* Custom range slider */
.di-range {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    height: 4px;
    border-radius: 4px;
    background: rgba(255,255,255,0.15);
    cursor: pointer;
    outline: none;
    position: relative;
}
.di-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 6px rgba(115,183,255,0.7);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.di-range::-webkit-slider-thumb:hover {
    transform: scale(1.25);
    box-shadow: 0 0 10px rgba(115,183,255,1);
}
.di-range::-moz-range-thumb {
    width: 14px; height: 14px;
    border-radius: 50%;
    background: #fff;
    border: none;
    cursor: pointer;
}

/* Controls row */
.di-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.di-playback {
    display: flex;
    align-items: center;
    gap: 18px;
}

.di-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s, transform 0.15s;
    display: flex; align-items: center;
}
.di-btn:hover { color: #fff; transform: scale(1.15); }
.di-btn.play-pause {
    font-size: 26px;
    color: #fff;
    background: rgba(115,183,255,0.15);
    border-radius: 50%;
    width: 42px; height: 42px;
    justify-content: center;
}
.di-btn.play-pause:hover {
    background: rgba(115,183,255,0.3);
    transform: scale(1.08);
}

.di-volume-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.di-vol-icon { font-size: 13px; color: rgba(255,255,255,0.4); }
.di-vol-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 64px;
    height: 3px;
    border-radius: 3px;
    background: rgba(255,255,255,0.15);
    cursor: pointer;
    outline: none;
}
.di-vol-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 11px; height: 11px;
    border-radius: 50%;
    background: rgba(255,255,255,0.8);
    cursor: pointer;
}

/* Hidden state (before music starts) */
#di-wrapper.hidden { opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(-80px); transition: opacity 0.4s, transform 0.4s; }
#di-wrapper.visible { opacity: 1; pointer-events: all; transform: translateX(-50%) translateY(0); transition: opacity 0.5s ease 0.2s, transform 0.5s cubic-bezier(0.34,1.56,0.64,1) 0.2s; }

/* Notes container — full-pill overlay, pointer-events none */
#di-notes-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: visible;
    z-index: 100000;
}

/* ---------------------- ПАРТИКЛЫ НОТ ---------------------- */
.note-particle {
    position: absolute;
    /* top/left set dynamically via JS to vinyl center */
    color: #73b7ff;
    font-size: 18px;
    font-family: "Segoe UI Emoji", sans-serif;
    pointer-events: none;
    z-index: 100001;
    opacity: 0;
    
    text-shadow: 0 0 10px rgba(115, 183, 255, 0.8), 0 0 20px rgba(115, 183, 255, 0.4);
    
    animation: floatNote var(--duration) cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes floatNote {
    0% {
        transform: translate(-50%, -50%) scale(0.3) rotate(0deg);
        opacity: 0;
    }
    12% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1) rotate(var(--rStart));
    }
    100% {
        opacity: 0;
        transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0.4) rotate(var(--rEnd));
    }
}

/* ---------------------- САЛЮТ (FIREWORKS) ---------------------- */
#fireworksCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Чтобы можно было кликать сквозь салют */
    z-index: 2; /* Поверх фона, но под текстом */
}