/**
 * Bradford College Kano Online Radio - Main Stylesheet
 * Theme: Blue, Gold, White
 */

/* ===== CSS Variables ===== */
:root {
    /* Bradford College Brand Colors */
    --bc-blue: #003B8E;
    --bc-blue-light: #1a5cc7;
    --bc-blue-dark: #002a6b;
    --bc-gold: #D4A843;
    --bc-gold-light: #e8c566;
    --bc-gold-dark: #b08a30;
    --bc-white: #FFFFFF;
    --bc-light: #F8F9FA;
    --bc-dark: #1a1a2e;
    
    /* Functional Colors */
    --primary: var(--bc-blue);
    --primary-light: var(--bc-blue-light);
    --primary-dark: var(--bc-blue-dark);
    --accent: var(--bc-gold);
    --accent-light: var(--bc-gold-light);
    --accent-dark: var(--bc-gold-dark);
    
    /* Status Colors */
    --status-live: #dc3545;
    --status-offline: #6c757d;
    --success: #198754;
    --warning: #ffc107;
    
    /* Typography */
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing */
    --section-padding: 3rem;
    --card-radius: 16px;
    --btn-radius: 10px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 59, 142, 0.08);
    --shadow-md: 0 4px 20px rgba(0, 59, 142, 0.12);
    --shadow-lg: 0 8px 40px rgba(0, 59, 142, 0.18);
    --shadow-glow: 0 0 20px rgba(212, 168, 67, 0.3);
}

/* Dark Mode Overrides */
[data-bs-theme="dark"] {
    --bc-light: #1a1a2e;
    --bc-dark: #0f0f1a;
    --primary: #4a8eff;
    --primary-light: #6ba5ff;
    --primary-dark: #003B8E;
    --accent: #e8c566;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
}

/* ===== Global Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-medium), color var(--transition-medium);
}

/* ===== Navbar ===== */
.radio-navbar {
    background: linear-gradient(135deg, var(--bc-blue) 0%, var(--bc-blue-dark) 100%);
    padding: 0.75rem 0;
    box-shadow: var(--shadow-md);
}

.navbar-logo {
    width: 45px;
    height: 45px;
    object-fit: contain;
    border-radius: 50%;
    border: 2px solid var(--bc-gold);
}

.brand-text {
    line-height: 1.2;
}

.school-name {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--bc-white);
}

.radio-subtitle {
    font-size: 0.75rem;
    color: var(--bc-gold);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem !important;
    border-radius: var(--btn-radius);
    transition: all var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    color: var(--bc-gold) !important;
    background-color: rgba(212, 168, 67, 0.1);
}

.theme-toggle {
    border-color: var(--bc-gold) !important;
    color: var(--bc-gold) !important;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all var(--transition-fast);
}

.theme-toggle:hover {
    background-color: var(--bc-gold) !important;
    color: var(--bc-blue) !important;
}

/* ===== Announcement Bar ===== */
.announcement-bar {
    background: linear-gradient(90deg, var(--bc-gold-dark), var(--bc-gold), var(--bc-gold-dark));
    color: var(--bc-blue-dark);
    font-size: 0.85rem;
    font-weight: 600;
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

.announcement-text {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* ===== Main Content ===== */
main {
    flex: 1;
    padding: 2rem 0;
}

/* ===== Hero Section ===== */
.hero-section {
    background: linear-gradient(135deg, var(--bc-blue) 0%, var(--bc-blue-dark) 50%, #001a4d 100%);
    color: var(--bc-white);
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(212, 168, 67, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 50%;
    border: 4px solid var(--bc-gold);
    box-shadow: var(--shadow-glow);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* ===== Status Badge ===== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all var(--transition-medium);
}

.status-badge.live {
    background-color: rgba(220, 53, 69, 0.15);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
    animation: pulse-live 2s infinite;
}

.status-badge.offline {
    background-color: rgba(108, 117, 125, 0.15);
    color: var(--status-offline);
    border: 1px solid rgba(108, 117, 125, 0.3);
}

@keyframes pulse-live {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
        transform: scale(1.02);
    }
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.live {
    background-color: var(--status-live);
    animation: blink 1s infinite;
}

.status-dot.offline {
    background-color: var(--status-offline);
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ===== Cards ===== */
.radio-card {
    background: var(--bs-card-bg);
    border: 1px solid rgba(0, 59, 142, 0.1);
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-medium);
    overflow: hidden;
}

.radio-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-header-custom {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 1rem 1.5rem;
    border-bottom: none;
}

.card-header-custom h5 {
    font-family: var(--font-heading);
    font-weight: 700;
    margin: 0;
}

.card-body-custom {
    padding: 1.5rem;
}

/* ===== Audio Player ===== */
.audio-player-container {
    background: linear-gradient(135deg, var(--bc-blue-dark), var(--bc-blue));
    border-radius: var(--card-radius);
    padding: 2rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.audio-player-container::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(212, 168, 67, 0.2) 0%, transparent 70%);
    border-radius: 50%;
}

.audio-visualizer {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    height: 60px;
    gap: 3px;
    margin-bottom: 1.5rem;
}

.visualizer-bar {
    width: 4px;
    background: linear-gradient(to top, var(--bc-gold), var(--bc-gold-light));
    border-radius: 2px;
    transition: height 0.1s ease;
    min-height: 4px;
}

.visualizer-bar.active {
    animation: visualizer-dance 0.5s ease-in-out infinite alternate;
}

@keyframes visualizer-dance {
    0% { height: 10%; }
    100% { height: 100%; }
}

.player-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid var(--bc-gold);
    background: transparent;
    color: var(--bc-gold);
    font-size: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.player-btn:hover {
    background: var(--bc-gold);
    color: var(--bc-blue);
    transform: scale(1.1);
    box-shadow: var(--shadow-glow);
}

.player-btn.playing {
    background: var(--bc-gold);
    color: var(--bc-blue);
    animation: pulse-btn 2s infinite;
}

@keyframes pulse-btn {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212, 168, 67, 0.4); }
    50% { box-shadow: 0 0 0 12px rgba(212, 168, 67, 0); }
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.volume-slider {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--bc-gold);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.volume-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--bc-gold);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.btn-mute {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.btn-mute:hover {
    color: var(--bc-gold);
}

/* ===== Info Items ===== */
.info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 59, 142, 0.08);
}

.info-item:last-child {
    border-bottom: none;
}

.info-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.info-content {
    flex: 1;
}

.info-label {
    font-size: 0.75rem;
    color: var(--bs-secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.info-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--bs-body-color);
}

/* ===== Listener Counter ===== */
.listener-counter {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
}

.listener-counter i {
    color: var(--bc-gold);
}

/* ===== Footer ===== */
.radio-footer {
    background: linear-gradient(135deg, var(--bc-blue-dark), var(--bc-blue));
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.footer-brand {
    font-family: var(--font-heading);
    color: var(--bc-gold);
    font-size: 1.25rem;
}

.footer-desc {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.footer-heading {
    color: var(--bc-gold);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--bc-gold);
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.5);
}

/* ===== Animations ===== */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

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

.slide-up {
    animation: slideUp 0.5s ease-out;
}

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

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-logo {
        width: 70px;
        height: 70px;
    }
    
    .school-name {
        font-size: 1rem;
    }
    
    .audio-player-container {
        padding: 1.5rem;
    }
    
    .player-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .radio-card {
        margin-bottom: 1rem;
    }
}

/* ===== Scrollbar Styling ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bs-body-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--bc-blue);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bc-blue-light);
}

/* ===== Reconnect Notification ===== */
.reconnect-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    animation: slideInRight 0.4s ease;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ===== Loading Spinner ===== */
.radio-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(212, 168, 67, 0.3);
    border-radius: 50%;
    border-top-color: var(--bc-gold);
    animation: spin 1s linear infinite;
}

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