/* 
 * style.css - Premium Glassmorphic Dark-Mode Stylesheet
 * 惟泽音乐工作室 (Weize Music Studio)
 */

/* --- DESIGN SYSTEM & TOKENS --- */
:root {
    --bg-dark: #07080d;
    --card-bg: rgba(16, 20, 36, 0.5);
    --card-border: rgba(255, 255, 255, 0.05);
    --card-glow: rgba(99, 102, 241, 0.03);
    
    /* Harmonious Neon HSL Colors */
    --color-primary: #6366f1; /* Neon Indigo */
    --color-primary-glow: rgba(99, 102, 241, 0.5);
    --color-accent: #f43f5e; /* Neon Rose/Pink */
    --color-accent-glow: rgba(244, 63, 94, 0.5);
    --color-cyan: #06b6d4; /* Neon Cyan */
    --color-cyan-glow: rgba(6, 182, 212, 0.4);
    
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    
    /* Typography Colors */
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-dark: #4b5563;
    
    /* Layout Dimensions */
    --header-height: 80px;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-heading: 'Outfit', 'Inter', -apple-system, sans-serif;
    --font-body: 'Inter', -apple-system, sans-serif;
}

/* --- GENERAL RESET --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.3) rgba(255, 255, 255, 0.02);
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}
::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5);
}

/* --- BACKGROUND GLOW MESH --- */
.bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.45;
}
.bg-glow-1 {
    width: 45vw;
    height: 45vw;
    top: -15vw;
    left: -10vw;
    background: radial-gradient(circle, var(--color-primary-glow) 0%, transparent 70%);
}
.bg-glow-2 {
    width: 50vw;
    height: 50vw;
    bottom: -10vw;
    right: -10vw;
    background: radial-gradient(circle, var(--color-accent-glow) 0%, transparent 70%);
}
.bg-glow-3 {
    width: 35vw;
    height: 35vw;
    top: 30%;
    left: 45%;
    background: radial-gradient(circle, var(--color-cyan-glow) 0%, transparent 70%);
}

/* --- STRUCTURE LAYOUT --- */
.app-container {
    width: 100%;
    max-width: 1700px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-x: hidden;
}

/* --- HEADER SECTION --- */
.app-header {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon i {
    font-size: 2.2rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px var(--color-primary-glow));
    animation-duration: 4s !important; /* smooth circular rotation */
}

.logo-text h1 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 2px;
    background: linear-gradient(to right, #fff, #b2b9e6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-text p {
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 3px;
    margin-top: 2px;
}

.header-badges {
    display: flex;
    gap: 12px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.copyright-badge {
    background: rgba(244, 63, 94, 0.1);
    color: var(--color-accent);
    border-color: rgba(244, 63, 94, 0.2);
}

.db-badge {
    background: rgba(6, 182, 212, 0.1);
    color: var(--color-cyan);
    border-color: rgba(6, 182, 212, 0.2);
}

.db-badge.offline {
    background: rgba(245, 158, 11, 0.1);
    color: var(--color-warning);
    border-color: rgba(245, 158, 11, 0.2);
}

/* --- GLASS CONTAINER CARD --- */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    padding: 24px;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.app-main {
    flex: 1;
    display: grid;
    grid-template-columns: 380px 1fr 400px;
    gap: 20px;
}

@media (max-width: 1400px) {
    .app-main {
        grid-template-columns: 340px 1fr;
    }
    .panel-lyrics-guestbook {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        height: auto;
    }
}

@media (max-width: 900px) {
    .app-container {
        padding: 12px;
        gap: 15px;
    }
    .app-main {
        grid-template-columns: 1fr;
    }
    .panel-lyrics-guestbook {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    /* Responsive heights for stacked panels */
    .panel-playlist {
        height: 520px; /* Compact height when stacked vertically */
        padding: 20px;
    }
    .player-wrapper {
        height: auto;
        min-height: 720px;
        padding: 20px;
    }
    .lyrics-wrapper {
        height: 440px;
    }
    .guestbook-wrapper {
        height: 320px;
    }
}

@media (max-width: 600px) {
    .header-badges {
        display: none; /* Hide header badges to keep logo clean and legible */
    }
    .logo-text h1 {
        font-size: 1.28rem;
        letter-spacing: 1px;
    }
    .logo-text p {
        display: none;
    }
    .app-header {
        padding: 0 15px;
        height: 64px;
    }
    .app-footer {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        padding: 15px;
    }
    .security-statement {
        font-size: 0.72rem;
    }
    .footer-system-info {
        align-items: center;
    }
}

@media (max-width: 480px) {
    .app-container {
        padding: 8px;
        gap: 10px;
    }
    .card {
        padding: 16px;
        border-radius: 16px;
    }
    .panel-playlist {
        padding: 16px;
        height: 480px;
    }
    .player-wrapper {
        padding: 16px;
        min-height: 640px;
    }
    
    /* Proportionally scale the entire black-vinyl console to prevent mobile overflows */
    .vinyl-machine-container {
        transform: scale(0.8);
        transform-origin: center center;
        margin: -25px 0;
        width: 312px; /* 390px * 0.8 */
        height: 312px; /* 390px * 0.8 */
    }
    
    .now-playing-title {
        font-size: 1.15rem;
        text-shadow: 0 2px 5px rgba(0,0,0,0.5);
    }
    
    .controls-buttons {
        gap: 12px;
    }
    
    .ctrl-btn-main {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
    
    .extra-controls {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
    
    .volume-container {
        width: 100%;
        justify-content: center;
    }
    
    .visualizer-toggle {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 380px) {
    .vinyl-machine-container {
        transform: scale(0.68);
        transform-origin: center center;
        margin: -45px 0;
        width: 265px; /* 390px * 0.68 */
        height: 265px;
    }
    
    .now-playing-title {
        font-size: 1rem;
    }
}

.main-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* --- LEFT PANEL: PLAYLISTS --- */
.panel-playlist {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    padding: 24px;
    display: flex;
    flex-direction: column;
    height: 760px; /* Locked mathematical height block */
}

.panel-playlist .panel-header h2 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(to right, #fff, var(--color-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Search Box */
.search-box {
    position: relative;
    width: 100%;
    margin-bottom: 18px;
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.search-box input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 12px 12px 12px 42px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.88rem;
    outline: none;
    transition: var(--transition-smooth);
}

.search-box input:focus {
    border-color: var(--color-primary);
    background: rgba(99, 102, 241, 0.05);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.15);
}

/* Playlist Categories Tabs */
.playlist-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px;
    border-radius: var(--radius-md);
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 10px 4px;
    border-radius: 12px;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    transition: var(--transition-smooth);
}

.tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
    color: #fff;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.2);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

/* Song Scroll Container */
.song-list-scroll {
    flex: 1;
    overflow-y: auto;
    margin-right: -10px;
    padding-right: 6px;
}

.song-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.loading-placeholder {
    text-align: center;
    padding: 40px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Individual Song Card Item */
.song-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-smooth);
    user-select: none;
}

.song-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.song-item.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(6, 182, 212, 0.08));
    border-color: rgba(99, 102, 241, 0.25);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.song-item-rank {
    width: 24px;
    text-align: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-dark);
    flex-shrink: 0;
    transition: var(--transition-smooth);
}

.song-item:hover .song-item-rank {
    color: var(--text-muted);
}

.song-item.active .song-item-rank {
    color: #fff;
}

.song-item-rank.rank-1 {
    color: #fbbf24 !important; /* gold */
    font-size: 1.1rem;
    filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.4));
}

.song-item-rank.rank-2 {
    color: #cbd5e1 !important; /* silver */
    font-size: 1rem;
    filter: drop-shadow(0 0 4px rgba(203, 213, 225, 0.3));
}

.song-item-rank.rank-3 {
    color: #cd7f32 !important; /* bronze */
    font-size: 0.95rem;
}

.song-item-cover {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
}

.song-item-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.song-item:hover .song-item-cover::after {
    opacity: 1;
}

.song-item.active .song-item-cover::after {
    opacity: 1;
    background: rgba(99, 102, 241, 0.4);
}

.song-play-icon-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 1rem;
    opacity: 0;
    transition: var(--transition-smooth);
    z-index: 2;
}

.song-item:hover .song-play-icon-overlay {
    opacity: 1;
}

.song-item.active .song-play-icon-overlay {
    opacity: 1;
}

.song-item.active.playing .song-play-icon-overlay i::before {
    content: "\f04c"; /* Pause icon */
}

.song-item-detail {
    flex: 1;
    min-width: 0;
}

.song-item-title {
    font-family: var(--font-heading);
    font-size: 0.94rem;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.song-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: 1px solid transparent;
}

.song-badge-pop {
    background: rgba(99, 102, 241, 0.1);
    color: #a5b4fc;
    border-color: rgba(99, 102, 241, 0.15);
}

.song-badge-baby {
    background: rgba(244, 63, 94, 0.1);
    color: #fca5a5;
    border-color: rgba(244, 63, 94, 0.15);
}

.song-item-stats {
    display: flex;
    align-items: center;
    gap: 12px;
}

.song-item-likes {
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: var(--transition-smooth);
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.song-item-likes:hover {
    color: var(--color-accent) !important;
    background: rgba(244, 63, 94, 0.12);
}

.song-item-likes.liked {
    color: var(--color-accent) !important;
}

.song-item-likes.liked i {
    font-weight: 900;
}

.song-item:hover .song-item-likes {
    color: rgba(255, 255, 255, 0.6);
}

.song-item.active .song-item-likes {
    color: rgba(255, 255, 255, 0.7);
}

/* Left Stats panel inside left column */
.stats-panel {
    margin-top: 20px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
}

.stats-panel h3 {
    font-family: var(--font-heading);
    font-size: 0.88rem;
    color: #fff;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.top-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.top-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.01);
    border-radius: var(--radius-sm);
}

.top-item-title {
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 150px;
    font-weight: 500;
}

.top-item-index {
    color: var(--color-primary);
    font-weight: bold;
    width: 18px;
}

.top-item-count {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* --- CENTER PANEL: VINYL RECORD PLAYER --- */
.panel-player {
    display: flex;
    justify-content: center;
}

.player-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 760px; /* Locked mathematical height block */
    position: relative;
    overflow: hidden;
    padding: 24px;
}

/* Canvas Audio Visualizer Background */
.visualizer-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.65;
}

/* Vinyl Machine Core Layout */
.vinyl-machine-container {
    position: relative;
    z-index: 1;
    width: 390px;
    height: 390px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0;
}

.turntable-body {
    position: relative;
    width: 370px;
    height: 370px;
    background: radial-gradient(circle, #252836 0%, #11131a 100%);
    border: 4px solid rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    box-shadow: 
        0 15px 45px rgba(0, 0, 0, 0.5), 
        inset 0 0 20px rgba(0,0,0,0.8),
        0 0 35px rgba(99, 102, 241, 0.08); /* neon halo standby */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.turntable-body.pulse-active {
    box-shadow: 
        0 15px 45px rgba(0, 0, 0, 0.5), 
        inset 0 0 20px rgba(0,0,0,0.8),
        0 0 45px var(--halo-color, rgba(99, 102, 241, 0.35)); /* live pulsing halo */
    border-color: rgba(99, 102, 241, 0.2);
}

.turntable-platter {
    position: absolute;
    width: 350px;
    height: 350px;
    background: #0f1015;
    border: 2px solid #000;
    border-radius: 50%;
    box-shadow: inset 0 0 10px rgba(255,255,255,0.05);
}

/* The spinning record */
.vinyl-record {
    position: relative;
    width: 330px;
    height: 330px;
    background: radial-gradient(circle, #2b2b2b 0%, #151515 50%, #000 100%);
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: rotate-vinyl 25s linear infinite;
    animation-play-state: paused;
    z-index: 2;
    transition: transform 1s ease;
}

@keyframes rotate-vinyl {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.vinyl-record.spinning {
    animation-play-state: running;
}

/* Record Grooves overlay */
.vinyl-grooves {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: repeating-radial-gradient(
        circle,
        rgba(255, 255, 255, 0.01) 0px,
        rgba(255, 255, 255, 0.01) 1px,
        transparent 1px,
        transparent 3px
    );
    pointer-events: none;
}

.vinyl-label {
    position: relative;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #111;
}

.vinyl-center-cover {
    position: absolute;
    width: 126px;
    height: 126px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: var(--transition-smooth);
}

.vinyl-center-hole {
    position: absolute;
    width: 20px;
    height: 20px;
    background: #07080d;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: inset 0 0 5px rgba(0,0,0,0.8);
    z-index: 3;
}

/* Physical Metal Tonearm needle */
.tonearm-system {
    position: absolute;
    top: -25px;
    right: -12px;
    width: 140px;
    height: 260px;
    z-index: 10;
    pointer-events: none;
    transform-origin: 105px 50px;
    transform: rotate(0deg); /* 0deg is resting, ~23deg is playing */
    transition: transform 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.tonearm-system.playing {
    transform: rotate(22deg); /* moves needle onto vinyl */
}

.tonearm-base {
    position: absolute;
    top: 30px;
    right: 18px;
    width: 56px;
    height: 56px;
    background: radial-gradient(circle, #555 0%, #222 100%);
    border: 2px solid #111;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.tonearm-weight {
    position: absolute;
    top: -12px;
    left: 14px;
    width: 28px;
    height: 28px;
    background: #333;
    border: 1px solid #111;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.tonearm-arm {
    position: absolute;
    top: 50px;
    right: 38px;
    width: 16px;
    height: 160px;
    background: linear-gradient(to right, #ccc, #aaa, #ddd, #666);
    border-radius: 6px;
    box-shadow: -2px 5px 5px rgba(0,0,0,0.3);
    /* slight curved rod representation */
}

.tonearm-headshell {
    position: absolute;
    top: 200px;
    right: 28px;
    width: 24px;
    height: 42px;
    background: #1c1c1c;
    border: 1px solid #444;
    border-radius: 4px 4px 8px 8px;
    transform: rotate(8deg);
    box-shadow: -2px 2px 4px rgba(0,0,0,0.4);
}

.tonearm-stylus {
    position: absolute;
    bottom: -4px;
    left: 8px;
    width: 6px;
    height: 10px;
    background: #e11d48; /* Red cartridge tip */
    border-radius: 2px;
}

/* Song Info Card */
.now-playing-info {
    text-align: center;
    width: 100%;
    margin-top: 15px;
    z-index: 1;
}

.now-playing-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.5px;
    text-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

.now-playing-meta {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.song-category-badge {
    padding: 3px 10px;
    border-radius: 30px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.song-category-badge.pop {
    background: rgba(99, 102, 241, 0.15);
    color: #c7d2fe;
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.song-category-badge.baby {
    background: rgba(244, 63, 94, 0.15);
    color: #fecaca;
    border: 1px solid rgba(244, 63, 94, 0.25);
}

.like-stats {
    cursor: pointer;
    padding: 3px 8px;
    border-radius: 6px;
    transition: var(--transition-smooth);
}

.like-stats:hover {
    color: var(--color-accent);
    background: rgba(244, 63, 94, 0.1);
}

.like-stats.liked {
    color: var(--color-accent);
    font-weight: 500;
}

.like-stats.liked i {
    font-weight: 900; /* Solid heart */
}

/* --- PLAYER SLIDERS & CONTROLS UI --- */
.player-controls {
    width: 100%;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 15px;
}

/* Progress Slider Layout */
.progress-bar-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.time-stamp {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: monospace;
    width: 42px;
}

#current-time {
    text-align: right;
}

#total-duration {
    text-align: left;
}

.progress-slider-wrapper {
    flex: 1;
    height: 12px;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.progress-track {
    position: absolute;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
}

.progress-fill {
    position: absolute;
    height: 4px;
    background: linear-gradient(to right, var(--color-primary), var(--color-cyan));
    border-radius: 20px;
    width: 0%;
}

.progress-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 10px var(--color-primary-glow);
    left: 0%;
    transform: translateX(-50%);
    transition: width 0.1s, height 0.1s;
}

.progress-slider-wrapper:hover .progress-handle {
    width: 14px;
    height: 14px;
    background: var(--color-cyan);
}

/* Core Buttons Row */
.controls-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 22px;
}

.ctrl-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.05rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ctrl-btn:hover {
    color: #fff;
    background: rgba(255,255,255,0.03);
}

.ctrl-btn.active {
    color: var(--color-cyan);
    text-shadow: 0 0 10px var(--color-cyan-glow);
}

.ctrl-btn-nav {
    font-size: 1.3rem;
    color: var(--text-main);
}

.ctrl-btn-nav:hover {
    color: var(--color-primary);
    transform: scale(1.1);
}

.ctrl-btn-main {
    font-size: 1.4rem;
    color: #fff;
    background: linear-gradient(135deg, var(--color-primary), var(--color-cyan));
    width: 56px;
    height: 56px;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
}

.ctrl-btn-main:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(6, 182, 212, 0.5);
    color: #fff;
    background: linear-gradient(135deg, var(--color-primary), var(--color-cyan));
}

/* Extra Controls Row: Volume & Sound Effects Selector */
.extra-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 12px;
    font-size: 0.8rem;
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 120px;
}

.volume-container i {
    color: var(--text-muted);
    font-size: 0.85rem;
    width: 16px;
}

.volume-slider-wrapper {
    flex: 1;
    height: 10px;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.volume-track {
    position: absolute;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

.volume-fill {
    position: absolute;
    height: 3px;
    background: var(--text-main);
    border-radius: 10px;
}

.volume-handle {
    position: absolute;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #fff;
    transform: translateX(-50%);
}

.visualizer-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
}

.label-visualizer {
    color: var(--text-muted);
    font-size: 0.72rem;
}

.viz-btn {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 3px 8px;
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.72rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.viz-btn:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
}

.viz-btn.active {
    color: var(--color-cyan);
    background: rgba(6, 182, 212, 0.1);
    border-color: rgba(6, 182, 212, 0.2);
}

/* --- RIGHT COLUMN: LYRICS & GUESTBOOK COMMENTS --- */
.panel-lyrics-guestbook {
    height: 760px; /* Match left and center column heights perfectly */
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.lyrics-wrapper {
    height: 485px; /* Expanded mathematical height block (64% height) */
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Apple Music style Cinematic Saturated Cover Blur Backdrop */
.lyrics-blur-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(45px) saturate(1.8) brightness(0.4) opacity(0.35);
    z-index: 0;
    pointer-events: none;
    transition: background-image 1.2s ease-in-out;
}

.lyrics-wrapper .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 10px;
    position: relative;
    z-index: 2;
}

.lyrics-wrapper .card-header h3 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
}

.scroll-mode-btn {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
    color: var(--color-primary);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition-smooth);
    position: relative;
    z-index: 2;
}

.scroll-mode-btn.active {
    background: rgba(6, 182, 212, 0.1);
    border-color: rgba(6, 182, 212, 0.2);
    color: var(--color-cyan);
}

/* Lyrics Content Scroller with Double Fade Gradient Overlay */
.lyrics-container {
    flex: 1;
    overflow-y: auto;
    text-align: left;
    padding: 10px 0;
    position: relative;
    z-index: 2;
    mask-image: linear-gradient(to bottom, transparent 0%, #000 15%, #000 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 15%, #000 85%, transparent 100%);
}

.lyrics-content {
    padding: 30px 24px 280px 24px; /* large bottom padding to allow complete upward scroll */
}

/* Poetic Cinematic Lyrics Formatting */
.lyrics-content p {
    font-size: 1.05rem; /* Readably larger and clear */
    line-height: 2.0; /* Spacious line height for clean aesthetic */
    color: rgba(255, 255, 255, 0.75); /* Highly readable soft-white color */
    margin-bottom: 22px;
    text-align: center; /* Center-aligned for gorgeous music catalog/booklet look */
    filter: none;
    transform: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    position: relative;
    user-select: text; /* Allow user text selection inside lyrics! */
}

.lyrics-content p:hover {
    opacity: 1; /* Slight highlight on hover */
}

.lyrics-content p.lyric-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 12px;
    opacity: 1;
    text-align: center;
}

.lyrics-content p.lyric-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 35px;
    opacity: 0.65;
    text-align: center;
}

.lyric-placeholder {
    color: var(--text-muted);
    font-style: italic;
    padding-top: 80px;
    font-size: 0.82rem !important;
    text-align: center !important;
    opacity: 0.6 !important;
    filter: none !important;
    transform: none !important;
}

/* Lyrics header controls and micro-adjust buttons */
.lyrics-controls-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.lyrics-offset-control {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 2px;
}
.offset-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}
.offset-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}
.offset-val {
    padding: 0 6px;
    font-weight: 500;
    min-width: 68px;
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-main);
    user-select: none;
}

/* Vocal Guide Cards */
.vocal-guide-container {
    margin-top: 35px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.015);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--text-muted);
    position: relative;
    user-select: text;
}
.vocal-guide-title {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-cyan);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 6px;
}
.vocal-guide-para {
    margin-bottom: 10px;
    text-align: justify;
    line-height: 1.6;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
}
.vocal-guide-para:last-child {
    margin-bottom: 0;
}

/* Guestbook Comments Wrapper */
.guestbook-wrapper {
    height: 255px; /* Contracted mathematical height block (36% height) */
    display: flex;
    flex-direction: column;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.comment-form .form-row {
    display: flex;
    gap: 10px;
}

.comment-form input[type="text"] {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.82rem;
    outline: none;
    transition: var(--transition-smooth);
}

.comment-form textarea {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.82rem;
    outline: none;
    resize: none;
    height: 38px;
    transition: var(--transition-smooth);
}

.comment-form input[type="text"]:focus,
.comment-form textarea:focus {
    border-color: var(--color-primary);
    background: rgba(99, 102, 241, 0.03);
}

.submit-comment-btn {
    background: linear-gradient(135deg, var(--color-primary), var(--color-cyan));
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    padding: 0 15px;
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
}

.submit-comment-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.comments-scroll {
    flex: 1;
    overflow-y: auto;
    margin-right: -10px;
    padding-right: 6px;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.comment-item {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
}

.comment-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.comment-item-nickname {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-cyan);
}

.comment-item-date {
    font-size: 0.68rem;
    color: var(--text-dark);
}

.comment-item-content {
    font-size: 0.78rem;
    line-height: 1.4;
    color: var(--text-main);
}

/* --- FOOTER & PROTECTION INDICATORS --- */
.app-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(16, 20, 36, 0.2);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.footer-protection {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.copyright-statement {
    color: var(--text-main);
}

.copyright-statement strong {
    font-family: var(--font-heading);
}
.security-statement {
    font-size: 0.76rem;
    color: #f43f5e !important; /* Prominent caution red */
    font-weight: 600;
    text-shadow: 0 0 10px rgba(244, 63, 94, 0.25);
    opacity: 1;
    letter-spacing: 0.5px;
}

.footer-system-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.footer-system-info span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-system-info .version-tag {
    color: var(--text-muted);
    font-size: 0.7rem;
    opacity: 0.7;
}

/* --- ANTI-DOWNLOAD WARNING MODAL --- */
.security-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 6, 10, 0.85);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.security-card {
    background: radial-gradient(circle at top left, #1e1b29 0%, #0d0b13 100%);
    border: 1px solid rgba(244, 63, 94, 0.2);
    box-shadow: 0 20px 50px rgba(0,0,0,0.8), 0 0 30px rgba(244, 63, 94, 0.1);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 100%;
    padding: 35px;
    text-align: center;
    position: relative;
    animation: zoom-in 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes zoom-in {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.security-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(244, 63, 94, 0.1);
    color: var(--color-accent);
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    border: 1px solid rgba(244, 63, 94, 0.2);
}

.security-card h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 15px;
}

.security-card p {
    font-size: 0.84rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.security-card p b {
    color: var(--color-accent);
}

.security-close-btn {
    background: linear-gradient(135deg, var(--color-accent), #db2777);
    border: none;
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.88rem;
    padding: 10px 30px;
    border-radius: 30px;
    cursor: pointer;
    margin-top: 15px;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.3);
}

.security-close-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(244, 63, 94, 0.5);
}

/* --- BRANDING LOGO & WECHAT QR CARD --- */
.header-logo-img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 12px var(--color-primary-glow);
    object-fit: cover;
    display: block;
}

.contact-qr-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-md);
    margin-top: 15px;
    transition: var(--transition-smooth);
    z-index: 1;
}

.contact-qr-card:hover {
    background: rgba(6, 182, 212, 0.04);
    border-color: rgba(6, 182, 212, 0.2);
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.08);
}

.qr-wrapper {
    width: 90px; /* Greatly expanded to ensure smooth mobile scanning */
    height: 90px;
    border-radius: 12px;
    background: #fff;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: var(--transition-smooth);
}

.contact-qr-card:hover .qr-wrapper {
    transform: scale(1.05); /* organic pop zoom */
    box-shadow: 0 4px 20px rgba(7, 193, 96, 0.45); /* WeChat theme glowing shadow! */
}

.qr-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.contact-details h4 {
    font-family: var(--font-heading);
    font-size: 0.94rem; /* Balanced size next to 90px QR wrapper */
    color: #fff;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.5px;
}

.contact-details p {
    font-size: 0.82rem; /* Legible readable texts */
    color: var(--text-muted);
    line-height: 1.5;
    transition: var(--transition-smooth);
}

.contact-qr-card:hover .contact-details p {
    color: #fff; /* text highlights on card hover */
}

/* --- TOAST NOTIFICATIONS SYSTEM --- */
#toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast-notification {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-radius: 12px;
    background: rgba(18, 18, 24, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    color: #f3f4f6;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 250px;
    max-width: 380px;
    transform: translateX(50px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-notification.hide {
    transform: translateY(-20px);
    opacity: 0;
}

.toast-icon {
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-info .toast-icon {
    color: #6366f1;
}

.toast-success .toast-icon {
    color: #10b981;
}

.toast-error .toast-icon {
    color: #ef4444;
}

.toast-like {
    border-color: rgba(244, 63, 94, 0.3);
}

.toast-like .toast-icon {
    color: #f43f5e;
    filter: drop-shadow(0 0 4px rgba(244, 63, 94, 0.4));
}

@keyframes beat {
    0%, 100% { transform: scale(1); }
    30% { transform: scale(1.3); }
    60% { transform: scale(1.15); }
}

.animate-beat {
    animation: beat 0.6s ease-in-out;
}

