* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --neon-pink: #ff2bd6;
    --neon-cyan: #00f0ff;
    --neon-purple: #a855f7;
    --neon-yellow: #faff00;
    --dark-bg: rgba(10, 5, 25, 0.85);
    --card-bg: rgba(20, 10, 40, 0.7);
    --card-border: rgba(255, 43, 214, 0.3);
}

/* ============================================================
   🔘 Performance Toggle button
   ============================================================ */
.perf-toggle {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 10000;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--neon-cyan);
    background: rgba(10, 0, 25, 0.75);
    color: var(--neon-cyan);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}
.perf-toggle:hover,
.perf-toggle:focus-visible {
    background: var(--neon-cyan);
    color: #0a0014;
    transform: scale(1.08);
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.7);
    outline: none;
}
.perf-toggle:active { transform: scale(0.95); }
body.perf-mode .perf-toggle {
    border-color: var(--neon-yellow);
    color: var(--neon-yellow);
    box-shadow: 0 0 15px rgba(250, 255, 0, 0.4);
}

/* ============================================================
   ⚡ PERFORMANCE MODE (mobile / low-end) — CSS optimisations
   Disables heavy CSS effects: backdrop-filter, drop-shadow,
   heavy animations, multi-layer box-shadows
   ============================================================ */
body.perf-mode .player-card,
body.perf-mode .tracklist,
body.perf-mode .iframe-wrapper,
body.perf-mode .gallery-item {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(15, 5, 30, 0.92) !important;
}
body.perf-mode .player-card::before,
body.perf-mode .gallery-item::before {
    opacity: 0.15 !important;
    filter: none !important;
}
body.perf-mode .neon-text.big,
body.perf-mode .logo.neon-text {
    filter: drop-shadow(0 0 8px var(--neon-pink)) !important;
    animation-duration: 6s !important;
}
body.perf-mode .cover-glow {
    filter: blur(6px) !important;
    opacity: 0.4 !important;
    animation: none !important;
}
body.perf-mode .cover-art.playing img {
    animation-duration: 20s linear !important;
}
body.perf-mode .ctrl-btn,
body.perf-mode .play-btn,
body.perf-mode .neon-btn {
    filter: none !important;
    animation: none !important;
}
body.perf-mode .progress-fill {
    box-shadow: 0 0 8px var(--neon-pink) !important;
}
body.perf-mode .progress-handle {
    box-shadow: 0 0 8px var(--neon-cyan), 0 2px 6px rgba(0,0,0,0.4) !important;
}
body.perf-mode .progress-handle:hover {
    box-shadow: 0 0 10px var(--neon-pink) !important;
}
body.perf-mode .gallery-item:hover {
    transform: none !important;
}
body.perf-mode .gallery-item:hover img {
    transform: none !important;
}
body.perf-mode .start-content {
    animation: none !important;
}
body.perf-mode .neon-sub {
    text-shadow: 0 0 6px var(--neon-cyan) !important;
}
body.perf-mode .tagline {
    text-shadow: 0 0 4px var(--neon-cyan) !important;
}
body.perf-mode .track-item.active .track-name {
    text-shadow: none !important;
}
body.perf-mode .volume-control {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(255, 255, 255, 0.08) !important;
}
body.perf-mode .bg-overlay {
    opacity: 0.25 !important;
}
/* Reduce paint on hover for perf-mode */
body.perf-mode * {
    will-change: auto !important;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0a0014;
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

#visualizer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('fon.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.35;
    z-index: 2;
    pointer-events: none;
}

.bg-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(10, 0, 30, 0.6) 0%,
        rgba(30, 0, 60, 0.4) 50%,
        rgba(10, 0, 30, 0.7) 100%
    );
}

.start-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, #1a0033 0%, #050010 100%);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.start-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.start-content {
    text-align: center;
    animation: pulse-glow 2s ease-in-out infinite;
}

.neon-text.big {
    font-size: clamp(3rem, 12vw, 8rem);
    font-weight: 900;
    letter-spacing: 0.2em;
    background: linear-gradient(45deg, var(--neon-pink), var(--neon-cyan), var(--neon-purple));
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease infinite, neon-flicker 3s linear infinite;
    filter: drop-shadow(0 0 20px var(--neon-pink)) drop-shadow(0 0 40px var(--neon-cyan));
    margin-bottom: 1rem;
}

.neon-sub {
    font-size: clamp(1rem, 3vw, 1.5rem);
    letter-spacing: 0.8em;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan), 0 0 30px var(--neon-cyan);
    margin-bottom: 3rem;
}

.neon-btn {
    background: transparent;
    border: 2px solid var(--neon-pink);
    color: var(--neon-pink);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    padding: 1rem 3rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    text-transform: uppercase;
    box-shadow: 0 0 20px rgba(255, 43, 214, 0.4), inset 0 0 20px rgba(255, 43, 214, 0.1);
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.neon-btn:hover {
    background: var(--neon-pink);
    color: #0a0014;
    box-shadow: 0 0 40px var(--neon-pink), 0 0 80px var(--neon-pink);
    transform: scale(1.05);
}

.neon-btn span {
    margin-right: 0.5rem;
}

.container {
    position: relative;
    z-index: 10;
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.header {
    text-align: center;
    padding: 2rem 0 3rem;
}

.logo.neon-text {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 900;
    letter-spacing: 0.3em;
    background: linear-gradient(45deg, var(--neon-pink), var(--neon-cyan), var(--neon-purple));
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 4s ease infinite;
    filter: drop-shadow(0 0 15px var(--neon-pink)) drop-shadow(0 0 30px var(--neon-cyan));
}

.tagline {
    margin-top: 0.5rem;
    font-size: 1rem;
    letter-spacing: 0.5em;
    color: var(--neon-cyan);
    text-shadow: 0 0 8px var(--neon-cyan);
    opacity: 0.9;
}

.player-section {
    margin-bottom: 3rem;
}

.player-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 0 40px rgba(168, 85, 247, 0.15),
                0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.player-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--neon-pink), var(--neon-cyan), var(--neon-purple), var(--neon-pink));
    background-size: 400% 400%;
    border-radius: 24px;
    z-index: -1;
    animation: gradient-shift 6s ease infinite;
    opacity: 0.5;
}

.now-playing {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.cover-art {
    position: relative;
    width: 140px;
    height: 140px;
    flex-shrink: 0;
}

.cover-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.cover-art.playing img {
    animation: spin 8s linear infinite;
}

.cover-glow {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg, var(--neon-pink), var(--neon-cyan));
    border-radius: 20px;
    z-index: -1;
    filter: blur(20px);
    opacity: 0.6;
    animation: pulse-glow 2s ease-in-out infinite;
}

.track-info {
    flex: 1;
    min-width: 200px;
}

.track-info h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
    background: linear-gradient(90deg, #fff, var(--neon-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.track-info p {
    color: var(--neon-pink);
    letter-spacing: 0.2em;
    font-size: 0.9rem;
    text-shadow: 0 0 10px rgba(255, 43, 214, 0.5);
}

.progress-container {
    margin-bottom: 1.5rem;
    padding: 10px 0;
}

.progress-bar {
    position: relative;
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    cursor: pointer;
    overflow: visible;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.4);
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    bottom: -10px;
}

.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--neon-pink), var(--neon-cyan));
    border-radius: 4px;
    box-shadow: 0 0 15px var(--neon-pink);
    will-change: width;
    pointer-events: none;
}

.progress-handle {
    position: absolute;
    top: 50%;
    left: 0%;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 15px var(--neon-cyan), 0 0 30px var(--neon-cyan), 0 2px 6px rgba(0,0,0,0.4);
    cursor: grab;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    z-index: 2;
    will-change: left;
}

.progress-handle:hover {
    box-shadow: 0 0 20px var(--neon-pink), 0 0 40px var(--neon-pink), 0 2px 6px rgba(0,0,0,0.4);
}

.progress-handle:active,
.progress-bar:active .progress-handle {
    cursor: grabbing;
    transform: translate(-50%, -50%) scale(1.35);
    box-shadow: 0 0 25px var(--neon-pink), 0 0 50px var(--neon-pink);
}

.time-info {
    display: flex;
    justify-content: space-between;
    margin-top: 0.6rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Courier New', monospace;
    letter-spacing: 0.1em;
}

.controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.ctrl-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 43, 214, 0.3);
    color: #fff;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.ctrl-btn:hover {
    background: rgba(255, 43, 214, 0.2);
    border-color: var(--neon-pink);
    box-shadow: 0 0 20px rgba(255, 43, 214, 0.4);
    transform: scale(1.1);
}

.play-btn {
    width: 70px;
    height: 70px;
    font-size: 1.6rem;
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
    border: none;
    box-shadow: 0 0 30px rgba(255, 43, 214, 0.5);
}

.play-btn:hover {
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-pink));
    box-shadow: 0 0 50px rgba(255, 43, 214, 0.7);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.6rem 1rem;
    border-radius: 30px;
    border: 1px solid rgba(0, 240, 255, 0.2);
}

.volume-control span {
    font-size: 1rem;
}

#volumeSlider {
    -webkit-appearance: none;
    appearance: none;
    width: 120px;
    height: 5px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

#volumeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--neon-cyan);
    cursor: pointer;
    box-shadow: 0 0 12px var(--neon-cyan);
    transition: transform 0.2s;
}

#volumeSlider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

#volumeSlider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--neon-cyan);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 12px var(--neon-cyan);
}

.section-title.neon-text-sm {
    font-size: 1.1rem;
    letter-spacing: 0.4em;
    font-weight: 800;
    margin-bottom: 1.2rem;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan), 0 0 20px rgba(0, 240, 255, 0.4);
}

.tracklist-section {
    margin-bottom: 3rem;
}

.tracklist {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 0.7rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.track-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.2rem;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.track-item:hover {
    background: rgba(168, 85, 247, 0.12);
    transform: translateX(5px);
}

.track-item.active {
    background: linear-gradient(90deg, rgba(255, 43, 214, 0.2), rgba(0, 240, 255, 0.15));
    border-left: 3px solid var(--neon-pink);
}

.track-item.active .track-name {
    color: var(--neon-pink);
    text-shadow: 0 0 8px rgba(255, 43, 214, 0.5);
}

.track-num {
    width: 32px;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: var(--neon-cyan);
    opacity: 0.7;
}

.track-name {
    flex: 1;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.3s;
}

.track-duration {
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.hint {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.05em;
}

.iframe-section {
    margin-bottom: 3rem;
}

.iframe-wrapper {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    overflow-x: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.iframe-wrapper iframe {
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.gallery-section {
    margin-bottom: 3rem;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.2rem;
}

.gallery-item {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    aspect-ratio: 1;
    border: 1px solid var(--card-border);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transition: all 0.4s ease;
    cursor: pointer;
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--neon-pink), var(--neon-cyan));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s;
    filter: blur(10px);
}

.gallery-item:hover {
    transform: translateY(-8px) scale(1.02);
}

.gallery-item:hover::before {
    opacity: 0.7;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.footer {
    text-align: center;
    padding: 2rem 0 1rem;
    border-top: 1px solid rgba(255, 43, 214, 0.2);
}

.footer-text {
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.3em;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.social-link {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    background: rgba(255, 43, 214, 0.1);
    border: 1px solid rgba(255, 43, 214, 0.3);
    border-radius: 30px;
    color: var(--neon-pink);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.1em;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--neon-pink);
    color: #0a0014;
    box-shadow: 0 0 25px rgba(255, 43, 214, 0.5);
    transform: scale(1.05);
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes neon-flicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
        opacity: 1;
    }
    20%, 24%, 55% {
        opacity: 0.8;
    }
}

@keyframes pulse-glow {
    0%, 100% { filter: drop-shadow(0 0 15px var(--neon-pink)) drop-shadow(0 0 30px var(--neon-cyan)); }
    50% { filter: drop-shadow(0 0 25px var(--neon-pink)) drop-shadow(0 0 50px var(--neon-cyan)); }
}

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

@media (max-width: 640px) {
    .container { padding: 1rem; }
    .header { padding: 1rem 0 2rem; }
    .now-playing { flex-direction: column; text-align: center; }
    .cover-art { width: 120px; height: 120px; }
    .player-card { padding: 1.2rem; }
    .controls { gap: 0.8rem; }
    .ctrl-btn { width: 46px; height: 46px; }
    .play-btn { width: 60px; height: 60px; }
    #volumeSlider { width: 80px; }
    .tagline { letter-spacing: 0.3em; }
    .iframe-wrapper { padding: 0.5rem; }
}
