﻿/* Dazik Modern Styling - Clean Layout */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #000;
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animated gradient background that responds to music */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: linear-gradient(45deg, #1a1a2e, #16213e, #0f3460, #533483);
    background-size: 400% 400%;
    transition: all 0.3s ease;
}

/* Floating particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0) rotate(0deg); 
        opacity: 0.4; 
    }
    50% { 
        transform: translateY(-30px) rotate(180deg); 
        opacity: 0.8; 
    }
}

/* Audio visualization canvas */
#audio-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.1;
}

/* Main container - centered and clean */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    padding-top: 3rem;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 3rem;
}

.logo {
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.tagline {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
}

/* Player section - video + genres together */
.player-section {
    margin-bottom: 2rem;
}

.player-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
}

#player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 500;
    text-align: center;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 0.8rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Genre navigation - attached to video like old design */
.genre-nav {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-top: 1px dashed rgba(255, 255, 255, 0.3);
    border-radius: 0 0 12px 12px;
    padding: 12px 16px;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.genre-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    font-weight: 500;
    float: left;
    margin-top: 8px;
    margin-left: 4px;
}

.genre-buttons {
    float: right;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.genre-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 6px 12px;
    border-radius: 18px;
    font-weight: 500;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.genre-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.genre-btn.active {
    background: rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.5);
}

/* Dropdown styling - click based, not hover */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 6px 12px;
    border-radius: 18px;
    font-weight: 500;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.dropdown-menu {
    display: none; /* Always hidden by default */
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 8px;
    margin-top: 8px;
    min-width: 160px;
    z-index: 1000;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.dropdown-menu a {
    display: block;
    color: #fff;
    padding: 8px 12px;
    text-decoration: none;
    border-radius: 6px;
    margin: 2px 0;
    font-weight: 500;
    font-size: 0.8rem;
    transition: all 0.15s ease;
}

.dropdown-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(3px);
}

/* Clear floats */
.genre-nav::after {
    content: "";
    display: table;
    clear: both;
}

/* Now playing info */
.now-playing {
    text-align: center;
    margin: 2rem 0 1.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.now-playing-genre {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.genre-highlight {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.song-info {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.4;
}

/* Skip button */
.skip-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    border: none;
    color: #fff;
    padding: 12px 28px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
    margin: 0 auto;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.skip-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.skip-btn:active {
    transform: translateY(0);
}

/* Page Footer */
.page-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 0;
    z-index: 100;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.song-count-small {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.footer-divider {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
}

.donate-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.2s ease;
}

.donate-link:hover {
    color: #ff6b6b;
    -webkit-text-fill-color: #ff6b6b;
    text-shadow: 0 0 8px rgba(255, 107, 107, 0.3);
}

/* Add bottom padding to body to account for fixed footer */
body {
    padding-bottom: 50px;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
        padding-top: 2rem;
    }

    .logo {
        font-size: 2.8rem;
    }

    .genre-nav {
        padding: 10px 12px;
    }

    .genre-label {
        float: none;
        display: block;
        margin-bottom: 8px;
        text-align: center;
    }

    .genre-buttons {
        float: none;
        justify-content: center;
        gap: 3px;
    }

    .genre-btn, .dropdown-toggle {
        padding: 5px 10px;
        font-size: 0.75rem;
    }

    .dropdown-menu {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 85vw;
        max-width: 280px;
    }

    .genre-nav::after {
        display: none;
    }

    .footer-content {
        gap: 0.8rem;
        padding: 0 1rem;
    }

    .page-footer {
        padding: 10px 0;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 2.4rem;
    }
    
    .player-container {
        border-radius: 8px 8px 0 0;
    }
    
    .genre-nav {
        border-radius: 0 0 8px 8px;
    }

    .song-count-small,
    .donate-link {
        font-size: 0.8rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 0.3rem;
    }

    .footer-divider {
        display: none;
    }

    .page-footer {
        padding: 8px 0;
    }

    body {
        padding-bottom: 60px;
    }
}