/* Müzik Senkronizasyon Sistemi CSS */

/* Player Status Indicator */
.player-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
}

.player-status.playing {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    animation: pulse 2s infinite;
}

.player-status.paused {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: white;
}

.player-status.stopped {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
}

.player-status.loading {
    background: linear-gradient(135deg, #6f42c1, #e83e8c);
    color: white;
    animation: loading 1.5s infinite;
}

/* Pulse animasyonu */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* Loading animasyonu */
@keyframes loading {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

/* Current Song Info */
.current-song-info {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 12px;
    margin: 8px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.current-song-info:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.current-song-info .song-title {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
    line-height: 1.3;
}

.current-song-info .song-duration {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

/* Admin Music Controls */
#admin-music-controls {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#admin-music-controls button {
    transition: all 0.2s ease;
    border: none !important;
    outline: none !important;
}

#admin-music-controls button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#admin-music-controls button:active {
    transform: translateY(0);
}

/* Sync Notification */
.sync-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #6f42c1, #e83e8c);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    z-index: 10000;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(111, 66, 193, 0.3);
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    #admin-music-controls {
        bottom: 5px;
        right: 5px;
        padding: 6px;
        gap: 6px;
    }
    
    #admin-music-controls button {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .current-song-info {
        padding: 10px;
        margin: 6px 0;
    }
    
    .current-song-info .song-title {
        font-size: 13px;
    }
    
    .current-song-info .song-duration {
        font-size: 11px;
    }
}

/* Connection Status Indicator */
.connection-status {
    position: fixed;
    bottom: 20px;
    left: 20px;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    z-index: 9999;
    transition: all 0.3s ease;
}

.connection-status.connected {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.connection-status.disconnected {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    animation: blink 1s infinite;
}

.connection-status.connecting {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: white;
    animation: pulse 1.5s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.5; }
}

/* Music Control Tooltips */
#admin-music-controls button::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    margin-bottom: 5px;
}

#admin-music-controls button:hover::after {
    opacity: 1;
}

/* Sync Progress Bar */
.sync-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #6f42c1, #e83e8c, #6f42c1);
    background-size: 200% 100%;
    animation: syncProgress 2s linear infinite;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sync-progress.active {
    opacity: 1;
}

@keyframes syncProgress {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
} 

/* Web Tüm Kontroller - Birleşik */
.web-all-controls {
    display: none; /* Mobilde gizli */
    justify-content: center;
    align-items: center;
    gap: 6px; /* %25 küçültüldü: 8px -> 6px */
    margin: 10px auto;
    max-width: 1000px;
    flex-wrap: nowrap; /* Tek sıra için */
    padding: 7.5px; /* %25 küçültüldü: 10px -> 7.5px */
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px; /* %25 küçültüldü: 8px -> 6px */
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

/* YouTube video kolonu için düzenleme */
.yt-video-col {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-width: 0;
    position: relative; /* Pozisyon ekle */
}

/* YouTube player slot için düzenleme */
#web-player-slot {
    width: 100%;
    flex-shrink: 0; /* Küçülmesini engelle */
    position: relative; /* Pozisyon ekle */
}

/* Web all controls için sabit pozisyon */
.yt-video-col .web-all-controls {
    position: sticky; /* Sticky pozisyon */
    top: 0; /* Üstten sabitle */
    background: rgba(255, 255, 255, 0.95); /* Arka plan ekle */
    -webkit-backdrop-filter: blur(10px); /* Safari için webkit prefix */
    backdrop-filter: blur(10px); /* Bulanıklık efekti */
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: 0; /* Margin'i sıfırla */
    border-radius: 0 0 8px 8px; /* Alt köşeleri yuvarla */
    z-index: 100; /* Yüksek z-index */
}

.web-all-controls button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0; /* Padding'i sıfırla */
    border-radius: 50%; /* Yuvarlak yap */
    cursor: pointer;
    font-size: 16px; /* Emoji boyutu */
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0; /* Gap'i sıfırla */
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    min-width: 40px; /* Sabit genişlik */
    height: 40px; /* Sabit yükseklik */
    width: 40px; /* Sabit genişlik */
}

.web-all-controls button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.web-all-controls button:active {
    transform: scale(0.95);
}

.web-all-controls button span:first-child {
    font-size: 16px; /* Emoji boyutu */
}

/* İkinci span'ı gizle (yazıları gizle) */
.web-all-controls button span:last-child {
    display: none !important;
}

/* Ses kontrol butonları için farklı renk */
.web-all-controls #webRequestSongBtn,
.web-all-controls #webSongHistoryBtn,
.web-all-controls #webAutoPlaylistBtn,
.web-all-controls #webBlacklistBtn,
.web-all-controls #webVolumeDownBtn,
.web-all-controls #webVolumeUpBtn {
    background: linear-gradient(135deg, #ececec 0%, #d4d4d4 100%);
    color: #222;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e0e0e0;
    width: 40px;
    height: 40px;
    min-width: 40px;
}

.web-all-controls #webRequestSongBtn:hover,
.web-all-controls #webSongHistoryBtn:hover,
.web-all-controls #webAutoPlaylistBtn:hover,
.web-all-controls #webBlacklistBtn:hover,
.web-all-controls #webVolumeDownBtn:hover,
.web-all-controls #webVolumeUpBtn:hover {
    background: linear-gradient(135deg, #f5f5f5 0%, #cccccc 100%);
    color: #111;
    border-color: #bdbdbd;
    transform: scale(1.1);
}

/* Şarkı geç butonu için yeşil renk */
.web-all-controls #webSkipSongBtn {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    min-width: 40px;
    height: 40px;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.web-all-controls #webSkipSongBtn:hover {
    background: linear-gradient(135deg, #a8e6cf 0%, #56ab2f 100%);
    transform: scale(1.1);
}

.web-all-controls #webSkipSongBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Başlangıçta muted olarak başlasın */
.web-all-controls #webMuteToggleBtn {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
}

.web-all-controls #webMuteToggleBtn:hover {
    background: linear-gradient(135deg, #ff4b2b 0%, #ff416c 100%);
    transform: scale(1.1);
}

/* Ses açık olduğunda mavi renk */
.web-all-controls #webMuteToggleBtn.unmuted {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.web-all-controls #webMuteToggleBtn.unmuted:hover {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    transform: scale(1.1);
}

/* Ses göstergesi */
.web-all-controls .volume-display {
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 9px; /* Boyut aynı kalıyor */
    border-radius: 4px; /* Boyut aynı kalıyor */
    color: #333;
    font-weight: bold;
    font-size: 12.5px; /* %25 büyütüldü (10px->12.5px) - sadece yazı */
    min-width: 38px; /* Boyut aynı kalıyor */
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1); /* Boyut aynı kalıyor */
}

/* Tablet ve masaüstünde göster */
@media (min-width: 768px) {
    .web-all-controls {
        display: flex;
    }
}

/* Daha küçük ekranlarda butonları daha da küçült */
@media (min-width: 768px) and (max-width: 1023px) {
    .web-all-controls {
        gap: 6px;
        padding: 8px;
    }
    
    .web-all-controls button {
        padding: 0;
        font-size: 16px;
        min-width: 40px;
        width: 40px;
        height: 40px;
        border-radius: 50%;
    }
    
    .web-all-controls #webVolumeDownBtn,
    .web-all-controls #webVolumeUpBtn,
    .web-all-controls #webMuteToggleBtn {
        min-width: 40px;
        width: 40px;
        height: 40px;
    }
    
    .web-all-controls .volume-display {
        padding: 5px 7px;
        font-size: 11.25px;
        min-width: 32px;
    }
    
    .web-all-controls button span:first-child {
        font-size: 16px;
    }
    
    .web-all-controls button span:last-child {
        display: none !important;
    }
} 

/* MOBİL KONTROLLER CSS */
@media (max-width: 767px) and (hover: none) and (pointer: coarse) {
    .web-view {
        display: none;
    }
    
    .mobile-view {
        display: flex;
        flex-direction: column;
        height: calc(var(--vh, 1vh) * 100 - 60px); /* Header height'ı çıkar */
        max-height: calc(var(--vh, 1vh) * 100 - 60px);
        overflow: hidden;
        padding-bottom: 0; /* SIFIR padding - input fixed olduğu için */
    }
    
    #mobile-player-slot {
        width: 100%;
        background: #000;
        aspect-ratio: 16/9;
        max-height: 40vh;
        position: relative;
        flex-shrink: 0;
    }
    
    .mobile-controls {
        flex-shrink: 0;
        background: #f8f9fa;
        border-bottom: 1px solid #ddd;
        max-height: 30vh;
        overflow-y: auto;
    }
    
    .current-song-mobile {
        padding: 10px 15px;
        background: #fff;
        border-bottom: 1px solid #eee;
    }
    
    .song-info {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .song-title {
        font-weight: bold;
        color: #333;
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .song-duration {
        color: #666;
        font-size: 0.9em;
        margin-left: 10px;
    }
    
    .mobile-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 15px;
        background: #fff;
        border-bottom: 1px solid #eee;
    }
    
    .mobile-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        padding: 8px 12px;
        border: 1px solid #ddd;
        border-radius: 8px;
        background: #fff;
        color: #333;
        font-size: 0.8em;
        cursor: pointer;
        transition: all 0.2s ease;
        flex: 1;
        min-width: 70px;
    }
    
    .mobile-btn:hover {
        background: #f8f9fa;
        border-color: #007bff;
    }
    
    .mobile-btn:active {
        background: #e9ecef;
    }
    
    .mobile-btn span:first-child {
        font-size: 1.2em;
    }
    
    .mobile-btn span:last-child {
        font-size: 0.75em;
        line-height: 1;
    }
    
    .toggle-btn {
        background: #ffc107;
        color: #212529;
        border-color: #ffc107;
    }
    
    .toggle-btn:hover {
        background: #e0a800;
        border-color: #d39e00;
    }
    
    .mobile-request-queue {
        max-height: 150px;
        overflow-y: auto;
        background: #fff;
    }
    
    #mobile-chat-container {
        flex: 1;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        min-height: 0; /* Flexbox tarafından sıkıştırılabilir */
    }
}

/* Completion Info Styles */
.completion-info {
    margin-top: 8px;
    padding: 8px;
    background: rgba(0, 123, 255, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(0, 123, 255, 0.1);
}

.completion-text {
    font-size: 12px;
    color: #007bff;
    font-weight: 500;
    margin-bottom: 4px;
    text-align: center;
}

.completion-bar {
    width: 100%;
    height: 6px;
    background: rgba(0, 123, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.completion-fill {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #0056b3);
    border-radius: 3px;
    transition: width 0.3s ease;
    position: relative;
}

.completion-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Tamamlanma yüzdesine göre renk değişimi */
.completion-info.completed .completion-fill {
    background: linear-gradient(90deg, #28a745, #20c997);
}

.completion-info.partial .completion-fill {
    background: linear-gradient(90deg, #ffc107, #fd7e14);
}

.completion-info.low .completion-fill {
    background: linear-gradient(90deg, #dc3545, #c82333);
}

/* Otomatik geçişleri gizle */
.status-auto {
    opacity: 0.5;
    color: #999 !important;
}

.status-auto .history-status {
    font-style: italic;
}

/* Sistem tarafından geçilen şarkılar */
.status-system {
    color: #ff6b35;
    font-weight: 500;
}

.status-system .history-status {
    font-style: italic;
}

/* Manuel skip'leri vurgula */
.status-skipped {
    color: #dc3545;
    font-weight: 500;
}

.status-played {
    color: #28a745;
    font-weight: 500;
}

.status-removed {
    color: #6c757d;
    font-weight: 500;
}

/* Cleanup Info Styles */
.cleanup-info {
    margin-bottom: 15px;
    padding: 10px 15px;
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border: 1px solid #ffc107;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.1);
}

.cleanup-message {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #856404;
}

.cleanup-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.cleanup-text {
    line-height: 1.4;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .cleanup-message {
        font-size: 12px;
        gap: 8px;
    }
    
    .cleanup-icon {
        font-size: 14px;
    }
}

/* Yetki Yok Mesajı */
.no-permission-message {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 1px solid #dee2e6;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.permission-alert {
    display: flex;
    align-items: center;
    gap: 15px;
    text-align: left;
}

.alert-icon {
    font-size: 24px;
    color: #6c757d;
    flex-shrink: 0;
}

.alert-content h4 {
    margin: 0 0 8px 0;
    color: #495057;
    font-size: 16px;
    font-weight: 600;
}

.alert-content p {
    margin: 0;
    color: #6c757d;
    font-size: 14px;
    line-height: 1.4;
}

/* Responsive */
@media (max-width: 768px) {
    .permission-alert {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .alert-icon {
        font-size: 20px;
    }
    
    .alert-content h4 {
        font-size: 15px;
    }
    
    .alert-content p {
        font-size: 13px;
    }
}