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

:root {
    --bg-color: #101119;
    --surface-color: #1c1c2b;
    --primary-color: #a855f7;
    --accent-color: #2dd4bf;
    --orange-color: #fb923c;
    --yellow-color: #facc15;
    --text-color: #e0e0e0;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { height: 100%; }
body { font-family: 'Poppins', sans-serif; background-color: var(--bg-color); color: var(--text-color); height: 100vh; max-height: 100vh; margin: 0; display: flex; flex-direction: column; overflow: hidden; }

/* --- ARKA PLAN --- */
.background-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; }
.blob { position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.4; }
.blob1 { width: 400px; height: 400px; background: var(--primary-color); top: -100px; left: -100px; animation: move1 25s infinite alternate; }
.blob2 { width: 500px; height: 500px; background: var(--accent-color); bottom: -150px; right: -150px; animation: move2 30s infinite alternate; }
@keyframes move1 { from { transform: translate(0, 0) scale(1) rotate(0deg); } to { transform: translate(20vw, 30vh) scale(1.2) rotate(180deg); } }
@keyframes move2 { from { transform: translate(0, 0) scale(1.2) rotate(0deg); } to { transform: translate(-30vw, -20vh) scale(0.8) rotate(-180deg); } }

/* --- LAYOUT --- */
.page-container { display: flex; flex-direction: column; height: 100%; }
.page-wrapper { flex-grow: 1; display: flex; justify-content: center; padding: 20px; overflow: hidden; position: relative; }

.app-body { 
    display: flex; 
    gap: 20px; 
    width: 100%; 
    max-width: 1400px; 
    height: 100%; 
    position: relative; 
}

/* Yan Butonlar */
.side-button-container { position: absolute; left: -65px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 10px; z-index: 100; }
.side-button { background-color: rgba(28, 28, 43, 0.8); backdrop-filter: blur(10px); padding: 10px 8px; border: 1px solid var(--border-color); color: var(--text-muted); font-weight: 600; text-decoration: none; transition: all 0.2s; writing-mode: vertical-rl; text-orientation: mixed; font-size: 0.9em; border-radius: 12px; }
.side-button:hover { color: var(--text-color); background-color: var(--surface-color); }

/* --- SOL MENÜ --- */
.column-left {
    flex: 0 0 350px;
    min-width: 350px;
    z-index: 10;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: rgba(28, 28, 43, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 20px;
    border-radius: 24px;
}

.header-controls { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; flex-shrink: 0; }
.column-title { font-size: 1.5em; margin: 0; }
.form-label { display: block; margin-bottom: 8px; font-weight: 600; color: var(--text-muted); }
select, input[type="search"] { width: 100%; padding: 12px; border-radius: 8px; border: 1px solid var(--border-color); background-color: var(--surface-color); color: var(--text-color); font-size: 0.9em; }
#song-search-input { margin-bottom: 15px; }

.language-switcher { display: flex; background: rgba(255,255,255,0.1); border-radius: 8px; padding: 4px; }
.lang-btn { background: transparent; border: none; color: var(--text-muted); padding: 4px 12px; border-radius: 6px; font-weight: 600; cursor: pointer; text-decoration: none; }
.lang-btn.active { background-color: var(--primary-color); color: white; }

/* Şarkı Listesi */
.song-list { overflow-y: auto; flex-grow: 1; min-height: 0; }
.song-list::-webkit-scrollbar { width: 8px; }
.song-list::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); border-radius: 4px; }
.song-list::-webkit-scrollbar-thumb { background-color: #4b5563; border-radius: 4px; }
.song-item { display: flex; align-items: center; gap: 15px; padding: 8px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; text-decoration: none; color: var(--text-color); }
.song-item:hover { background-color: rgba(255,255,255,0.05); }
.song-item.active { background-color: rgba(168, 85, 247, 0.2); border: 1px solid var(--primary-color); }
.song-cover { width: 40px; height: 40px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }
.song-details { flex-grow: 1; min-width: 0; }
.song-list-title { font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-list-artist { font-size: 0.8em; color: var(--text-muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Footer */
.footer-wrapper { position: relative; padding: 1px; border-radius: 16px; background: linear-gradient(90deg, var(--primary-color), var(--accent-color)); margin: 20px; flex-shrink: 0; }
.footer-wrapper::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, var(--primary-color), var(--accent-color)); filter: blur(15px); opacity: 0.6; z-index: -1; border-radius: 16px; }
.page-footer { background-color: var(--surface-color); border-radius: 15px; text-align: center; padding: 10px; color: var(--text-muted); font-size: 0.8em; width: 100%; }

/* --- ORTA KOLON (PATH VIEWER) --- */
.column-center-container {
    flex: 1;
    min-width: 0;
    margin-left: 0;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: rgba(28, 28, 43, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 20px;
}

.leaderboard-header { display: flex; gap: 20px; align-items: center; padding-bottom: 20px; margin-bottom: 10px; border-bottom: 1px solid var(--border-color); flex-shrink: 0; }
.leaderboard-album-art { width: 80px; height: 80px; border-radius: 12px; flex-shrink: 0; }
.header-info { display: flex; flex-direction: column; gap: 5px; flex-grow: 1; }
.leaderboard-title { font-size: 2em; color: white; line-height: 1.2; }
.leaderboard-artist { color: var(--text-muted); font-size: 1.2em; }

.instrument-selector { display: flex; gap: 10px; margin-top: 12px; }
.instrument-icon { width: 36px; height: 36px; border: 2px solid transparent; border-radius: 50%; cursor: pointer; transition: all 0.2s ease; background-color: rgba(0,0,0,0.3); padding: 4px; }
.instrument-icon img { display: block; width: 100%; height: 100%; pointer-events: none; }
.instrument-icon:hover { border-color: var(--accent-color); }
.instrument-icon.active { border-color: var(--primary-color); box-shadow: 0 0 10px var(--primary-color); transform: scale(1.1); background-color: rgba(168, 85, 247, 0.2); }

/* --- PATH VIEWER DÜZENİ --- */
.main-layout { display: flex; gap: 20px; flex-grow: 1; min-height: 0; overflow: hidden; padding-bottom: 10px; }
.chart-area { flex: 2; display: flex; flex-direction: column; gap: 15px; height: 100%; overflow: hidden; padding-right: 5px; }

/* Resim Kapsayıcısı */
.path-image-wrapper {
    background-color: rgba(0, 0, 0, 0.2); border-radius: 12px; padding: 10px; border: 1px solid var(--border-color); text-align: center;
    height: 850px; overflow-y: auto !important; overflow-x: hidden; display: block; position: relative; cursor: grab; user-select: none;
}
.path-image-wrapper.is-dragging { cursor: grabbing; }
.path-image-wrapper::-webkit-scrollbar { width: 12px; display: block; }
.path-image-wrapper::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); border-radius: 6px; }
.path-image-wrapper::-webkit-scrollbar-thumb { background-color: var(--primary-color); border-radius: 6px; border: 2px solid rgba(0,0,0,0.2); }
.path-image-wrapper::-webkit-scrollbar-thumb:hover { background-color: var(--accent-color); }
.path-image-wrapper img { max-width: 100%; height: auto; border-radius: 6px; box-shadow: 0 4px 15px rgba(0,0,0,0.3); transition: transform 0.1s ease-out; transform-origin: center top; display: inline-block; }

/* Sağ (Liste) */
.path-list-sidebar {
    flex: 1;
    min-width: 280px;
    max-width: 350px;
    background: rgba(28, 28, 43, 0.4); 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    
    display: flex;
    flex-direction: column; /* Dikey dizilim */
    
    height: 970px; /* SABİT YÜKSEKLİK */
    overflow: hidden;
}

.sidebar-header {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    font-weight: 700;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    font-size: 0.9em;
    flex-shrink: 0;
}

.path-list-container {
    padding: 0;
    overflow-y: auto; /* Sadece liste kaydırılabilir */
    flex-grow: 1; /* Alanın geri kalanını kaplasın (ama bilgi kutusuna yer kalsın) */
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 1em;
    background-color: transparent;
}
.path-list-container::-webkit-scrollbar { width: 6px; }
.path-list-container::-webkit-scrollbar-track { background: transparent; }
.path-list-container::-webkit-scrollbar-thumb { background-color: var(--primary-color); border-radius: 3px; }

.path-meta-row { display: flex; justify-content: space-between; align-items: center; }
.section-label { color: var(--text-muted); font-size: 0.9em; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; font-weight: 600; }
.score-pill { background: rgba(168, 85, 247, 0.2); color: var(--primary-color); padding: 5px 15px; border-radius: 20px; font-weight: 700; border: 1px solid rgba(168, 85, 247, 0.3); display: inline-block; }

/* Renkli Notlar */
.note-line { padding: 8px 15px; border-bottom: 1px solid rgba(255,255,255,0.05); display: flex; align-items: center; transition: background 0.2s; }
.note-line:last-child { border-bottom: none; }
.note-line:hover { background-color: rgba(255,255,255,0.05); }
.note-G { color: #4ade80; text-shadow: 0 0 10px rgba(74, 222, 128, 0.3); font-weight: bold; }
.note-R { color: #f87171; text-shadow: 0 0 10px rgba(248, 113, 113, 0.3); font-weight: bold; }
.note-Y { color: #facc15; text-shadow: 0 0 10px rgba(250, 204, 21, 0.3); font-weight: bold; }
.note-B { color: #60a5fa; text-shadow: 0 0 10px rgba(96, 165, 250, 0.3); font-weight: bold; }
.note-O { color: #fb923c; text-shadow: 0 0 10px rgba(251, 146, 60, 0.3); font-weight: bold; }

.placeholder-view { display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100%; text-align: center; }

/* Zoom Butonu */
.zoom-toggle-btn { background: rgba(168, 85, 247, 0.2); border: 1px solid var(--primary-color); color: white; padding: 5px 12px; border-radius: 6px; cursor: pointer; font-size: 0.8em; font-weight: 600; transition: all 0.2s; display: flex; align-items: center; gap: 5px; }
.zoom-toggle-btn:hover { background: var(--primary-color); }
.zoom-toggle-btn.active { background: var(--accent-color); border-color: var(--accent-color); color: #000; }
.path-image-wrapper.zoom-active { overflow: hidden; cursor: zoom-in; }
.path-image-wrapper.zoom-active img { max-width: none; width: 100%; cursor: crosshair; }

/* --- YENİ DİKEY BİLGİLENDİRME KUTUSU (SAĞ SÜTUN ALTINDA) --- */
.sidebar-info-box {
    background-color: rgba(0, 0, 0, 0.3);
    border-top: 2px solid var(--primary-color);
    padding: 15px;
    font-size: 0.8em;
    color: var(--text-muted);
    flex-shrink: 0; /* İçerik sıkışmasın */
    overflow-y: auto;
    max-height: 500px; /* Çok uzarsa kendi içinde scroll olsun */
}

.info-header { font-size: 1.1em; font-weight: 800; color: white; margin-bottom: 10px; text-align: center; letter-spacing: 1px; }

.example-box {
    background: #181824; border: 1px dashed var(--text-muted); padding: 8px; border-radius: 6px; text-align: center; font-family: 'Consolas', monospace; font-size: 1.1em; font-weight: bold; margin-bottom: 12px;
}
.ex-part.left { color: #facc15; } 
.ex-part.right { color: #4ade80; } 
.ex-sep { color: white; margin: 0 5px; opacity: 0.5; }

.info-section { margin-bottom: 12px; }
.info-sub-title { font-weight: 700; font-size: 0.9em; margin-bottom: 4px; text-transform: uppercase; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 2px; }
.info-section p { margin-bottom: 4px; line-height: 1.3; }

.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { position: relative; padding-left: 10px; margin-bottom: 4px; line-height: 1.3; }
.info-list li::before { content: '•'; position: absolute; left: 0; color: var(--text-muted); }
.info-list strong { color: white; }

.highlight-squeeze { background-color: rgba(255, 0, 0, 0.2); color: #ff6b6b; padding: 1px 3px; border-radius: 3px; font-weight: bold; }

.color-legend { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.color-legend span { background: rgba(255,255,255,0.05); padding: 2px 5px; border-radius: 3px; font-size: 0.9em; font-weight: bold; }