:root {
    --primary: #216eed;
    --secondary: #7000ff;
    --dark-bg: #0a0a0c;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --accent-gradient: linear-gradient(135deg, #216eed 0%, #7000ff 100%);
    --text: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.65);
}

body {
    background-color: var(--dark-bg);
    color: #e0e0e0; /* Lighter text for better contrast */
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.glass-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 25px rgba(33, 110, 237, 0.15);
    background: rgba(255, 255, 255, 0.05);
}

/* Hero Section */
.hero-section {
    padding: 120px 0 60px;
    background: radial-gradient(circle at 50% -20%, rgba(112, 0, 255, 0.15) 0%, transparent 50%);
}

.search-container {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    padding: 18px 60px 18px 25px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    color: white;
    font-size: 1.1rem;
    outline: none;
    transition: all 0.3s ease;
}

.search-icon {
    position: absolute;
    right: 25px;
    color: var(--primary);
    font-size: 1.3rem;
    pointer-events: none;
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.2);
}

/* Radio Grid */
.radio-grid {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 12px !important;
    width: 100%;
}

@media (max-width: 1400px) {
    .radio-grid {
        grid-template-columns: repeat(5, 1fr) !important;
    }
}

@media (max-width: 1100px) {
    .radio-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .radio-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .radio-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

.radio-card {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 4px;
    background: #1a1d21;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none !important;
}

.radio-card:hover {
    transform: scale(1.03);
    z-index: 10;
    border-color: var(--primary);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.radio-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #1a1d21;
}

/* Fallback for broken logos */
.radio-logo[src*="broken"], .radio-logo:not([src]) {
    opacity: 0.5;
}

.radio-name {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Custom Buttons */
.btn-primary-custom {
    background: var(--accent-gradient);
    border: none;
    color: white;
    font-weight: 600;
    padding: 10px 25px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-primary-custom:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 242, 255, 0.4);
    color: white;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0c;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader-logo {
    font-size: 3rem;
    font-family: 'Outfit';
    font-weight: bold;
    margin-bottom: 20px;
    animation: pulse 1.5s infinite;
}

.loader-bar {
    width: 200px;
    height: 2px;
    background: rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
}

.loader-bar::after {
    content: '';
    position: absolute;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary);
    animation: loading-bar 2s infinite;
}

/* Mini Player - Simple Bar */
.mini-player {
    position: fixed;
    bottom: -110px; /* Hidden by default */
    left: 0;
    width: 100%;
    height: 85px;
    background: rgba(10, 10, 12, 0.98);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    z-index: 1000;
    padding: 0 15px;
    display: flex;
    align-items: center;
    transition: bottom 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mini-player.visible {
    bottom: 0;
}

.mini-player.visible.collapsed {
    bottom: -85px;
}

.btn-hide-player {
    position: absolute;
    top: -24px;
    right: 20px;
    background: rgba(10, 10, 12, 0.98);
    border: 1px solid var(--glass-border);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    color: white;
    width: 45px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
}

.btn-hide-player:hover {
    background: var(--primary);
    color: white;
}

.btn-hide-player i {
    transition: transform 0.3s ease;
}

.mini-player.collapsed .btn-hide-player i {
    transform: rotate(180deg);
}

/* Marquee Effect for Mobile */
.marquee-container {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    width: 100%;
}

.marquee-text {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 15s linear infinite;
}

@keyframes marquee {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-100%, 0); }
}

.player-controls button i {
    font-size: 2.2rem;
}

.volume-ctrl input[type="range"] {
    accent-color: var(--primary);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .mini-player .player-controls .volume-ctrl {
        display: none !important;
    }
    
    .mini-player h6, .mini-player small {
        max-width: none;
    }

    /* Enable marquee only on mobile for better UX */
    .mini-player .player-info {
        display: flex;
        flex-direction: column;
        overflow: hidden;
        white-space: nowrap;
        width: 160px;
    }

    .mini-player .player-info h6, 
    .mini-player .player-info small {
        display: inline-block;
        padding-left: 100%;
        animation: marquee-mobile 12s linear infinite;
    }
}

@keyframes marquee-mobile {
    0% { transform: translateX(0); }
    100% { transform: translateX(-200%); }
}

.shake { animation: shake 0.4s ease-in-out; }
.fade-in { animation: fadeIn 0.8s ease forwards; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse { 
    0% { opacity: 0.5; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1); }
    100% { opacity: 0.5; transform: scale(0.95); }
}

@keyframes loading-bar { 100% { left: 100%; } }

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

/* Share Modal Enhancements */
.share-icon {
    width: 60px;
    height: 60px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
}

.share-icon:hover {
    transform: scale(1.1) rotate(8deg);
    background: var(--primary);
    color: white !important;
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.3);
}

.btn-share-fb:hover { background: #1877f2; box-shadow: 0 0 20px rgba(24, 119, 242, 0.4); }
.btn-share-tw:hover { background: #000000; box-shadow: 0 0 20px rgba(255, 255, 255, 0.2); border-color: rgba(255, 255, 255, 0.4) !important; }
.btn-share-wa:hover { background: #25d366; box-shadow: 0 0 20px rgba(37, 211, 102, 0.4); }

#shareUrlInput, #embedCodeInput {
    border-radius: 12px;
    padding: 12px;
    font-family: monospace;
    transition: all 0.3s ease;
    background: rgba(0,0,0,0.3);
    color: #fff;
    border: 1px solid var(--glass-border);
}

#shareUrlInput:focus, #embedCodeInput:focus {
    background: rgba(255,255,255,0.1);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.2);
    border-color: var(--primary);
    outline: none;
}
/* High Contrast Accessibility Fixes */
.text-muted { color: #b0b0b0 !important; }
.smaller, .small { color: #d1d1d1; }
.breadcrumb-item a { color: #a0a0a0 !important; text-decoration: none; }
.breadcrumb-item a:hover { color: var(--primary) !important; }
.breadcrumb-item.active { color: var(--primary) !important; }
label, .text-white-50 { color: #c0c0c0 !important; }
.glass-card h5 { color: #ffffff; }
.glass-card .text-muted { color: #99a0a8 !important; }
.badge.bg-secondary { background-color: rgba(255,255,255,0.1) !important; color: #e0e0e0; }

/* Circular Album Art Fix */
.player-main-art { width: 280px !important; height: 280px !important; object-fit: cover !important; border-radius: 50% !important; border: 4px solid rgba(255,255,255,0.15) !important; box-shadow: 0 10px 40px rgba(0,0,0,0.5) !important; transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.player-main-art:hover { transform: scale(1.05) rotate(5deg); }
@media (max-width: 768px) { .player-main-art { width: 180px !important; height: 180px !important; } }
