@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&display=swap');

:root {
    --bg-main: #060b08;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-glass: rgba(10, 15, 13, 0.7);
    --primary: #1e4d2b;
    --primary-light: #2d5a3a;
    --accent: #c5a059;
    --accent-glow: rgba(197, 160, 89, 0.3);
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --border-glass: rgba(255, 255, 255, 0.1);
    --shadow-premium: 0 8px 32px 0 rgba(0, 0, 0, 0.8);

    /* Theme Variables for Unified Nav & Footer */
    --nav-bg: rgba(6, 11, 8, 0.9);
    --nav-primary: var(--accent);
    --footer-bg: linear-gradient(to top, var(--bg-main), rgba(6, 11, 8, 0.95));
    --footer-primary: var(--accent);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    font-family: inherit;
}

body {
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(30, 77, 43, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 0% 100%, rgba(197, 160, 89, 0.05) 0%, transparent 30%);
    color: var(--text-primary);
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    padding-bottom: 0;
}

/* Header & Banner */
.header {
    width: 100%;
    max-width: 100%;
    margin: 0 0 40px;
    padding: 0;
    text-align: center;
}

.header-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0;
    box-shadow: var(--shadow-premium);
    border-bottom: 1px solid var(--border-glass);
    transition: transform 0.4s ease;
}

.header-image:hover {
    transform: scale(1.01);
}

/* Welcome Section */
.welcome-section {
    text-align: center;
    margin-bottom: 35px;
    padding: 0 15px;
    animation: fadeIn 0.8s ease;
}

.welcome-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 12px;
    text-shadow: 0 2px 10px rgba(197, 160, 89, 0.2);
}

.welcome-text {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}


/* Categories Container */
.main-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.categories-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* قسمين في كل سطر على الكمبيوتر */
    gap: 20px;
    margin-bottom: 30px;
    align-items: start;
}

.category {
    margin-bottom: 0px; /* تصفير الهامش السفلي لأن التباعد تتعامل معه الشبكة */
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.category.active {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.category-header {
    padding: 20px 25px;
    background: linear-gradient(90deg, var(--bg-card), transparent);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.category-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.category-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-header .arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    color: var(--text-secondary);
}

.category.active .arrow {
    transform: rotate(180deg);
}

/* Radio List Grid */
.radio-list {
    display: none;
    padding: 10px 20px 20px;
    grid-template-columns: 1fr 1fr; /* إذاعتين في كل سطر على الكمبيوتر */
    gap: 15px;
    animation: fadeIn 0.4s ease;
}

.category.active .radio-list {
    display: grid;
}

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

/* Radio Card */
.radio-card {
    display: flex;
    align-items: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
}

.radio-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.radio-image {
    width: 65px;
    height: 65px;
    border-radius: 10px;
    object-fit: cover;
    margin-left: 15px;
    border: 1px solid var(--border-glass);
}

.radio-info {
    flex: 1;
}

.radio-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.radio-subtitle {
    font-size: 0.8rem;
    color: #ffd700; /* Gold */
    opacity: 0.8;
}

.play-button {
    background: var(--primary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.play-button:hover {
    background: var(--accent);
    transform: scale(1.1);
}

.play-button.playing {
    background: #e74c3c;
}

/* Fixed Player Bar */
.now-playing-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 15px 25px;
    border-top: 1px solid var(--border-glass);
    z-index: 1000;
    display: none;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s ease-out;
}

.now-playing-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.player-metadata {
    display: flex;
    flex-direction: column;
}

.player-label {
    font-size: 0.75rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.player-title {
    font-weight: 600;
    font-size: 1.1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 250px;
}
.player-subtitle {
    font-size: 0.85rem;
    color: var(--accent);
    opacity: 0.9;
    font-weight: 600;
}

/* Active Listeners UI */
.active-listeners-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 15px;
    border-radius: 20px;
    border: 1px solid var(--border-glass);
}

.active-listeners-bar b {
    color: var(--accent);
    font-weight: 800;
    margin-right: 5px;
    font-family: monospace;
    font-size: 1.1rem;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #e74c3c;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
    animation: pulse-red 1.5s infinite;
}

@keyframes pulse-red {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(231, 76, 60, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); }
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.main-toggle-btn {
    background: var(--accent);
    color: var(--bg-main);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.15rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.main-toggle-btn:hover {
    background: #ffd700;
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(197, 160, 89, 0.5);
}

.main-toggle-btn.playing {
    background: #e74c3c;
    color: #ffffff;
}

.main-toggle-btn.playing:hover {
    background: #ff5e4d;
    box-shadow: 0 6px 15px rgba(231, 76, 60, 0.5);
}

.volume-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px var(--accent-glow);
}

/* Loader */
/* Footer replaced by unified-footer.css */

/* Active Playing State */
.radio-card.active-playing {
    border-color: var(--accent);
    background: rgba(197, 160, 89, 0.08);
    box-shadow: 0 0 20px rgba(197, 160, 89, 0.1);
}

/* Visitor Counter Section */
.stats-section {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    padding: 15px;
    width: 100%;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 800px;
}

.visitor-card {
    padding: 25px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--accent);
    box-shadow: 0 0 15px rgba(197, 160, 89, 0.1);
    border-radius: 15px;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}

.visitor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(197, 160, 89, 0.2);
    border-color: var(--accent);
}

.visitor-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.visitor-icon {
    font-size: 1.4rem;
}

.visitor-label {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.visitor-count {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--accent);
    font-family: 'Courier New', Courier, monospace;
    letter-spacing: 4px;
    text-shadow: 0 0 10px rgba(197, 160, 89, 0.3);
    background: rgba(0, 0, 0, 0.2);
    padding: 5px 20px;
    border-radius: 8px;
    border: 1px solid rgba(197, 160, 89, 0.2);
}

/* Loader */
#loader {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    background: rgba(6, 11, 8, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.spinner {
    border: 3px solid rgba(197, 160, 89, 0.1);
    border-top: 3px solid var(--accent);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 15px var(--accent-glow);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--accent);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(197, 160, 89, 0.6);
}

.scroll-to-top.lifted {
    bottom: 100px;
}

@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    .scroll-to-top.lifted {
        bottom: 110px;
    }
}

/* Selection */
::selection {
    background: var(--accent);
    color: var(--bg-main);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    body {
        padding-bottom: 0;
    }


    .header-image {
        max-height: 180px;
        border-radius: 12px;
    }

    .categories-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .radio-list {
        grid-template-columns: 1fr;
        padding: 10px 12px 15px;
    }

    .radio-card {
        padding: 12px;
    }

    .radio-image {
        width: 50px;
        height: 50px;
        margin-left: 10px;
    }

    .radio-title {
        font-size: 0.9rem;
    }

    .now-playing-bar {
        padding: 10px 16px;
        background: rgba(6, 11, 8, 0.9);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        border-top: 1px solid rgba(197, 160, 89, 0.15);
    }

    .now-playing-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        padding: 2px 0;
    }

    .player-info {
        justify-content: flex-start;
        flex: 1;
        text-align: right;
        gap: 10px;
    }

    .player-metadata {
        align-items: flex-start;
    }

    .player-title {
        font-size: 0.88rem;
        max-width: 140px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-weight: 700;
    }

    .player-subtitle {
        font-size: 0.72rem;
        font-weight: 600;
    }

    .player-controls {
        gap: 10px;
    }

    .active-listeners-bar {
        display: none; /* إخفاء المستمعين على الجوال لتوفير مساحة */
    }

    .volume-wrapper {
        display: none; /* إخفاء شريط الصوت على الجوال حيث يستخدم الزوار أزرار الهاتف */
    }

    .main-toggle-btn {
        width: 38px;
        height: 38px;
        border-radius: 50%;
        font-size: 0.95rem;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        min-width: auto;
    }

    .close-player-btn {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
        border-radius: 50%;
    }



    .category-header h3 {
        font-size: 1.05rem;
    }

    .visitor-counter {
        margin: 40px 15px;
        padding: 20px;
    }

    .visitor-card {
        padding: 20px 30px;
        min-width: auto;
        width: 100%;
    }

    .visitor-count {
        font-size: 2.5rem;
    }

    .visitor-label {
        font-size: 1rem;
    }

    .welcome-title {
        font-size: 1.3rem;
    }
    
    .welcome-text {
        font-size: 0.95rem;
    }
}

@media (max-width: 400px) {
    .play-button {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    input[type="range"] {
        width: 70px;
    }
}


/* --- Live Radio Search & Mute Styles --- */
.search-section {
    margin: 0 auto 30px;
    max-width: 600px;
    padding: 0 15px;
    animation: fadeIn 0.8s ease;
}

.search-container {
    display: flex;
    align-items: center;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-premium);
}

.search-container:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
    background: rgba(255, 255, 255, 0.04);
}

.search-icon {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-left: 12px;
    transition: color 0.3s ease;
}

.search-container:focus-within .search-icon {
    color: var(--accent);
}

#radioSearchInput {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 1.05rem;
    padding: 8px 0;
    font-family: inherit;
}

#radioSearchInput::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.clear-search-btn {
    background: none;
    border: none;
    outline: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 5px;
    transition: all 0.2s ease;
}

.clear-search-btn:hover {
    color: #f87171;
    transform: scale(1.1);
}

.search-no-results {
    margin-top: 15px;
    padding: 15px 25px;
    border-radius: 12px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    background: rgba(239, 68, 68, 0.02);
    display: flex;
    align-items: center;
    gap: 12px;
    color: #f87171;
    font-size: 0.95rem;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.mute-toggle-btn {
    background: none;
    border: none;
    outline: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 1.15rem;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.mute-toggle-btn:hover {
    transform: scale(1.15);
}

.close-player-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.close-player-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #ef4444;
    transform: scale(1.05);
}

/* stats responsive fix */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Toast Notification Styling */
.toast {
    position: fixed;
    bottom: 120px; /* التموضع فوق شريط التشغيل الثابت */
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(6, 11, 8, 0.95);
    color: #fff;
    padding: 12px 25px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--accent);
    z-index: 10000;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    font-size: 0.95rem;
    font-weight: 600;
    direction: rtl;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    pointer-events: none;
    white-space: nowrap;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* Filter Tabs Container & Button Styling */
.filter-tabs-section {
    width: 100%;
    margin-bottom: 25px;
    padding: 0 10px;
    animation: fadeIn 0.8s ease;
}

.filter-tabs-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 8px 5px;
    scrollbar-width: none; /* Hide standard scrollbar in Firefox */
    -ms-overflow-style: none; /* Hide IE scrollbar */
    justify-content: flex-start;
}

.filter-tabs-container::-webkit-scrollbar {
    display: none; /* Hide Chrome scrollbar */
}

.filter-tab {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: 30px;
    color: var(--text-secondary);
    padding: 8px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.filter-tab:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.05);
}

.filter-tab.active {
    background: var(--accent);
    color: var(--bg-main);
    border-color: var(--accent);
    box-shadow: 0 4px 15px var(--accent-glow);
}

/* Player Bar Pulsing Image */
.player-radio-image {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--accent);
    box-shadow: 0 0 10px rgba(197, 160, 89, 0.2);
    transition: all 0.3s ease;
    margin-left: 15px; /* RTL Margin left is correct */
}

.player-radio-image.pulsing {
    animation: pulse-glow 2s infinite ease-in-out;
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(197, 160, 89, 0.6);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 15px 4px rgba(197, 160, 89, 0.3);
        transform: scale(1.05);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(197, 160, 89, 0.6);
        transform: scale(1);
    }
}

/* Audio Wave Equalizer */
.player-equalizer {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 18px;
    width: 25px;
    margin-right: 15px;
}

.player-equalizer .bar {
    width: 3px;
    height: 2px;
    background-color: var(--accent);
    border-radius: 3px;
    transition: height 0.25s ease;
}

.player-equalizer.playing .bar {
    animation: eq-bounce 1s infinite alternate ease-in-out;
}

.player-equalizer.playing .bar:nth-child(1) { animation-delay: 0.1s; animation-duration: 0.8s; }
.player-equalizer.playing .bar:nth-child(2) { animation-delay: 0.3s; animation-duration: 1.1s; }
.player-equalizer.playing .bar:nth-child(3) { animation-delay: 0.0s; animation-duration: 0.9s; }
.player-equalizer.playing .bar:nth-child(4) { animation-delay: 0.2s; animation-duration: 1.0s; }

@keyframes eq-bounce {
    0% { height: 2px; }
    100% { height: 16px; }
}

/* Responsive fixes for new elements */
@media (max-width: 768px) {
    .filter-tabs-container {
        justify-content: flex-start;
        padding-bottom: 5px;
    }
    .player-equalizer {
        display: none; /* Hide equalizer on mobile to save space */
    }
    .player-radio-image {
        width: 40px;
        height: 40px;
        margin-left: 10px;
    }
}

@media (max-width: 480px) {
    .filter-tab {
        padding: 6px 14px;
        font-size: 0.85rem;
    }
}

/* تخطيط العرض الكامل عند اختيار فئة معينة (Single Category Full Width) */
.categories-grid.single-category-view {
    grid-template-columns: 1fr; /* جعل الفئة المختارة تأخذ كامل العرض المتاح */
}

.categories-grid.single-category-view .category {
    grid-column: span 2;
}

@media (min-width: 1025px) {
    .categories-grid.single-category-view .radio-list {
        grid-template-columns: repeat(4, 1fr); /* 4 إذاعات في كل سطر على الشاشات الكبيرة */
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .categories-grid.single-category-view .radio-list {
        grid-template-columns: repeat(3, 1fr); /* 3 إذاعات في كل سطر على التابلت */
    }
}

@media (max-width: 768px) {
    .categories-grid.single-category-view .radio-list {
        grid-template-columns: 1fr; /* عمود واحد على الجوال */
    }
}

/* --- زر تصغير المشغل والفقاعة العائمة المصغرة --- */
.minimize-player-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.minimize-player-btn:hover {
    background: rgba(197, 160, 89, 0.1);
    border-color: var(--accent);
    color: var(--accent);
    transform: scale(1.05);
}

.floating-player-bubble {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: var(--bg-glass);
    border: 2px solid var(--accent);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 999;
    padding: 0;
    overflow: hidden;
}

.floating-player-bubble.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.floating-player-bubble img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    transition: transform 0.3s ease;
}

/* الدوران والنبض المذهل */
.floating-player-bubble.playing {
    animation: bubble-pulse 2s infinite ease-in-out;
}

.floating-player-bubble.playing img {
    animation: bubble-rotate 12s infinite linear;
}

.floating-player-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(197, 160, 89, 0.7);
    border-color: #ffd700;
}

.floating-player-bubble:hover img {
    filter: brightness(0.7);
}

/* مؤشر تفاعلي صغير داخل الفقاعة عند الـ Hover */
.bubble-play-indicator {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50%;
}

.floating-player-bubble:hover .bubble-play-indicator {
    opacity: 1;
}

@keyframes bubble-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes bubble-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(197, 160, 89, 0.6);
        border-color: var(--accent);
    }
    50% {
        box-shadow: 0 0 20px 6px rgba(197, 160, 89, 0.4);
        border-color: #ffd700;
    }
    100% {
        box-shadow: 0 0 0 0 rgba(197, 160, 89, 0.6);
        border-color: var(--accent);
    }
}

/* التجاوب للهواتف */
@media (max-width: 768px) {
    .minimize-player-btn {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }
    
    .floating-player-bubble {
        bottom: 20px;
        left: 20px;
        width: 48px;
        height: 48px;
    }
    
    .bubble-play-indicator {
        font-size: 0.85rem;
    }
}

/* تحسين المظهر ومنع تمدد الأزرار أو اقتصاصها للشاشات الصغيرة أقل من 400 بكسل */
@media (max-width: 400px) {
    .now-playing-bar {
        padding: 8px 10px;
    }

    .now-playing-content {
        gap: 8px;
    }

    .player-info {
        gap: 6px;
    }

    .player-radio-image {
        width: 32px;
        height: 32px;
        margin-left: 6px;
    }

    .player-title {
        font-size: 0.8rem;
        max-width: 90px;
    }

    .player-subtitle {
        font-size: 0.68rem;
    }

    .player-controls {
        gap: 6px;
    }

    /* منع تمدد زر التشغيل/الإيقاف المؤقت وضمان دائريته */
    .main-toggle-btn {
        width: 34px;
        height: 34px;
        min-width: auto;
        padding: 0;
        font-size: 0.85rem;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
    }

    /* الحفاظ على أبعاد زر الإغلاق */
    .close-player-btn {
        width: 30px;
        height: 30px;
        font-size: 0.75rem;
    }

    /* الحفاظ على أبعاد زر التصغير ومنع اقتصاصه */
    .minimize-player-btn {
        width: 30px;
        height: 30px;
        font-size: 0.75rem;
    }
}