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

:root {
    --bg-dark: #0f0f16;
    --glass-bg: rgba(30, 30, 40, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.1);
    --primary: #a855f7;
    --accent: #2dd4bf; /* Teal rengi */
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --radius-lg: 24px;
    --radius-md: 16px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    margin: 0;
    overflow: hidden; /* Ana scroll body'de olmasın, içerikte olsun */
    height: 100vh;
}

/* --- SCROLLBAR TASARIMI --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* --- ARKAPLAN BLOB ANİMASYONU (LAV LAMBASI ETKİSİ) --- */
:root {
    /* Varsayılan Renkler (JS ile değişecek) */
    --blob-color-1: #a855f7; /* Mor */
    --blob-color-2: #2dd4bf; /* Teal */
    --blob-speed: 20s;       /* Hız */
    --blob-opacity: 0.45;
}

.blob-container {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -1;
    top: 0;
    left: 0;
    overflow: hidden;
    pointer-events: none;
    background: #0f0f16;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px); /* Blur biraz azaltıldı, şekiller belli olsun */
    opacity: var(--blob-opacity);
    animation: float var(--blob-speed) infinite ease-in-out;
    transition: background-color 1.5s ease, animation-duration 1.5s ease;
    width: 35vw;  /* Daha küçük boyut */
    height: 35vw;
    min-width: 300px; /* Mobilde çok küçülmesin */
    min-height: 300px;
}

/* --- 4 FARKLI BLOB KONUMU --- */

/* Sol Üst - Renk 1 */
.blob-1 {
    background: var(--blob-color-1);
    top: -10%;
    left: -10%;
    animation-direction: alternate;
}

/* Sağ Alt - Renk 2 */
.blob-2 {
    background: var(--blob-color-2);
    bottom: -10%;
    right: -10%;
    animation-direction: alternate-reverse;
    animation-delay: -5s;
}

/* Sağ Üst - Renk 1 (Daha küçük) */
.blob-3 {
    background: var(--blob-color-1);
    top: 10%;
    right: -5%;
    width: 25vw; height: 25vw;
    opacity: 0.3;
    animation-duration: calc(var(--blob-speed) * 1.2); /* Farklı hız */
    animation-name: float-reverse;
}

/* Sol Alt - Renk 2 (Daha küçük) */
.blob-4 {
    background: var(--blob-color-2);
    bottom: 10%;
    left: -5%;
    width: 28vw; height: 28vw;
    opacity: 0.3;
    animation-duration: calc(var(--blob-speed) * 0.8); /* Farklı hız */
    animation-name: float-vertical;
}

/* --- ANİMASYONLAR --- */
@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(100px, 50px) scale(1.1) rotate(45deg); }
    66% { transform: translate(-50px, 100px) scale(0.9) rotate(90deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes float-reverse {
    0% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-80px, 80px) scale(1.2) rotate(-45deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes float-vertical {
    0% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-150px) scale(1.1); }
    100% { transform: translateY(0) scale(1); }
}

/* --- ANA YAPI --- */
.app-container {
    display: flex;
    height: 100vh;
    padding: 20px;
    gap: 20px;
    max-width: 1920px;
    margin: 0 auto;
}

/* ORTAK CAM PANEL STİLİ */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* --- SOL PANEL (SIDEBAR) --- */
.sidebar {
    width: 380px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.sidebar-header h2 { margin: 0 0 15px 0; font-size: 1.5em; }

.search-box { position: relative; margin-bottom: 15px; }
.search-box input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.05);
    color: white;
    font-family: inherit;
    outline: none;
}
.search-box input:focus { border-color: var(--primary); }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }

.sidebar-actions { display: flex; justify-content: space-between; align-items: center; font-size: 0.85em; }
.text-btn { background: none; border: none; color: var(--accent); cursor: pointer; font-weight: 600; padding: 0; transition: 0.2s; }
.text-btn:hover { color: white; }
.counter { color: var(--text-muted); }

/* ŞARKI LİSTESİ */
.song-list { overflow-y: auto; flex: 1; padding: 10px; }

.song-item {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 12px;
    background: transparent;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
    position: relative;
}

.song-item:hover { background: rgba(255,255,255,0.08); transform: translateX(5px); }

/* Seçili Durum */
.song-item.active {
    background: rgba(168, 85, 247, 0.15);
    border-color: var(--primary);
}

/* Oynatılıyor Durumu (Ses Çalarken) */
.song-item.playing {
    background: rgba(45, 212, 191, 0.15);
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(45, 212, 191, 0.2);
}

.check-indicator {
    width: 18px; height: 18px;
    border-radius: 50%;
    border: 2px solid var(--text-muted);
    margin-right: 12px;
    flex-shrink: 0;
    transition: 0.2s;
}
.song-item.active .check-indicator {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 8px var(--primary);
}

.song-item img {
    width: 45px; height: 45px;
    border-radius: 8px;
    margin-right: 12px;
    object-fit: cover;
}

.song-item .meta { flex: 1; overflow: hidden; }
.song-item .title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.95em; }
.song-item .artist { font-size: 0.8em; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bpm-badge { font-size: 0.7em; background: rgba(0,0,0,0.3); padding: 2px 6px; border-radius: 4px; color: var(--text-muted); }

/* --- SAĞ PANEL (MAIN CONTENT) --- */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    gap: 20px;
}

/* ÜST NAVİGASYON */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    flex-shrink: 0;
}
.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-right: 25px;
    font-weight: 600;
    font-size: 0.95em;
    transition: 0.3s;
}
.nav-links a.active, .nav-links a:hover { color: var(--accent); }

.lang-switch { display: flex; gap: 5px; background: rgba(0,0,0,0.3); padding: 3px; border-radius: 8px; }
.lang-switch a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.8em;
    font-weight: 600;
    transition: 0.2s;
}
.lang-switch a.active { background: var(--primary); color: white; }

/* KONTROL ALANI */
.controls-area {
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}
.branding h1 { margin: 0; font-size: 1.8em; font-weight: 700; }
.branding .highlight { color: var(--accent); }
.branding p { margin: 5px 0 0; color: var(--text-muted); font-size: 0.9em; }

.action-group { display: flex; gap: 20px; align-items: center; }

.vibe-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.05);
    padding: 5px 5px 5px 20px;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
}
.vibe-selector label { font-size: 0.85em; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.vibe-selector select {
    background: transparent;
    border: none;
    color: white;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    padding: 10px 15px;
    outline: none;
}
.vibe-selector select option { background: var(--bg-dark); }

.primary-btn {
    background: linear-gradient(135deg, var(--primary), #9333ea);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9em;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}
.primary-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 25px rgba(168, 85, 247, 0.6); }
.primary-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* SONUÇ PANELİ */
.result-panel { padding: 30px; flex: 1; display: flex; flex-direction: column; }
.result-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--glass-border); padding-bottom: 20px; }
.result-header h3 { margin: 0; font-size: 1.4em; font-weight: 600; }

.score-box { text-align: right; }
.score-box span { display: block; font-size: 2.5em; font-weight: 800; line-height: 1; color: var(--accent); }
.score-box label { font-size: 0.7em; color: var(--text-muted); letter-spacing: 1px; text-transform: uppercase; }

/* BENTO GRID (KARTLAR) */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 25px 0;
}

.track-card {
    position: relative;
    aspect-ratio: 16/9; /* Sinematik oran */
    overflow: hidden;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-end;
}
.track-card:hover {
    transform: scale(1.02);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 2;
}

.track-card img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
    z-index: 0;
}
.track-card:hover img { transform: scale(1.1); }

.track-card .info {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.95), transparent);
}

.track-card .inst-badge {
    position: absolute;
    top: 15px; left: 15px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.7em;
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid rgba(255,255,255,0.2);
    z-index: 2;
}

.t-title { font-size: 1.2em; font-weight: 700; margin-bottom: 4px; text-shadow: 0 2px 4px black; }
.t-artist { font-size: 0.9em; opacity: 0.9; text-shadow: 0 2px 4px black; }
.t-meta { font-size: 0.8em; margin-top: 8px; color: var(--accent); font-weight: 600; }

/* ALT BİLGİ */
.result-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.secondary-btn {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}
.secondary-btn:hover { background: rgba(255,255,255,0.2); }

/* LOADER */
.loader-container {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    height: 300px; color: var(--text-muted);
}
.spinner {
    width: 50px; height: 50px;
    border: 5px solid rgba(255,255,255,0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

/* assets/css/style.css */

/* Alt Bilgi Alanı */
.result-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px; /* Mobilde butonla yazı yapışmasın */
}

/* --- YENİ PRO TIP KUTUSU TASARIMI --- */
.pro-tip {
    background: linear-gradient(90deg, rgba(45, 212, 191, 0.1), rgba(168, 85, 247, 0.1)); /* Hafif renkli geçiş */
    border: 1px solid var(--accent); /* Vurgu renginde çerçeve */
    padding: 10px 20px;
    border-radius: 12px;
    color: white;
    font-size: 0.95em;
    box-shadow: 0 0 15px rgba(45, 212, 191, 0.2); /* Hafif neon parlama */
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap; /* Satır kaymasını önle */
}

/* "Pro İpucu:" yazısını vurgula */
.pro-tip strong {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85em;
}

/* Değerlerin (BPM ve Key) renkleri */
#tip-bpm {
    color: white;
    font-weight: 700;
    font-size: 1.1em;
}

#tip-key {
    color: var(--primary); /* Key rengini mor yapalım */
    font-weight: 700;
    font-size: 1.1em;
    margin-left: 5px;
}

/* Kaydet butonu da biraz daha belirgin olsun */
.secondary-btn {
    background: var(--glass-highlight);
    color: white;
    border: 1px solid var(--glass-border);
    padding: 12px 25px;
    border-radius: 50px; /* Daha yuvarlak */
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
    white-space: nowrap;
}
.secondary-btn:hover {
    background: var(--accent); /* Üzerine gelince renk değişsin */
    color: var(--bg-dark);
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(45, 212, 191, 0.4);
}
/* --- KİLİT BUTONU STİLİ --- */
.lock-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10; /* Resmin üzerinde olsun */
    backdrop-filter: blur(4px);
}

.lock-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: scale(1.1);
}

/* Kilitlendiğindeki Durum */
.lock-btn.locked {
    background: var(--accent); /* Kilitlenince Teal rengi olsun */
    color: black;
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(45, 212, 191, 0.5);
}

/* İkon ayarı */
.lock-btn i {
    font-size: 0.9em;
    pointer-events: none; /* Tıklama sorunu olmasın */
}
/* --- YENİ ENSTRÜMAN BADGE STİLİ (DÖNEN BAR & BÜYÜK YAZI) --- */

.track-card .inst-badge {
    position: absolute;
    top: 15px; 
    left: 15px;
    
    /* Yazı Ayarları */
    padding: 8px 20px;        /* Kutu genişletildi */
    font-size: 1em;           /* Yazı büyütüldü (Eskisi 0.7em idi) */
    font-weight: 800;         /* Yazı kalınlaştırıldı */
    text-transform: uppercase;
    letter-spacing: 1.5px;    /* Harf aralığı açıldı */
    color: white;             /* Yazı rengi parlak beyaz */
    
    /* Şekil ve Konum */
    border-radius: 50px;      /* Tam oval (Pill shape) */
    z-index: 5;
    overflow: hidden;         /* Efektin dışarı taşmasını önle */
    
    /* Düzen */
    display: flex;
    align-items: center;
    gap: 8px;                 /* İkon ile yazı arası boşluk */
    
    /* Eski border'ı kaldırıp gölge ekliyoruz */
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.6); 
    background: transparent;  /* Arkaplanı pseudo-element halledecek */
}

/* 1. KATMAN: DÖNEN RENKLİ IŞIK (BAR) */
.track-card .inst-badge::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    
    /* Dönen Renkler (Mor ve Teal) */
    background: conic-gradient(
        transparent, 
        var(--primary), 
        var(--accent), 
        var(--primary), 
        transparent 40%
    );
    
    /* Dönme Animasyonu */
    animation: rotate-border 3s linear infinite;
    z-index: -2;
}

/* 2. KATMAN: İÇ SİYAH ZEMİN (Yazının okunması için) */
.track-card .inst-badge::after {
    content: '';
    position: absolute;
    inset: 2px; /* Çerçevenin kalınlığı (2px) */
    background: rgba(15, 15, 22, 0.95); /* Çok koyu, hafif şeffaf zemin */
    border-radius: 50px;
    z-index: -1;
}

/* DÖNME ANİMASYONU */
@keyframes rotate-border {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}