/* Base styles */
* {
    font-family: SF Pro Text, SF Pro Icons, Helvetica Neue, Helvetica, Arial, sans-serif !important;
    scroll-behavior: smooth !important;
}

/* 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;
}

.loader img {
    width: 170px;
    height: 100px;
    animation: pulse 1.5s infinite;
}

.loading-text {
    color: white;
    margin-top: 20px;
    font-size: 18px;
    font-weight: 500;
}

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

/* 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;
}

.progress-container {
    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;
}

.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;
    }
}

/* Dark Mode Styles */
:root {
    --primary-color: #ff1a1a;
    --secondary-color: #10006f;
    --background-color: #ffffff;
    --text-color: #333333;
}

[data-theme="dark"] {
    --primary-color: #ff1a1a;
    --secondary-color: #4d4dff;
    --background-color: #1a1a1a;
    --text-color: #ffffff;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    transition: all 0.3s ease;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
    color: var(--text-color);
}

/* Theme Switch Styles */
.theme-switch-wrapper {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999;
}

.theme-switch {
    display: inline-block;
    height: 34px;
    width: 60px;
    position: relative;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: #ccc;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    background-color: #fff;
    bottom: 4px;
    content: "";
    height: 26px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 26px;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--primary-color);
}

input:checked+.slider:before {
    transform: translateX(26px);
}

/* 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;
}

.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.1);
    margin: 2rem 0;
    padding: 1.5rem;
}

.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);
}

.share-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 15px;
}

.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;
}

.chat-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    height: 500px;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 15px;
    background: var(--primary-color);
    color: white;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.online-count {
    font-size: 14px;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 12px;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 15px;
    animation: fadeIn 0.3s ease;
}

.message.sent {
    background: var(--primary-color);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.message.received {
    background: #f0f0f0;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.chat-input-area {
    padding: 15px;
    display: flex;
    gap: 10px;
    border-top: 1px solid #eee;
}

#messageInput {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 25px;
    outline: none;
    transition: border-color 0.3s ease;
}

#messageInput:focus {
    border-color: var(--primary-color);
}

.send-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.send-btn:hover {
    transform: scale(1.1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .chat-container {
        height: 400px;
    }

    .message {
        max-width: 90%;
    }
}

/* BOXICONS ICONS */
.bx {
    font-size: 20px;
    vertical-align: middle;
    margin-right: 8px;
}

.send-btn .bx {
    margin-right: 0;
}
