/* Genel stil ayarları */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #e6e6e6;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Başlık kapsayıcıları */
.header-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    padding: 0.3rem 1rem; /* Reduced padding from 0.6rem to 0.3rem to make it shorter */
    border-radius: 12px;
    margin-bottom: 1rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.header-container h2 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Header bölümü */

/* Ana içerik */
main {
    flex: 1;
    padding: 1rem;
}

.container {
    display: flex;
    gap: 1.2rem;
    max-width: 1600px;
    margin: 0 auto;
    height: calc(100vh - 80px); /* Adjusted from 120px to 80px to account for removed header */
    width: 100%;
}

/* Sol Sütun: Radyo Kartları ve Dosya Yükleme */
.radio-column {
    flex: 1;
    background: rgba(30, 30, 46, 0.7);
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    height: 100%;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 0;
}

.radio-stations-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stations-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    flex: 1;
    overflow-y: auto;
    justify-items: center;
    align-content: start;
}

.station-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    width: 100%;
    height: 50px;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e6e6e6;
    font-size: 0.8rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 0.3rem;
    position: relative;
    overflow: hidden;
}

.station-card.active {
    background: linear-gradient(135deg, #ff8c00, #ffa500);
    border-color: #ff8c00;
    color: white;
    box-shadow: 0 0 15px rgba(255, 140, 0, 0.5);
}

.station-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.station-card:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.station-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

/* Orta Sütun: Müzik Çalar Alanı */
.player-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 100%;
    background: rgba(30, 30, 46, 0.7);
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    min-height: 0;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 0;
}

/* Sağ Sütun: Sadece MP3 Dosyaları Listesi (Başlık olmadan) */
.music-column {
    flex: 1;
    background: rgba(30, 30, 46, 0.7);
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 0;
    height: 100%;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 0;
}

.music-column .music-list {
    flex: 1;
    margin: 0;
    padding: 1rem;
}

/* Dosya Yükleme Alanı */
.file-upload-section {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    padding: 1rem; /* Add padding to match the music list */
}

.file-upload-area {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 0.6rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 0 0 auto;
    min-height: 60px;
    height: auto;
}

.file-upload-area:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.file-upload-area p {
    color: #e6e6e6;
    font-weight: 500;
    font-size: 0.9rem;
    margin: 0.2rem 0;
    text-align: center;
    line-height: 1.2;
}

.upload-instruction {
    font-weight: 600;
    color: #4ecdc4;
}

.upload-hint {
    font-size: 0.75rem;
    font-weight: 400;
    color: #a0a0a0;
}

#file-input {
    display: none;
}

.uploaded-files-info {
    flex-shrink: 0;
    margin-top: 0.3rem;
}

.uploaded-files-info h4 {
    display: block;
    margin-bottom: 0.4rem;
    color: #e6e6e6;
    font-size: 1.1rem;
    text-align: center;
    font-weight: 600;
}

.uploaded-files {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 0.4rem;
    max-height: 100px;
    overflow-y: auto;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0.6rem;
    scrollbar-width: auto; /* Enable scrollbar for Firefox */
}

/* Custom scrollbar styling for uploaded files */
.uploaded-files::-webkit-scrollbar {
    width: 8px;
}

.uploaded-files::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.uploaded-files::-webkit-scrollbar-thumb {
    background: rgba(78, 205, 196, 0.5);
    border-radius: 4px;
}

.uploaded-files::-webkit-scrollbar-thumb:hover {
    background: rgba(78, 205, 196, 0.8);
}

.uploaded-file-item {
    padding: 0.3rem 0.6rem;
    margin-bottom: 0.2rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.uploaded-file-item:last-child {
    margin-bottom: 0;
}

.uploaded-file-item .remove-upload-btn {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
    border: none;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(255, 107, 107, 0.3);
}

.uploaded-file-item .remove-upload-btn:hover {
    background: linear-gradient(135deg, #ff5252, #ff6b6b);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.4);
}

/* Müzik Listesi */
.music-list {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
    max-height: none;
    overflow-y: auto;
    scrollbar-width: auto; /* Enable scrollbar for Firefox */
    margin-top: 0.4rem;
}

.music-list::-webkit-scrollbar {
    width: 8px; /* Added to show scrollbar */
}

/* Custom scrollbar styling for music list */
.music-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.music-list::-webkit-scrollbar-thumb {
    background: rgba(78, 205, 196, 0.5);
    border-radius: 4px;
}

.music-list::-webkit-scrollbar-thumb:hover {
    background: rgba(78, 205, 196, 0.8);
}

.music-item {
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 0.2rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
}

.music-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.music-item.active {
    background: linear-gradient(90deg, rgba(78, 205, 196, 0.3), rgba(78, 205, 196, 0.1));
    color: #4ecdc4;
    border-color: rgba(78, 205, 196, 0.3);
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.2);
}

.music-item:last-child {
    margin-bottom: 0;
}

.music-item::before {
    content: "♪";
    margin-right: 0.6rem;
    color: #4ecdc4;
    font-size: 1rem;
}

.music-item.active::before {
    color: #4ecdc4;
    animation: pulse 1.5s infinite;
}

/* Kategori başlıkları */
.category-header {
    margin: 1rem 0 0.5rem 0;
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.category-header h3 {
    color: #4ecdc4;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    padding: 0;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Dijital Ekran */
.digital-display {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 12px;
    padding: 0.8rem;
    margin-bottom: 0.8rem;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8), 0 0 20px rgba(30, 30, 46, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex: 1;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    position: relative;
    color: #e6e6e6;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.display-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    position: relative;
}

.song-title {
    color: #e6e6e6;
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 0.4rem;
    text-shadow: 0 0 10px rgba(230, 230, 230, 0.7);
    white-space: nowrap;
    overflow: hidden;
    position: relative;
    flex: 0 0 auto;
    min-height: 30px;
    width: 100%;
    box-sizing: border-box;
    text-overflow: ellipsis;
}

/* Kayan metin animasyonu - sürekli döngü ve sabit genişlik */
.song-title.marquee {
    overflow: hidden;
    text-overflow: clip;
    white-space: nowrap;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.song-title.marquee span {
    display: inline-block;
    animation: marquee-loop 15s linear infinite;
    position: relative;
    white-space: nowrap;
    padding-left: 100%;
}

@keyframes marquee-loop {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

.time-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.4rem;
    flex: 0 0 auto;
}

.time-display {
    color: #e6e6e6;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    text-align: center;
    text-shadow: 0 0 10px rgba(230, 230, 230, 0.7);
    margin-right: 10px;
}

.mini-visualizer {
    display: inline-flex;
    justify-content: center;
    align-items: flex-end;
    height: 12px;
    gap: 1px;
    vertical-align: middle;
}

.mini-bar {
    width: 2px;
    background: rgba(78, 205, 196, 0.5);
    height: 2px;
    border-radius: 1px;
    animation: mini-visualizer 0.8s infinite ease-in-out;
    animation-play-state: paused;
}

.mini-bar:nth-child(1) { animation-delay: 0s; background: #4ecdc4; }
.mini-bar:nth-child(2) { animation-delay: 0.1s; height: 5px; background: #4ecdc4; }
.mini-bar:nth-child(3) { animation-delay: 0.2s; height: 8px; background: #4ecdc4; }
.mini-bar:nth-child(4) { animation-delay: 0.3s; height: 5px; background: #4ecdc4; }
.mini-bar:nth-child(5) { animation-delay: 0.4s; height: 2px; background: #4ecdc4; }

.music-player .mini-visualizer.active .mini-bar {
    animation-play-state: running;
}

@keyframes mini-visualizer {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(2.5); }
}

.visualizer {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    height: 20px;
    gap: 2px;
    margin-top: auto;
    margin-bottom: 0.6rem;
}

.bar {
    width: 3px;
    background: rgba(78, 205, 196, 0.5);
    height: 3px;
    border-radius: 1px;
    animation: visualizer 0.8s infinite ease-in-out;
    animation-play-state: paused;
}

.bar:nth-child(1) { animation-delay: 0s; background: #4ecdc4; }
.bar:nth-child(2) { animation-delay: 0.1s; height: 7px; background: #4ecdc4; }
.bar:nth-child(3) { animation-delay: 0.2s; height: 10px; background: #4ecdc4; }
.bar:nth-child(4) { animation-delay: 0.3s; height: 7px; background: #4ecdc4; }
.bar:nth-child(5) { animation-delay: 0.4s; height: 3px; background: #4ecdc4; }

.radio-visualizer.active .bar,
.music-visualizer.active .bar {
    animation-play-state: running;
}

@keyframes visualizer {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(3); }
}

/* İlerleme Çubuğu - Dijital Ekranda */
.progress-container {
    width: 100%;
    height: 8px; /* Increased from 4px to 8px to make it thicker */
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px; /* Increased from 2px to 4px to match the thicker bar */
    margin: 0.6rem 0;
    cursor: pointer;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}

.progress-bar {
    width: 100%;
    height: 100%;
    border-radius: 4px; /* Increased from 2px to 4px to match the thicker bar */
    position: relative;
}

.progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #4ecdc4, #ffa500, #ff6b6b);
    border-radius: 4px; /* Increased from 2px to 4px to match the thicker bar */
    transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(78, 205, 196, 0.5);
}

/* Müzik Kontrolleri - Dijital Ekranda */
.music-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    margin: 0.6rem 0 0.3rem 0;
    padding-top: 0.3rem;
    border-top: none; /* Yeşil çizgi kaldırıldı */
}

.icon-button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(78, 205, 196, 0.3);
    width: 36px; /* Butonlar biraz küçültüldü */
    height: 36px; /* Butonlar biraz küçültüldü */
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem; /* Font biraz küçültüldü */
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4ecdc4;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

.icon-button:hover {
    background: rgba(78, 205, 196, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 5px 12px rgba(0,0,0,0.3);
    border-color: rgba(78, 205, 196, 0.5);
}

.icon-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

/* Ses Kontrolü */
.volume-control {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-left: 0.5rem;
}

.volume-slider {
    width: 0;
    height: 20px;
    opacity: 0;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    outline: none;
    cursor: pointer;
}

.volume-control:hover .volume-slider {
    width: 60px;
    opacity: 1;
    margin-left: 0.3rem;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #4ecdc4;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(78, 205, 196, 0.8);
}

.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #4ecdc4;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 5px rgba(78, 205, 196, 0.8);
}

/* Playlist Alanı */
.playlist-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 0.8rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.playlist {
    flex: 1;
    overflow-y: auto;
    max-height: 400px; /* Increased from 350px to make it slightly taller */
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.1rem; /* Reduced gap for denser layout */
}

/* Custom scrollbar styling for better appearance */
.playlist::-webkit-scrollbar {
    width: 8px;
}

.playlist::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.playlist::-webkit-scrollbar-thumb {
    background: rgba(78, 205, 196, 0.5);
    border-radius: 4px;
}

.playlist::-webkit-scrollbar-thumb:hover {
    background: rgba(78, 205, 196, 0.8);
}

.playlist-item {
    padding: 0.3rem; /* Reduced from 0.5rem */
    margin-bottom: 0.2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem; /* Reduced from 0.85rem to match density requirements */
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.playlist-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(3px);
}

.playlist-item.playing {
    background: linear-gradient(90deg, rgba(78, 205, 196, 0.3), rgba(78, 205, 196, 0.1));
    border-color: rgba(78, 205, 196, 0.3);
}

.song-info {
    display: flex;
    align-items: center;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.playing-icon {
    margin-right: 0.5rem;
    display: flex;
    align-items: center;
}

.mini-visualizer.playlist-visualizer {
    height: 12px;
}

.mini-visualizer.playlist-visualizer .mini-bar {
    width: 2px;
    height: 2px;
}

.mini-visualizer.playlist-visualizer .mini-bar:nth-child(2) { height: 4px; }
.mini-visualizer.playlist-visualizer .mini-bar:nth-child(3) { height: 6px; }
.mini-visualizer.playlist-visualizer .mini-bar:nth-child(4) { height: 4px; }
.mini-visualizer.playlist-visualizer .mini-bar:nth-child(5) { height: 2px; }

.remove-btn {
    background: transparent;
    color: rgba(255, 255, 255, 0.3);
    border: none;
    width: 20px; /* Reduced from 24px */
    height: 20px; /* Reduced from 24px */
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem; /* Reduced from 1rem */
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
}

.playlist-item:hover .remove-btn {
    opacity: 1;
    transform: scale(1);
}

.remove-btn:hover {
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
    transform: scale(1.1) !important;
}

.remove-btn:active {
    transform: scale(0.9) !important;
}

/* Footer bölümü */
footer {
    background: rgba(0, 0, 0, 0.8);
    color: #a0a0a0;
    text-align: center;
    padding: 1rem;
    margin-top: auto;
    backdrop-filter: blur(5px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Gizli Ses Oynatıcı */
#music-player {
    display: none;
}

/* Responsive tasarım */
@media (max-width: 1200px) {
    .container {
        flex-direction: column;
        height: auto;
    }
    
    .radio-column, .player-column, .music-column {
        width: 100%;
    }
    
    .stations-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stations-grid {
        grid-template-columns: 1fr;
    }
    
    .icon-button {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
        margin: 0 0.2rem;
    }
    
    .music-item {
        padding: 0.3rem 0.6rem;
        font-size: 0.85rem;
    }
    
    .station-card {
        height: 55px;
        font-size: 0.85rem;
    }
    
    .playlist-container h3 {
        font-size: 1.1rem;
    }
    
    .file-upload-area {
        padding: 1.2rem;
        min-height: 100px;
    }
    
    .file-upload-area p {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    main {
        padding: 0.6rem;
    }
    
    .container {
        gap: 0.6rem;
    }
    
    .radio-column, .player-column, .music-column {
        padding: 0.6rem;
    }
    
    .station-card {
        height: 50px;
        font-size: 0.8rem;
    }
    
    .icon-button {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .playlist {
        max-height: 250px;
    }
    
    .file-upload-area {
        padding: 0.8rem;
        min-height: 80px;
    }
    
    .file-upload-area p {
        font-size: 0.85rem;
    }
}