/* XL Radio Fixed Player Styles */

/* === Font Awesome İkon Desteği === */
.fas, .fa, .far, .fab {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 5 Free", "FontAwesome", sans-serif !important;
    font-weight: 900 !important;
    font-style: normal !important;
    display: inline-block;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.far {
    font-weight: 400 !important;
}

.fab {
    font-weight: 400 !important;
    font-family: "Font Awesome 6 Brands", "Font Awesome 5 Brands", sans-serif !important;
}

/* Font Awesome içerik desteği */
.fa-play:before { content: "\f04b"; }
.fa-pause:before { content: "\f04c"; }
.fa-music:before { content: "\f001"; }
.fa-volume-up:before { content: "\f028"; }
.fa-volume-mute:before { content: "\f6a9"; }
.fa-chevron-left:before { content: "\f053"; }
.fa-chevron-right:before { content: "\f054"; }
.fa-heart:before { content: "\f004"; }
.fa-share:before { content: "\f064"; }

/* === Mobil Cihaz Optimizasyonu === */
@media screen and (max-width: 768px) {
    /* Mobilde banner'ı tamamen gizle */
    .right-section {
        display: none !important;
    }
    
    /* Mobilde player boyutunu optimize et */
    .xl-radio-fixed-player {
        min-height: 100px;
    }
    
    .player-content {
        height: 80px;
        padding: 0 0 0 20px;
        margin: 0 15px;
    }
    
    /* Mobilde album art boyutunu küçült */
    .album-art {
        width: 60px;
        height: 60px;
        cursor: pointer;
    }
    
    /* Mobilde hover image'ı resmin tam üstünde 8px padding ile göster */
    .hover-image {
        display: block !important;
        position: absolute !important;
        bottom: calc(100% + 8px) !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 200px !important;
        height: 200px !important;
        background: #fff !important;
        border-radius: 12px !important;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
        overflow: hidden !important;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease !important;
        z-index: 1000 !important;
        pointer-events: none;
    }
    
    /* Mobilde hover image içindeki resmi optimize et */
    .hover-image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        display: block !important;
    }
    
    /* Mobilde hover image'ı JavaScript ile kontrol edilecek */
    .album-art-container:hover .hover-image {
        /* JavaScript ile kontrol ediliyor */
    }
    
    /* Mobilde hover image için ok işareti - aşağıya doğru */
    .hover-image::after {
        content: '' !important;
        position: absolute !important;
        bottom: 100% !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 0 !important;
        height: 0 !important;
        border-left: 10px solid transparent !important;
        border-right: 10px solid transparent !important;
        border-bottom: 10px solid #fff !important;
    }
    
    /* Mobilde stream widget'ı gizle */
    .stream-widget {
        display: none !important;
    }
    
    /* Mobilde volume slider'ı gizle ama butonu göster */
    .volume-controls .volume-slider {
        display: none !important;
    }
    
    .volume-controls .volume-btn {
        display: flex !important;
    }
    
    /* Mobilde önceki/sonraki butonları gizle */
    .prev-btn, .next-btn {
        display: none !important;
    }
    
    /* Mobilde controls gap'i azalt */
    .controls {
        gap: 15px;
    }
    
    /* Mobilde song-info'yu optimize et */
    .song-info {
        font-size: clamp(6px, 2.5vw, 16px) !important;
        max-width: 250px;
        white-space: normal;
        overflow: hidden;
        word-wrap: break-word;
        line-height: 1.2;
        max-height: 2.4em;
    }
}

/* === Album Art Popup === */
.album-art-popup {
    animation: fadeIn 0.3s ease;
}

.album-art-popup img {
    animation: scaleIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { transform: scale(0.8); }
    to { transform: scale(1); }
}

/* === Mobil Yatay Mod Optimizasyonu === */
@media screen and (max-height: 500px) and (orientation: landscape) {
    /* Mobil yatay modda volume butonunu optimize et */
    .volume-controls .volume-btn {
        width: 40px !important;
        height: 40px !important;
        font-size: 16px !important;
    }
    
    /* Mobil yatay modda volume buton ikonunu büyüt */
    .volume-controls .volume-btn i {
        font-size: 18px !important;
    }
    /* Mobil yatay modda sağ taraftaki banner'ı gizle */
    .right-section {
        display: none !important;
    }
    
    /* Mobil yatay modda player yüksekliğini azalt */
    .xl-radio-fixed-player {
        min-height: 80px;
    }
    
    .player-content {
        height: 70px;
        padding: 0 0 0 20px;
        margin: 0 15px;
    }
    
    /* Mobil yatay modda left-section'ı optimize et */
    .left-section {
        flex: 1;
        min-width: 0;
        padding-right: 10px;
    }
    
    /* Mobil yatay modda album art boyutunu küçült */
    .album-art {
        width: 50px;
        height: 50px;
        flex-shrink: 0;
        cursor: pointer;
    }
    
    /* Mobil yatay modda hover image'ı resmin tam üstünde 15px padding ile göster */
    .hover-image {
        display: block !important;
        width: 150px !important;
        height: 150px !important;
        bottom: calc(100% + 15px) !important;
    }
    
    /* Mobil yatay modda stream widget'ı gizle */
    .stream-widget {
        display: none !important;
    }
    
    /* Mobil yatay modda volume slider'ı gizle ama butonu göster */
    .volume-controls .volume-slider {
        display: none !important;
    }
    
    .volume-controls .volume-btn {
        display: flex !important;
    }
    
    /* Mobil yatay modda önceki/sonraki butonları gizle */
    .prev-btn, .next-btn {
        display: none !important;
    }
    
    /* Mobil yatay modda controls gap'i azalt */
    .controls {
        gap: 10px;
        flex-shrink: 0;
    }
    
    /* Mobil yatay modda song-info'yu optimize et */
    .song-info {
        font-size: clamp(4px, 2vw, 14px) !important;
        max-width: none;
        width: 100%;
        white-space: normal;
        overflow: hidden;
        word-wrap: break-word;
        line-height: 1.2;
        max-height: 2.4em;
        flex: 1;
        min-width: 0;
    }
}

/* Ek mobil yatay mod optimizasyonları */
@media screen and (max-height: 600px) and (orientation: landscape) {
    /* Daha geniş yatay modda da banner'ı gizle */
    .right-section {
        display: none !important;
    }
    
    /* Player boyutunu optimize et */
    .xl-radio-fixed-player {
        min-height: 90px;
    }
    
    .player-content {
        height: 80px;
    }
}

/* Çok küçük ekranlar için ek optimizasyon */
@media screen and (max-height: 400px) and (orientation: landscape) {
    .xl-radio-fixed-player {
        min-height: 60px;
    }
    
    .player-content {
        height: 50px;
        padding: 0 0 0 15px;
        margin: 0 10px;
    }
    
    .album-art {
        width: 40px;
        height: 40px;
    }
    
    .controls {
        gap: 10px;
    }
    
    .control-btn {
        width: 35px;
        height: 35px;
    }
    
    /* Çok küçük ekranlarda önceki/sonraki butonları gizle */
    .prev-btn, .next-btn {
        display: none !important;
    }
    
    /* Çok küçük ekranlarda volume slider'ı gizle ama butonu göster */
    .volume-controls .volume-slider {
        display: none !important;
    }
    
    .volume-controls .volume-btn {
        display: flex !important;
        width: 35px !important;
        height: 35px !important;
        font-size: 14px !important;
    }
    
    /* Çok küçük ekranlarda volume buton ikonunu optimize et */
    .volume-controls .volume-btn i {
        font-size: 16px !important;
    }
    
    /* Çok küçük ekranlarda left-section'ı optimize et */
    .left-section {
        flex: 1;
        min-width: 0;
        padding-right: 5px;
    }
    
    /* Çok küçük ekranlarda song-info'yu optimize et */
    .song-info {
        font-size: clamp(3px, 1.5vw, 12px) !important;
        max-width: none;
        width: 100%;
        white-space: normal;
        overflow: hidden;
        word-wrap: break-word;
        line-height: 1.1;
        max-height: 2.2em;
        flex: 1;
        min-width: 0;
    }
    
    /* Çok küçük ekranlarda hover image'ı resmin tam üstünde 15px padding ile göster */
    .hover-image {
        width: 120px !important;
        height: 120px !important;
        bottom: calc(100% + 15px) !important;
    }
}

.xl-radio-fixed-player {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--accent-color) 100%);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
    min-height: 120px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Arka plan ses dalgası */
.background-audio-wave {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
    filter: blur(1px);
    pointer-events: none;
    width: 100%;
    height: 100%;
}

.background-audio-wave.visible {
    opacity: 0.9;
}

#backgroundAudioCanvas {
    width: 100%;
    height: 100%;
    display: block;
    background: linear-gradient(135deg, rgba(210, 105, 30, 0.9) 0%, rgba(139, 69, 19, 0.9) 50%, rgba(105, 105, 105, 0.9) 100%);
}

.player-content {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    height: 100px;
    z-index: 2;
    position: relative;
    padding: 0 0 0 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    margin: 0 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Sol taraf - Tüm içerik */
.left-section {
    display: flex;
    align-items: center;
    gap: 25px;
    flex: 1;
    justify-content: flex-start;
    min-width: 0;
    padding-right: 30px;
}

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

.control-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: rgba(255,255,255,0.1);
    transform: scale(1.1);
}

/* Volume buton özel stili */
.volume-btn {
    background: rgba(255, 140, 0, 0.1) !important;
    border: 1px solid rgba(255, 140, 0, 0.3) !important;
    color: var(--text-color) !important;
    font-size: 1.2rem !important;
    cursor: pointer !important;
    padding: 8px !important;
    border-radius: 50% !important;
    transition: all 0.3s ease !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
}

/* Volume buton Font Awesome ikonu */
.volume-btn i {
    font-size: 16px !important;
    color: var(--text-color) !important;
    display: block !important;
}

.volume-btn:hover {
    background: rgba(255, 140, 0, 0.2) !important;
    border-color: rgba(255, 140, 0, 0.5) !important;
    transform: scale(1.05) !important;
}

.volume-btn i {
    font-size: 16px !important;
    color: var(--text-color) !important;
}

/* Muted durumu için özel stil */
.volume-btn.muted {
    background: rgba(255, 0, 0, 0.1) !important;
    border-color: rgba(255, 0, 0, 0.3) !important;
}

.volume-btn.muted:hover {
    background: rgba(255, 0, 0, 0.2) !important;
    border-color: rgba(255, 0, 0, 0.5) !important;
}

/* Muted durumunda Font Awesome ikonu */
.volume-btn.muted i {
    color: var(--text-color) !important;
}

.play-btn {
    width: 60px;
    height: 60px;
    background: rgba(255, 140, 0, 0.2);
    border: 2px solid rgba(255, 140, 0, 0.5);
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.3);
}

.play-btn:hover {
    background: rgba(255, 140, 0, 0.3);
    border-color: rgba(255, 140, 0, 0.7);
    box-shadow: 0 6px 20px rgba(255, 140, 0, 0.4);
}

/* Album art container */
.album-art-container {
    position: relative;
}

.album-art {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(255, 140, 0, 0.8), rgba(255, 165, 0, 0.6));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.3);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.album-art:hover {
    transform: scale(1.05);
}

.album-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 15px;
}

.album-art i {
    font-size: 28px;
    color: var(--text-color);
}

/* Hover image */
.hover-image {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 300px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    margin-bottom: 15px;
    pointer-events: none;
}

.hover-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.album-art-container:hover .hover-image {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-10px);
    pointer-events: auto;
}

/* Hover image için ok işareti */
.hover-image::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #fff;
}

.info-section {
    display: flex;
    align-items: center;
    gap: 30px;
    flex: 1;
    justify-content: flex-start;
    min-width: 0;
}

.now-playing {
    min-width: 0;
    flex: 1;
}

.song-info {
    font-size: clamp(8px, 3vw, 18px);
    font-weight: 600;
    line-height: 1.2;
    max-height: 2.4em;
    overflow: hidden;
    display: block;
    word-wrap: break-word;
    hyphens: auto;
    white-space: normal;
    color: var(--text-color);
    /* Yazı uzunluğuna göre otomatik boyutlandırma */
    transition: font-size 0.3s ease;
    /* Çok agresif font boyutlandırma */
    font-size: clamp(6px, 2.5vw, 18px) !important;
}

/* Stream Widget Stilleri */
.stream-widget {
    display: none !important;
}

.sc-status-widget {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.volume-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.volume-slider {
    width: 100px;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    transition: all 0.3s ease;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: rgba(255, 140, 0, 0.9);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(255, 140, 0, 0.4);
    transition: all 0.3s ease;
}

.volume-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: rgba(255, 140, 0, 0.9);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(255, 140, 0, 0.4);
    transition: all 0.3s ease;
}

/* Volume slider track stilini iyileştir */
.volume-slider::-webkit-slider-track {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    height: 5px;
}

.volume-slider::-moz-range-track {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    height: 5px;
    border: none;
}

/* Sağ taraf - Banner */
.right-section {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto;
    width: 900px;
    flex-shrink: 0;
    padding-left: 30px;
}

.banner {
    width: 900px;
    height: 100px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Responsive tasarım */
@media (max-width: 768px) {
    .xl-radio-fixed-player {
        min-height: 110px;
    }
    
    .player-content {
        padding: 0 20px 0 20px;
        margin: 0 10px;
        height: 90px;
    }
    
    .left-section {
        gap: 20px;
        padding-right: 0;
        width: 100%;
        justify-content: center;
    }
    
    .controls {
        gap: 8px;
    }
    
    .control-btn {
        padding: 8px;
        font-size: 1rem;
    }
    
    .play-btn {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    .album-art {
        width: 60px;
        height: 60px;
        border-radius: 12px;
    }
    
    .album-art i {
        font-size: 24px;
    }
    
    .info-section {
        gap: 20px;
        flex: 1;
        padding-left: 0;
        padding-right: 0;
    }
    
    .song-info {
        font-size: 16px;
        font-weight: 600;
        line-height: 1.2;
        max-height: 2.4em;
    }
    
    .now-playing {
        padding-left: 0;
        padding-right: 0;
    }
    
    .left-section {
        justify-content: flex-start !important;
    }
    
    .volume-controls {
        margin-left: auto !important;
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
    }
    
    .volume-controls {
        gap: 12px;
    }
    
    .volume-slider {
        width: 80px;
        height: 4px;
    }
    
    .volume-slider::-webkit-slider-thumb {
        width: 16px;
        height: 16px;
    }
    
    .volume-slider::-moz-range-thumb {
        width: 16px;
        height: 16px;
    }
    
    /* Mobilde banner'ı gizle */
    .right-section {
        display: none;
    }
    
    /* Hover image mobilde */
    .hover-image {
        display: block;
        opacity: 0;
        visibility: hidden;
    }
    
    .hover-image.mobile-active {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(-10px);
    }
}

@media (max-width: 480px) {
    .song-info {
        font-size: 15px;
        font-weight: 600;
        line-height: 1.2;
        max-height: 2.4em;
    }
    
    .info-section {
        padding-left: 0;
        padding-right: 0;
    }
    
    .now-playing {
        padding-left: 0;
        padding-right: 0;
    }
    
    .left-section {
        justify-content: flex-start !important;
    }
    
    .volume-controls {
        margin-left: auto !important;
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
    }
}

/* Animasyonlar */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.play-btn.playing {
    animation: pulse 2s infinite;
}

/* Hover efektleri */
.album-art img:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* Özel scroll bar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 140, 0, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 140, 0, 0.7);
}
