/* =========================================
   1. RESET & GLOBAL SETTINGS
   ========================================= */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    -webkit-tap-highlight-color: transparent; 
}

:root {
    --bg-dark: #121212;
    --text-light: #ffffff;
    --glass: rgba(255, 255, 255, 0.05);
    --border-glass: rgba(255, 255, 255, 0.1);
}

body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    background: var(--bg-dark); 
    color: var(--text-light); 
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* =========================================
   2. ANIMATIONS
   ========================================= */
@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(255, 50, 50, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(255, 50, 50, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 50, 50, 0); }
}

@keyframes fadeIn { 
    from { opacity: 0; transform: translateY(10px); } 
    to { opacity: 1; transform: translateY(0); } 
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes bounce {
    0% { height: 5px; }
    50% { height: 25px; }
    100% { height: 5px; }
}

/* =========================================
   3. RADIO APP LAYOUT (Player)
   ========================================= */
.app-container { 
    display: flex; 
    height: 100vh; 
    width: 100vw; 
    overflow: hidden; /* Lock scroll on desktop */
}

/* SIDEBAR (Desktop) */
.sidebar {
    width: 90px; 
    background: #ffffff; 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between;
    border-right: 1px solid rgba(0,0,0,0.1); 
    z-index: 20;
    box-shadow: 5px 0 25px rgba(0,0,0,0.15);
}

.nav-items { display: flex; flex-direction: column; text-align: center; margin-top: 20px; }

.nav-btn {
    background: none; border: none; padding: 20px 0; 
    font-size: 11px; font-weight: 700; color: #999;
    cursor: pointer; display: flex; flex-direction: column; align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-btn .icon { font-size: 22px; margin-bottom: 8px; transition: transform 0.2s; }
.nav-btn:hover .icon { transform: scale(1.1); color: var(--primary); }
.nav-btn:hover { background: #f8f8f8; color: #555; }
.nav-btn.active { color: #333; background: #f0f0f0; border-left: 4px solid var(--primary); }

/* PLAYER CONTROLS (Desktop) */
.player-controls {
    background: #f4f4f4; display: flex; flex-direction: column; align-items: center; border-top: 1px solid #ddd;
}
#play-btn {
    width: 100%; height: 90px; border: none; background: var(--primary); 
    color: white; font-size: 28px; cursor: pointer; transition: all 0.3s;
}
#play-btn:hover { filter: brightness(1.1); }
#volume-btn { width: 100%; padding: 15px; border: none; background: transparent; font-size: 18px; color: #666; cursor: pointer; }
#volume-btn:hover { color: var(--primary); }

/* MAIN CONTENT AREA */
.content {
    flex: 1; 
    background: var(--secondary); 
    /* Animated Background */
    background-image: 
        radial-gradient(circle at 10% 10%, rgba(255,255,255,0.05), transparent 40%),
        radial-gradient(circle at 90% 90%, rgba(0,0,0,0.8), transparent 40%),
        linear-gradient(135deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.8) 100%);
    background-size: 200% 200%; 
    animation: gradientMove 15s ease infinite;
    padding: 30px; 
    overflow-y: auto; 
    position: relative;
}

header { display: flex; justify-content: center; align-items: center; margin-bottom: 30px; height: 70px; animation: fadeIn 0.8s ease-out; }
.station-logo { max-height: 100%; filter: drop-shadow(0 5px 15px rgba(0,0,0,0.3)); transition: transform 0.3s; }
.station-logo:hover { transform: scale(1.02); }

.section { display: none; animation: fadeIn 0.5s ease-out; }
.section.active { display: block; }

/* DASHBOARD GRID */
.dashboard-grid { 
    display: flex; gap: 30px; flex-wrap: wrap; justify-content: center; 
    align-items: flex-start; max-width: 1200px; margin: 0 auto;
}

/* HERO CARD (Now Playing) */
.hero-card {
    flex: 1; max-width: 450px; min-width: 300px; aspect-ratio: 1 / 1; 
    position: relative; border-radius: 25px; overflow: hidden; background: #000;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5); border: 1px solid var(--border-glass);
    transition: transform 0.3s;
}
.hero-card:hover { transform: translateY(-5px); }
.hero-img { width: 100%; height: 100%; object-fit: cover; opacity: 0.9; transition: transform 0.5s; }
.hero-card:hover .hero-img { transform: scale(1.05); opacity: 1; }

.hero-info-overlay {
    position: absolute; bottom: 0; left: 0; right: 0; padding: 40px 25px 25px 25px;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 10%, transparent);
}
.hero-info-overlay h2 { font-size: 22px; margin-bottom: 5px; text-shadow: 0 2px 4px rgba(0,0,0,0.8); }
.hero-info-overlay p { font-size: 14px; opacity: 0.8; }

.badge {
    position: absolute; top: 20px; left: 20px; background: #e74c3c; color: white;
    padding: 6px 14px; font-weight: 800; font-size: 10px; border-radius: 20px;
    text-transform: uppercase; letter-spacing: 1px; animation: pulse-red 2s infinite; z-index: 5;
}

/* AUDIO VISUALIZER */
.visualizer { display: flex; align-items: flex-end; gap: 4px; height: 30px; margin-bottom: 10px; opacity: 0.5; transition: opacity 0.3s; }
.visualizer.playing { opacity: 1; }
.bar { width: 6px; background: var(--primary); border-radius: 5px; height: 5px; transition: height 0.2s; }
.visualizer.playing .bar { animation: bounce 1s infinite ease-in-out; }
.visualizer.playing .bar:nth-child(1) { animation-duration: 1.0s; }
.visualizer.playing .bar:nth-child(2) { animation-duration: 1.5s; }
.visualizer.playing .bar:nth-child(3) { animation-duration: 0.8s; }
.visualizer.playing .bar:nth-child(4) { animation-duration: 1.2s; }
.visualizer.playing .bar:nth-child(5) { animation-duration: 0.5s; }

/* LISTS & HISTORY */
.list-card { flex: 1; min-width: 300px; max-width: 450px; height: 100%; }
.badge-small { display: inline-block; background: var(--glass); padding: 6px 12px; border-radius: 20px; font-size: 11px; font-weight: 700; margin-bottom: 15px; border: 1px solid var(--border-glass); }
#recent-tracks { max-height: 450px; overflow-y: auto; padding-right: 5px; }

.track-item {
    background: rgba(255,255,255,0.08); backdrop-filter: blur(10px); margin-bottom: 12px; padding: 12px; border-radius: 15px;
    display: flex; align-items: center; gap: 15px; border: 1px solid var(--border-glass);
}
.track-img { width: 55px; height: 55px; border-radius: 10px; background-color: #222; background-size: cover; flex-shrink: 0; }

/* CONTACT FORMS */
.contact-form-container { 
    max-width: 600px; margin: 0 auto; background: var(--glass); padding: 40px; 
    border-radius: 20px; backdrop-filter: blur(15px); border: 1px solid var(--border-glass);
}
input, textarea, select {
    width: 100%; padding: 15px; margin-bottom: 15px; border: 1px solid var(--border-glass);
    border-radius: 10px; background: rgba(0,0,0,0.2); color: white; font-family: inherit;
}
.send-btn {
    padding: 15px; background: var(--primary); color: white; border: none; border-radius: 50px; font-weight: bold; width: 100%; cursor: pointer;
}

/* SOCIAL ICONS */
.social-links-row { display: flex; justify-content: center; gap: 25px; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border-glass); }
.social-icon {
    display: flex; align-items: center; justify-content: center; width: 50px; height: 50px; border-radius: 50%;
    background: var(--glass); color: white; font-size: 20px; text-decoration: none; transition: 0.3s;
}
.social-icon:hover { background: var(--primary); transform: translateY(-5px); box-shadow: 0 0 15px var(--primary); }

/* =========================================
   4. LANDING PAGE (HUB) STYLES
   ========================================= */
.hub-grid { 
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; 
    max-width: 900px; margin: 50px auto; 
}
.hub-card {
    background: #222; border: 1px solid #333; border-radius: 20px; padding: 40px; text-align: center;
    transition: transform 0.3s, border-color 0.3s; position: relative; overflow: hidden;
}
.hub-card:hover { transform: translateY(-10px); border-color: #8DC63F; }
.hub-icon { font-size: 50px; color: #8DC63F; margin-bottom: 20px; }
.hub-card h2 { margin: 10px 0; font-size: 24px; }
.hub-card p { color: #999; margin-bottom: 30px; font-size: 15px; line-height: 1.6; }
.hub-btn {
    display: inline-block; padding: 15px 35px; background: #8DC63F; color: black; border-radius: 30px;
    text-decoration: none; font-weight: bold; transition: 0.2s;
}
.hub-btn:hover { background: white; transform: scale(1.05); }

/* =========================================
   5. BIO LINK PAGE STYLES
   ========================================= */
.bio-container { max-width: 600px; margin: 0 auto; padding: 40px 20px; text-align: center; padding-bottom: 120px; }
.bio-avatar { width: 120px; height: 120px; border-radius: 50%; border: 4px solid var(--primary); margin-bottom: 20px; object-fit: cover; box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.bio-title { font-size: 24px; font-weight: 800; margin-bottom: 10px; }
.bio-desc { font-size: 14px; color: rgba(255,255,255,0.7); margin-bottom: 30px; max-width: 400px; margin-left: auto; margin-right: auto; }
.bio-links { display: flex; flex-direction: column; gap: 15px; }
.bio-btn {
    background: var(--glass); color: white; padding: 18px; border-radius: 50px;
    text-decoration: none; font-weight: 600; transition: all 0.3s; border: 1px solid var(--border-glass);
    display: flex; align-items: center; justify-content: center; position: relative;
}
.bio-btn:hover { background: white; color: black; transform: scale(1.02); }
.bio-btn i { position: absolute; left: 25px; font-size: 20px; }

/* STICKY BIO PLAYER */
.bio-player-bar {
    position: fixed; bottom: 20px; left: 20px; right: 20px; max-width: 560px; margin: 0 auto;
    background: rgba(20,20,20,0.9); backdrop-filter: blur(15px); border-radius: 20px; padding: 15px 25px;
    display: flex; align-items: center; justify-content: space-between; box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid var(--border-glass); z-index: 100;
}
.bio-play-btn {
    width: 50px; height: 50px; background: var(--primary); border-radius: 50%; border: none; color: white; font-size: 18px; cursor: pointer;
}

/* =========================================
   6. MOBILE OPTIMIZATION (Phone View)
   ========================================= */
@media (max-width: 768px) {
    
    /* Switch to Vertical Scroll Layout */
    .app-container { flex-direction: column; height: 100vh; overflow: hidden; }
    .content { width: 100vw; padding-bottom: 90px; border-radius: 0; }

    /* TRANSFORM SIDEBAR TO FOOTER */
    .sidebar {
        width: 100%; height: 65px; flex-direction: row; position: fixed; bottom: 0; left: 0;
        border-right: none; border-top: 1px solid rgba(0,0,0,0.1); box-shadow: 0 -5px 15px rgba(0,0,0,0.1);
        z-index: 1000; background: #ffffff; justify-content: space-between;
    }

    /* Horizontal Tabs */
    .nav-items { flex-direction: row; margin: 0; flex: 1; height: 100%; justify-content: space-around; }
    .nav-btn { padding: 0; height: 100%; flex: 1; justify-content: center; font-size: 10px; border-left: none !important; }
    .nav-btn .icon { font-size: 18px; margin-bottom: 3px; }
    .nav-btn.active { border-top: 4px solid var(--primary); background: rgba(0,0,0,0.03); color: var(--primary); }

    /* Mini Player in Footer */
    .player-controls { flex-direction: row; width: auto; height: 100%; border-top: none; border-left: 1px solid rgba(0,0,0,0.1); background: var(--primary); }
    #play-btn { width: 65px; height: 100%; border-radius: 0; font-size: 22px; background: transparent; }
    #volume-btn { display: none; }

    /* Stack Content Elements */
    .dashboard-grid { flex-direction: column; height: auto; justify-content: flex-start; }
    .hero-card { width: 100%; max-width: 100%; aspect-ratio: 16/9; margin-bottom: 20px; }
    .hero-info-overlay { padding: 20px; }
    .list-card, .contact-form-container { max-width: 100%; min-width: 100%; }
    #recent-tracks { max-height: 300px; }
}

/* SCROLLBARS */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.1); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 3px; }