/* Base styles */
* {
    font-family: SF Pro Text, SF Pro Icons, Helvetica Neue, Helvetica, Arial, sans-serif !important;
    scroll-behavior: smooth !important;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* COUNTDOWN TIMER */
.countdown-container {
    background: linear-gradient(135deg, rgba(129,0,0,0.95) 0%, rgba(16,0,111,0.95) 100%);
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    margin: 20px 0;
}

.countdown-title {
    color: #fff;
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    max-width: 100%;
}

.countdown-item {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px 15px;
    min-width: 90px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.countdown-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.2);
}

.countdown-value {
    font-size: 42px;
    font-weight: bold;
    color: #fff;
    line-height: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.countdown-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.countdown-separator {
    font-size: 36px;
    font-weight: bold;
    color: #fff;
    opacity: 0.7;
}

.countdown-date {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    margin-top: 20px;
    margin-bottom: 0;
    letter-spacing: 1px;
}

@media only screen and (max-width: 768px) {
    .countdown-title {
        font-size: 22px;
        margin-bottom: 20px;
    }

    .countdown-timer {
        gap: 10px;
    }

    .countdown-item {
        min-width: 70px;
        padding: 15px 10px;
    }

    .countdown-value {
        font-size: 32px;
    }

    .countdown-label {
        font-size: 11px;
    }

    .countdown-separator {
        font-size: 28px;
        display: none;
    }

    .countdown-date {
        font-size: 14px;
    }
}

@media only screen and (max-width: 480px) {
    .countdown-container {
        padding: 20px 15px;
    }

    .countdown-title {
        font-size: 18px;
    }

    .countdown-item {
        min-width: 60px;
        padding: 12px 8px;
    }

    .countdown-value {
        font-size: 24px;
    }

    .countdown-label {
        font-size: 10px;
    }
}

/* Media queries */
@media only screen and (max-width: 600px) {
    #player {
        height: 250px !important;
    }
}

@media only screen and (min-width: 900px) {
    #player {
        height: 700px !important;
    }
}

/* LOADER */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(129,0,0,0.95) 0%, rgba(16,0,111,0.95) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.loader {
    text-align: center;
    padding: 0 20px;
    max-width: 100%;
}

.loader img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    animation: pulse 1.5s infinite;
}

.loading-text {
    color: white;
    margin-top: 20px;
    font-size: 18px;
    font-weight: 500;
}

/* Progress Bar */
.progress-bar-container {
    width: 100%;
    max-width: 300px;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    margin: 25px auto 10px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff6e6e, #ffffff, #fd0000);
    background-size: 200% 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
    animation: shimmer 2s linear infinite;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.progress-percentage {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 600;
    margin-top: 8px;
    letter-spacing: 1px;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Responsive loader styles */
@media (max-width: 768px) {
    .progress-bar-container {
        max-width: 280px;
    }

    .loader img {
        width: 130px;
        height: 130px;
    }

    .loading-text {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .progress-bar-container {
        max-width: 240px;
    }

    .loader img {
        width: 110px;
        height: 110px;
    }

    .loading-text {
        font-size: 15px;
        margin-top: 15px;
    }

    .progress-percentage {
        font-size: 13px;
    }
}

@media (max-width: 360px) {
    .progress-bar-container {
        max-width: 200px;
    }

    .loader img {
        width: 90px;
        height: 90px;
    }

    .loading-text {
        font-size: 14px;
    }
}

/* Header */
.header-gradient {
    background: linear-gradient(90deg, rgba(129, 0, 0, 0.91) 0%, rgba(16, 0, 111, 0.81) 100%);
    color: #fff;
}

/* Radio styles */
#radio a:hover {
    color: #fff;
    background-color: #5d5fff;
}

/* Language selector */
.language-selector {
    color: #fff;
    background-color: #ff0000;
}

/* LOADING PROGRESS BAR */
.stream-status {
    margin: 10px 0;
    max-width: 100%;
}

.progress-container {
    width: 100%;
    max-width: 100%;
    height: 4px;
    background: #f0f0f0;
    border-radius: 2px;
    overflow: hidden;
    margin: 8px 0;
}

.progress-bar {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(129, 0, 0, 0.9) 0%, rgba(16, 0, 111, 0.8) 100%);
    transition: width 0.3s ease;
}

.status-text {
    font-size: 14px;
    color: #666;
    text-align: center;
}

/* NOW PLAYING INDICATOR */
.now-playing {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 100%;
    flex-wrap: wrap;
}

.now-playing-badge {
    background: #ff1a1a;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pulse {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

.stream-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#currentLanguage {
    font-weight: bold;
    color: #10006f;
}

#streamStatus {
    font-size: 12px;
    color: #666;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }

    100% {
        opacity: 1;
    }
}

/* CSS Variables */
:root {
    --primary-color: #ff1a1a;
    --secondary-color: #10006f;
    --background-color: #ffffff;
    --text-color: #333333;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    transition: all 0.3s ease;
}

/* Ensure Bootstrap containers don't cause overflow */
.container {
    max-width: 100%;
}

img, video, audio {
    max-width: 100%;
    height: auto;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
    color: var(--text-color);
}

/* SMOOTH TRANSITIONS BTW LANGUAGE SWITCHES */
.language-transition {
    opacity: 1;
    transition: all 0.5s ease-in-out;
}

.language-transition.fade {
    opacity: 0;
}

.stream-info {
    transition: transform 0.3s ease;
}

.stream-info.slide {
    transform: translateY(-10px);
}

/* Active Language Styles */
.dropdown-menu li a {
    position: relative;
    transition: all 0.3s ease;
    text-decoration: none;
}

.dropdown-menu li a:hover {
    background-color: rgba(129, 0, 0, 0.1);
}

.dropdown-menu li a.active {
    background-color: rgba(129, 0, 0, 0.2);
    color: #ff1a1a;
    font-weight: 600;
}

.dropdown-menu li a.active::before {
    content: '•';
    position: absolute;
    left: 10px;
    color: #ff1a1a;
}

.dropdown-menu {
    padding: 10px 0;
}

.dropdown-menu li {
    margin: 5px 0;
}

.dropdown-menu li a {
    display: block;
    padding: 7px 6px;
    transition: all 0.3s ease;
}

.dropdown-menu li a:hover {
    background-color: rgba(129, 0, 0, 0.1);
    transform: translateX(5px);
}


/* MINI PROGRAM GUIDE */
.program-guide {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin: 20px 0;
    max-width: 100%;
    overflow-x: hidden;
}

.guide-header {
    color: var(--primary-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.program-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.program-item:hover {
    background: rgba(129, 0, 0, 0.05);
    border-left-color: var(--primary-color);
}

.program-time {
    font-weight: bold;
    min-width: 100px;
    color: var(--secondary-color);
}

.program-details {
    flex: 1;
}

.program-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.program-description {
    font-size: 14px;
    color: #666;
}

.live-indicator {
    background: #ff0000;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 10px;
}

/* UPCOMING BROADCASTS */
.broadcast-schedule {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    margin: 2rem 0;
    padding: 1.5rem;
    max-width: 100%;
    overflow-x: hidden;
}

.schedule-title {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.schedule-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.tab-btn {
    background: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    color: var(--background-color);
    cursor: pointer;
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
}

.schedule-item {
    border-left: 4px solid var(--secondary-color);
    margin: 1rem 0;
    padding: 1rem;
    transition: transform 0.3s ease;
}

.schedule-item:hover {
    transform: translateX(10px);
    background: rgba(129, 0, 0, 0.05);
}

.schedule-time {
    color: var(--secondary-color);
    font-weight: bold;
}

.schedule-title {
    font-size: 1.1rem;
    margin: 0.5rem 0;
    font-size: medium;
    font-weight: bold;
}

.broadcast-schedule h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.schedule-description {
    color: #666;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .schedule-tabs {
        justify-content: flex-start;
    }

    .schedule-item {
        padding: 0.8rem;
    }
}

/* share buttons for social media integration */
.share-section {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    overflow-x: hidden;
}

.share-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 15px;
    max-width: 100%;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.share-btn:hover {
    transform: translateY(-3px);
}

.share-btn i {
    font-size: 18px;
}

.facebook {
    background: #3b5998;
}

.twitter {
    background: #1da1f2;
}

.whatsapp {
    background: #25d366;
}

.telegram {
    background: #0088cc;
}

@media (max-width: 768px) {
    .share-buttons {
        gap: 10px;
    }

    .share-btn {
        padding: 8px 15px;
        font-size: 14px;
    }
}

/* Connection speed detection and stream quality management */
.quality-indicator {
    background: var(--primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    position: absolute;
    top: 10px;
    right: 10px;
}


/* BOXICONS ICONS */
.bx {
    font-size: 20px;
    vertical-align: middle;
    margin-right: 8px;
}

/* ============================================
   FLOATING SHARE BUTTON
   ============================================ */
.floating-share-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #ff0000, #cc0000);
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(255, 0, 0, 0.4);
    cursor: pointer;
    z-index: 999;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    opacity: 0;
    transform: translateY(100px);
    pointer-events: none;
    overflow: visible;
    max-width: calc(100vw - 40px);
}

.floating-share-btn.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.floating-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 0, 0, 0.6);
}

.floating-share-btn:active {
    transform: translateY(0);
}

.floating-share-btn i {
    font-size: 1.4rem;
    margin-right: 0;
}

/* Pulse animation for extra attention */
.floating-share-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    max-width: calc(100vw - 40px);
    border-radius: 50px;
    background: rgba(255, 0, 0, 0.4);
    animation: pulse-share 2s infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes pulse-share {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.15);
        opacity: 0;
    }
}

/* ============================================
   SHARE MODAL CUSTOMIZATION
   ============================================ */
#shareModal .modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

#shareModal .modal-header {
    background: linear-gradient(135deg, #ff0000, #cc0000);
    color: white;
    border-radius: 16px 16px 0 0;
    padding: 20px;
    border: none;
}

#shareModal .modal-header .modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

#shareModal .modal-header .modal-title i {
    font-size: 1.5rem;
}

#shareModal .modal-header .btn-close {
    filter: brightness(0) invert(1);
    opacity: 1;
}

#shareModal .modal-body {
    padding: 25px;
}

/* Current Language Badge */
.current-lang-badge {
    background: #f0f0f0;
    padding: 10px 15px;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #333;
}

.current-lang-badge strong {
    color: #ff0000;
}

/* Share Options Grid */
.share-options-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 20px 0;
    max-width: 100%;
}

/* Individual Share Option Buttons */
.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 10px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    color: #333;
    font-weight: 500;
}

.share-option:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.share-option i {
    font-size: 2rem;
    margin-bottom: 8px;
    margin-right: 0;
}

/* Platform-specific colors on hover */
.share-option.whatsapp:hover {
    border-color: #25D366;
    background: #25D366;
    color: white;
}

.share-option.facebook:hover {
    border-color: #1877F2;
    background: #1877F2;
    color: white;
}

.share-option.twitter:hover {
    border-color: #1DA1F2;
    background: #1DA1F2;
    color: white;
}

.share-option.telegram:hover {
    border-color: #0088cc;
    background: #0088cc;
    color: white;
}

.share-option.email:hover {
    border-color: #EA4335;
    background: #EA4335;
    color: white;
}

.share-option.sms:hover {
    border-color: #00C853;
    background: #00C853;
    color: white;
}

.share-option.copy:hover {
    border-color: #6c757d;
    background: #6c757d;
    color: white;
}

.share-option.native:hover {
    border-color: #007bff;
    background: #007bff;
    color: white;
}

/* Preview Box */
.share-preview {
    margin-top: 20px;
}

.preview-box {
    background: #f8f9fa;
    border-left: 4px solid #ff0000;
    padding: 15px;
    border-radius: 8px;
    margin-top: 8px;
}

.preview-box strong {
    color: #333;
    font-size: 1rem;
}

.preview-box small {
    color: #666;
}

/* Success Toast Notification */
.share-toast {
    position: fixed;
    bottom: 90px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    animation: slideIn 0.3s ease;
    font-weight: 500;
    text-align: center;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* ============================================
   MOBILE RESPONSIVE STYLES
   ============================================ */
/* Medium devices (tablets, 600px to 768px) */
@media (max-width: 768px) and (min-width: 601px) {
    .share-options-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
}

@media (max-width: 768px) {
    /* Floating button adjustments for mobile */
    .floating-share-btn {
        bottom: 80px; /* Above browser chrome */
        right: 15px;
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .floating-share-btn i {
        font-size: 1.2rem;
    }

    /* Share options grid - 3 columns on mobile */
    .share-options-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .share-option {
        padding: 15px 8px;
        font-size: 0.75rem;
    }

    .share-option i {
        font-size: 1.5rem;
    }

    /* Modal full-screen on small devices */
    #shareModal .modal-dialog {
        margin: 0;
        max-width: 100%;
        min-height: 100vh;
    }

    #shareModal .modal-content {
        min-height: 100vh;
        border-radius: 0;
    }

    /* Toast positioning */
    .share-toast {
        bottom: 150px;
        right: 15px;
        left: 15px;
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    /* Extra small screens - make share button icon-only option */
    .floating-share-btn span {
        display: inline; /* Keep text visible */
    }

    /* Tighter grid on very small screens */
    .share-options-grid {
        gap: 10px;
    }

    .share-option {
        padding: 12px 5px;
    }
}
