/**
 * Madura Radio - 3D Tactile & Broadcast Styling System
 * Inspired by high-energy radio stations (Siyatha FM style) with 3D shaded buttons,
 * analog VU meters, LED spectrum analyzers, and running news tickers.
 */

:root {
    --primary-red: #e60000;
    --primary-dark-red: #990000;
    --primary-glow: rgba(230, 0, 0, 0.4);
    --gold-accent: #f59e0b;
    --gold-dark: #b45309;
    --dark-bg: #0d1117;
    --card-bg: #161b22;
    --card-border: #30363d;
    --text-main: #f0f6fc;
    --text-muted: #8b949e;
    --btn-3d-shadow: rgba(0, 0, 0, 0.6);
}

/* ==========================================================================
   Base & Typography
   ========================================================================== */
body {
    font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
    background-color: #0b0f14;
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(230, 0, 0, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 85% 85%, rgba(245, 158, 11, 0.05) 0%, transparent 40%),
        linear-gradient(180deg, #0b0f14 0%, #111822 100%);
    color: var(--text-main);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* ==========================================================================
   3D Tactile Buttons with Deep Shading & Inset Highlights
   ========================================================================== */
.btn-3d {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    text-decoration: none;
    outline: none;
    box-sizing: border-box;
}

.btn-3d::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 4px;
    right: 4px;
    height: 38%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 8px 8px 16px 16px;
    pointer-events: none;
}

/* Red 3D Button (Primary Action) */
.btn-3d-red {
    background: linear-gradient(180deg, #ff1a1a 0%, #d40000 60%, #990000 100%);
    color: #ffffff !important;
    box-shadow: 
        0 6px 0 #730000,
        0 8px 12px rgba(0, 0, 0, 0.6),
        0 0 20px rgba(255, 0, 0, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.6),
        inset 0 -2px 4px rgba(0, 0, 0, 0.4);
    text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.6);
}

.btn-3d-red:hover {
    background: linear-gradient(180deg, #ff3333 0%, #e60000 60%, #b30000 100%);
    box-shadow: 
        0 6px 0 #730000,
        0 10px 16px rgba(0, 0, 0, 0.7),
        0 0 28px rgba(255, 26, 26, 0.5),
        inset 0 1px 1px rgba(255, 255, 255, 0.7);
    color: #ffffff !important;
}

.btn-3d-red:active, .btn-3d-red.active {
    top: 4px;
    box-shadow: 
        0 2px 0 #730000,
        0 4px 6px rgba(0, 0, 0, 0.5),
        0 0 15px rgba(255, 0, 0, 0.4),
        inset 0 2px 4px rgba(0, 0, 0, 0.6);
}

/* Gold 3D Button */
.btn-3d-gold {
    background: linear-gradient(180deg, #fbbf24 0%, #d97706 60%, #92400e 100%);
    color: #1f1203 !important;
    box-shadow: 
        0 6px 0 #78350f,
        0 8px 12px rgba(0, 0, 0, 0.6),
        0 0 15px rgba(245, 158, 11, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.8),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-3d-gold:hover {
    background: linear-gradient(180deg, #fcd34d 0%, #f59e0b 60%, #b45309 100%);
    box-shadow: 
        0 6px 0 #78350f,
        0 10px 16px rgba(0, 0, 0, 0.7),
        0 0 25px rgba(251, 191, 36, 0.5),
        inset 0 1px 1px rgba(255, 255, 255, 0.9);
}

.btn-3d-gold:active, .btn-3d-gold.active {
    top: 4px;
    box-shadow: 
        0 2px 0 #78350f,
        0 4px 6px rgba(0, 0, 0, 0.5),
        inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Dark Studio 3D Button */
.btn-3d-dark {
    background: linear-gradient(180deg, #2d3748 0%, #1a202c 60%, #11151c 100%);
    color: #e2e8f0 !important;
    border: 1px solid #3b4252;
    box-shadow: 
        0 6px 0 #0d1117,
        0 8px 12px rgba(0, 0, 0, 0.8),
        inset 0 1px 1px rgba(255, 255, 255, 0.2),
        inset 0 -2px 4px rgba(0, 0, 0, 0.6);
    text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.8);
}

.btn-3d-dark:hover {
    background: linear-gradient(180deg, #374151 0%, #1f2937 60%, #141a24 100%);
    box-shadow: 
        0 6px 0 #0d1117,
        0 10px 14px rgba(0, 0, 0, 0.9),
        0 0 15px rgba(255, 255, 255, 0.1),
        inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.btn-3d-dark:active, .btn-3d-dark.active {
    top: 4px;
    box-shadow: 
        0 2px 0 #0d1117,
        0 4px 6px rgba(0, 0, 0, 0.6),
        inset 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* Emerald Green 3D Button (for Live/Save/Success) */
.btn-3d-green {
    background: linear-gradient(180deg, #10b981 0%, #059669 60%, #047857 100%);
    color: #ffffff !important;
    box-shadow: 
        0 6px 0 #064e3b,
        0 8px 12px rgba(0, 0, 0, 0.6),
        0 0 20px rgba(16, 185, 129, 0.35),
        inset 0 1px 1px rgba(255, 255, 255, 0.6);
    text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.6);
}

.btn-3d-green:hover {
    background: linear-gradient(180deg, #34d399 0%, #10b981 60%, #059669 100%);
    box-shadow: 
        0 6px 0 #064e3b,
        0 10px 16px rgba(0, 0, 0, 0.7),
        0 0 25px rgba(52, 211, 153, 0.5);
}

.btn-3d-green:active {
    top: 4px;
    box-shadow: 0 2px 0 #064e3b, 0 4px 6px rgba(0, 0, 0, 0.5);
}

/* Master Play/Stop Round 3D Buttons */
.btn-3d-circle {
    width: 76px;
    height: 76px;
    border-radius: 50% !important;
    padding: 0 !important;
    font-size: 26px;
}

.btn-3d-circle::after {
    border-radius: 50% !important;
    top: 4px;
    left: 10px;
    right: 10px;
    height: 40%;
}

/* ==========================================================================
   Running News Ticker Bar (Marquee Style)
   ========================================================================== */
.ticker-container {
    background: linear-gradient(90deg, #180000 0%, #290808 50%, #180000 100%);
    border-top: 1px solid #ff2b2b33;
    border-bottom: 2px solid #e60000;
    box-shadow: 0 4px 15px rgba(230, 0, 0, 0.25);
    overflow: hidden;
    position: relative;
    z-index: 40;
}

.ticker-badge {
    background: linear-gradient(135deg, #e60000 0%, #990000 100%);
    color: #fff;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.5);
    clip-path: polygon(0 0, 92% 0, 100% 100%, 0 100%);
    z-index: 2;
}

.ticker-wrapper {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.ticker-content {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%;
    animation: tickerMarquee 35s linear infinite;
}

.ticker-wrapper:hover .ticker-content {
    animation-play-state: paused;
}

@keyframes tickerMarquee {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    margin-right: 48px;
    color: #f1f5f9;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.ticker-item:hover {
    color: #fbbf24;
}

.ticker-tag {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 8px;
}

/* ==========================================================================
   Master Radio Player Component & Studio Deck
   ========================================================================== */
.radio-deck {
    background: linear-gradient(145deg, #1c2331 0%, #121722 60%, #0a0d14 100%);
    border: 2px solid #2e384d;
    border-radius: 20px;
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.8),
        0 0 30px rgba(230, 0, 0, 0.15),
        inset 0 1px 2px rgba(255, 255, 255, 0.15),
        inset 0 -2px 10px rgba(0, 0, 0, 0.8);
    position: relative;
    overflow: hidden;
}

.radio-deck::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #e60000 0%, #f59e0b 50%, #e60000 100%);
}

/* Studio Aluminum Metallic Texture Accent */
.deck-metallic {
    background: linear-gradient(180deg, #2a3346 0%, #1a202c 50%, #151a24 100%);
    border-radius: 12px;
    border: 1px solid #3e485e;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Pulse / Live "ON AIR" Indicator */
.on-air-badge {
    background: #4a0000;
    border: 1px solid #ff2b2b;
    color: #ff8080;
    border-radius: 6px;
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

.on-air-badge.live {
    background: linear-gradient(135deg, #e60000 0%, #990000 100%);
    color: #ffffff;
    box-shadow: 0 0 15px #ff1a1a;
    animation: onAirPulse 1.8s infinite;
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #555;
}

.on-air-badge.live .live-dot {
    background-color: #fff;
    box-shadow: 0 0 8px #fff;
}

@keyframes onAirPulse {
    0%, 100% {
        box-shadow: 0 0 12px rgba(230, 0, 0, 0.8);
    }
    50% {
        box-shadow: 0 0 24px rgba(255, 51, 51, 1);
    }
}

/* ==========================================================================
   Analog VU Meter Component (Left & Right Channels)
   ========================================================================== */
.vu-meter-panel {
    background: #0d1117;
    border: 2px solid #232a3b;
    border-radius: 14px;
    padding: 12px;
    box-shadow: 
        inset 0 4px 10px rgba(0, 0, 0, 0.9),
        0 2px 6px rgba(255, 255, 255, 0.05);
}

.vu-meter-housing {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.vu-meter-dial {
    background: linear-gradient(180deg, #fff2d9 0%, #fae6c0 60%, #e2ceaa 100%);
    border: 2px solid #574635;
    border-radius: 10px;
    height: 90px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        inset 0 3px 6px rgba(0, 0, 0, 0.4),
        0 1px 3px rgba(0, 0, 0, 0.8);
}

.vu-meter-dial::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 120%, rgba(255, 215, 0, 0.3) 0%, transparent 70%);
    pointer-events: none;
}

/* VU Scale Markings */
.vu-scale {
    position: absolute;
    top: 8px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: space-between;
    font-size: 8px;
    font-weight: 800;
    color: #332619;
    user-select: none;
}

.vu-scale .vu-red {
    color: #cc0000;
}

.vu-needle-pivot {
    position: absolute;
    bottom: -15px;
    left: 50%;
    width: 24px;
    height: 24px;
    background: #2b2b2b;
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.8);
    z-index: 5;
}

.vu-needle {
    position: absolute;
    bottom: 0px;
    left: 50%;
    width: 2px;
    height: 72px;
    background: #b30000;
    transform-origin: bottom center;
    transform: rotate(-45deg);
    transition: transform 0.08s cubic-bezier(0.1, 0.9, 0.2, 1);
    z-index: 4;
    box-shadow: 1px 0 2px rgba(0,0,0,0.4);
}

.vu-label {
    position: absolute;
    bottom: 8px;
    width: 100%;
    text-align: center;
    font-size: 9px;
    font-weight: 900;
    color: #4a3b2c;
    letter-spacing: 1px;
}

/* LED Multi-stage Peak Meter Bar */
.led-meter-bar {
    display: flex;
    gap: 3px;
    height: 10px;
    background: #090c10;
    padding: 3px;
    border-radius: 6px;
    border: 1px solid #232936;
    margin-top: 8px;
}

.led-segment {
    flex: 1;
    background-color: #1f2937;
    border-radius: 2px;
    transition: background-color 0.05s ease;
}

.led-segment.green.active {
    background-color: #10b981;
    box-shadow: 0 0 6px #10b981;
}

.led-segment.yellow.active {
    background-color: #f59e0b;
    box-shadow: 0 0 6px #f59e0b;
}

.led-segment.red.active {
    background-color: #ef4444;
    box-shadow: 0 0 8px #ef4444;
}

/* ==========================================================================
   3D Tactile Volume Slider & Controls
   ========================================================================== */
.volume-slider-3d {
    -webkit-appearance: none;
    width: 100%;
    height: 10px;
    border-radius: 6px;
    background: linear-gradient(180deg, #090c10 0%, #1b2332 100%);
    border: 1px solid #333d52;
    outline: none;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8);
}

.volume-slider-3d::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(180deg, #f3f4f6 0%, #9ca3af 60%, #4b5563 100%);
    cursor: pointer;
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.7),
        0 0 10px rgba(255, 255, 255, 0.3),
        inset 0 1px 1px #fff;
    border: 2px solid #1f2937;
    transition: transform 0.1s;
}

.volume-slider-3d::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    background: linear-gradient(180deg, #ffffff 0%, #e5e7eb 60%, #6b7280 100%);
}

.volume-slider-3d::-webkit-slider-thumb:active {
    transform: scale(1.05);
    box-shadow: 0 2px 3px rgba(0,0,0,0.8), inset 0 1px 2px rgba(0,0,0,0.4);
}

/* Waveform Visualizer Canvas */
.waveform-canvas {
    width: 100%;
    height: 48px;
    border-radius: 8px;
    background: #090c12;
    border: 1px solid #1e2638;
}

/* ==========================================================================
   News Slider Carousel & Cards
   ========================================================================== */
.news-slider-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
}

.news-slider-track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.news-slide-card {
    min-width: 100%;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .news-slide-card-multi {
        min-width: 50%;
    }
}

@media (min-width: 1024px) {
    .news-slide-card-multi {
        min-width: 33.3333%;
    }
}

.card-3d-hover {
    background: #151b26;
    border: 1px solid #2a344a;
    border-radius: 14px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.card-3d-hover:hover {
    transform: translateY(-6px);
    border-color: #ff333366;
    box-shadow: 
        0 14px 28px rgba(0, 0, 0, 0.6),
        0 0 20px rgba(230, 0, 0, 0.2);
}

/* Category Badge */
.category-badge {
    background: linear-gradient(135deg, #e60000 0%, #990000 100%);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    display: inline-block;
    box-shadow: 0 2px 5px rgba(0,0,0,0.4);
}

/* Navigation Links */
.nav-link-custom {
    color: #cbd5e1;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s;
    text-decoration: none;
}

.nav-link-custom:hover, .nav-link-custom.active {
    color: #ffffff;
    background: rgba(230, 0, 0, 0.15);
    border-bottom: 2px solid #e60000;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #0b0f14;
}
::-webkit-scrollbar-thumb {
    background: #2a344a;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #e60000;
}
