/* =========================================================
   VARIABILE DE CULOARE (Premium Club Dark Mode)
   ========================================================= */
   :root {
    --bg-app: #09090b;           /* Negru profund */
    --bg-deck: rgba(24, 24, 27, 0.6); /* Transparenta Glassmorphism */
    --bg-hover: rgba(39, 39, 42, 0.8);
    --accent-primary: #10b981;   /* Emerald Neon */
    --accent-glow: rgba(16, 185, 129, 0.4);
    --accent-auto: #f59e0b;      
    --text-main: #f4f4f5;
    --text-muted: #a1a1aa;
    --border-color: rgba(63, 63, 70, 0.4);
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 8px;
}

/* =========================================================
   RESET & SCROLLBAR CUSTOM
   ========================================================= */
* { box-sizing: border-box; margin: 0; padding: 0; user-select: none; /* Previne selectarea textului accidental */ }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-app); }
::-webkit-scrollbar-thumb { background: #3f3f46; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #52525b; }

body {
    background: radial-gradient(circle at top center, #18181b 0%, var(--bg-app) 100%);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    padding: 20px 40px; 
    min-height: 100vh;
    overflow-x: hidden;
}

/* =========================================================
   HEADER & NAVBAR
   ========================================================= */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 25px;
}

.logo-zone h1 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo-zone h1 span {
    color: var(--accent-primary);
    text-shadow: 0 0 20px var(--accent-glow); 
}

/* BUTOANE TAB-URI */
.tabs-nav {
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.3);
    padding: 6px;
    border-radius: 50px; 
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.tab-btn {
    background-color: transparent;
    color: var(--text-muted);
    border: none;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover { color: var(--text-main); }
.tab-btn.active {
    background-color: var(--accent-primary);
    color: #000; 
    box-shadow: 0 4px 20px var(--accent-glow);
}

.tab-content { display: none; animation: fadeIn 0.4s ease; }
.active-content { display: block !important; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* BUTOANE AUTENTIFICARE HEADER */
#login-btn, .auth-zone button {
    font-family: inherit;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}
#login-btn { background-color: #ef4444; color: white; box-shadow: 0 4px 15px rgba(239, 68, 68, 0.2); }
#login-btn:hover { background-color: #dc2626; transform: translateY(-2px); }

/* =========================================================
   BARA AUTOPILOT (TAB 1)
   ========================================================= */
.auto-control-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, rgba(39, 39, 42, 0.4), rgba(0, 0, 0, 0.2));
    padding: 16px 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    backdrop-filter: blur(15px);
}

#auto-btn {
    background-color: rgba(0,0,0,0.5);
    color: var(--text-main);
    border: 1px solid #52525b;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auto-active {
    background-color: var(--accent-auto) !important;
    color: #000 !important;
    border-color: var(--accent-auto) !important;
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.6);
    transform: scale(1.05);
}

/* =========================================================
   STRUCTURĂ DECK-URI (A, B, C) - GLASSMORPHISM
   ========================================================= */
.mixer-container { 
    display: flex; 
    gap: 30px; 
    align-items: flex-start; 
}

.autopilot-layout {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.deck { 
    flex: 1 1 50%; 
    background: var(--bg-deck);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color); 
    border-radius: var(--radius-lg); 
    padding: 25px; 
    display: flex; 
    flex-direction: column; 
    gap: 20px; 
    box-shadow: 0 30px 60px rgba(0,0,0,0.6);
    transition: transform 0.3s ease;
}

.deck:hover { border-color: rgba(16, 185, 129, 0.2); }

.deck-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.deck h2 {
    font-size: 18px;
    color: var(--text-main);
    font-weight: 800;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* BARA DE CĂUTARE */
.search-box { display: flex; gap: 10px; width: 65%; }

.search-box input {
    flex: 1;
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    color: white;
    padding: 12px 18px;
    border-radius: 50px; 
    outline: none;
    font-size: 14px;
    transition: all 0.3s;
}

.search-box input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
    background-color: rgba(0, 0, 0, 0.8);
}

.search-box button {
    background-color: var(--text-main);
    color: #000;
    border: none;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.search-box button:hover {
    background-color: var(--accent-primary); 
    transform: translateY(-2px);
    box-shadow: 0 6px 15px var(--accent-glow);
}

/* =========================================================
   PLAYER VIDEO
   ========================================================= */
.player-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background-color: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid #27272a;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}
.player-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }

/* =========================================================
   LISTE MELODII & RECOMANDARI
   ========================================================= */
.results-container {
    max-height: 350px;
    overflow-y: auto;
    background-color: rgba(0,0,0,0.4);
    border-radius: var(--radius-md);
    padding: 10px;
    border: 1px inset rgba(255,255,255,0.05);
}

.recommendations-container {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-md);
    padding: 15px;
    border: 1px dashed var(--border-color);
}

.rec-title-header {
    font-size: 12px;
    color: var(--accent-primary);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 800;
}

.result-item-yt {
    display: flex;
    gap: 15px;
    padding: 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 8px;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
}

.result-item-yt:hover {
    background-color: var(--bg-hover);
    border-color: #3f3f46;
    transform: translateX(5px); 
    box-shadow: -5px 5px 15px rgba(0,0,0,0.3);
}

.thumbnail-container img {
    width: 120px;
    height: 68px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.small-rec .thumbnail-container img { width: 80px; height: 45px; }

.info-container {
    display: flex; flex-direction: column; justify-content: center;
    overflow: hidden; flex: 1; padding-right: 15px;
}

.video-title {
    font-size: 14px;
    color: var(--text-main);
    margin: 0 0 6px 0;
    font-weight: 600;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; text-overflow: ellipsis; line-height: 1.4;
}
.small-rec .video-title { font-size: 13px; -webkit-line-clamp: 1; }
.channel-name { font-size: 12px; color: var(--text-muted); margin: 0; }

/* Meniu si Drag & Drop */
.dots-btn {
    background: rgba(255,255,255,0.05); border: none; color: #a1a1aa;
    font-size: 20px; cursor: pointer; padding: 0 12px; height: 32px;
    border-radius: 50px; transition: all 0.2s; display: flex; align-items: center;
}
.dots-btn:hover { color: white; background-color: var(--accent-primary); }

.dropdown-menu {
    display: none; position: absolute; right: 0; top: 40px;
    background-color: #18181b; border: 1px solid #3f3f46;
    border-radius: var(--radius-md); z-index: 999; min-width: 240px;
    box-shadow: 0px 20px 40px rgba(0, 0, 0, 0.9); overflow: hidden;
}
.dropdown-menu button {
    background: none; border: none; color: var(--text-main);
    width: 100%; text-align: left; padding: 16px; font-size: 13px;
    font-weight: 500; cursor: pointer; transition: background 0.2s;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.dropdown-menu button:hover { background-color: #27272a; color: var(--accent-primary); }
.show-menu { display: block !important; }

.small-rec { cursor: grab; }
.small-rec:active { cursor: grabbing; }
.small-rec.dragging { opacity: 0.8; background-color: #27272a; border: 1px dashed var(--accent-primary); transform: scale(1.02); }

/* =========================================================
   DESIGN ECRAN AUTENTIFICARE
   ========================================================= */
.auth-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at center, #18181b 0%, var(--bg-app) 100%);
    display: flex; justify-content: center; align-items: center; z-index: 9999;
}
.auth-box {
    background: var(--bg-deck); backdrop-filter: blur(30px);
    border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius-lg);
    padding: 50px; width: 100%; max-width: 450px; box-shadow: 0 40px 80px rgba(0,0,0,0.9);
}
.auth-input {
    width: 100%; background-color: rgba(0,0,0,0.6); border: 1px solid var(--border-color);
    color: white; padding: 16px; border-radius: var(--radius-sm);
    outline: none; font-size: 14px; margin-bottom: 15px; transition: 0.3s;
}
.auth-input:focus { border-color: var(--accent-primary); box-shadow: 0 0 15px rgba(16,185,129,0.1); }
.auth-submit {
    width: 100%; background: linear-gradient(90deg, var(--accent-primary), #059669);
    color: #000; border: none; padding: 16px; border-radius: var(--radius-sm);
    font-weight: 800; font-size: 15px; cursor: pointer; transition: 0.3s; margin-top: 10px;
}
.auth-submit:hover { box-shadow: 0 10px 25px var(--accent-glow); transform: translateY(-2px); }
.auth-switch { text-align: center; font-size: 13px; color: var(--text-muted); margin-top: 25px; }
.auth-switch span { color: var(--accent-primary); cursor: pointer; font-weight: 700; }
.auth-error { color: #ef4444; font-size: 13px; text-align: center; margin-top: 15px; font-weight: 600; min-height: 15px; }

/* =========================================================
   OPTIMIZARE RESPONSIVE PENTRU TELEFON (MOBILE VIEW)
   ========================================================= */
@media screen and (max-width: 1024px) {
    .mixer-container { flex-direction: column; align-items: stretch; }
    .deck { width: 100%; }
    #deck-c { width: 100% !important; flex: 1 1 100%; }
}

@media screen and (max-width: 768px) {
    body { padding: 15px; }
    
    header { flex-direction: column; gap: 15px; align-items: flex-start; }
    .auth-zone { width: 100%; display: flex; flex-direction: column; gap: 10px; }
    .auth-zone button { width: 100%; }
    
    .tabs-nav { width: 100%; overflow-x: auto; white-space: nowrap; padding-bottom: 5px; }
    
    .deck-header { flex-direction: column; gap: 15px; align-items: flex-start; }
    .search-box { width: 100%; }
    
    .auto-control-bar { flex-direction: column; text-align: center; gap: 15px; }
    
    .thumbnail-container img { width: 90px; height: 50px; }
    
    .auth-box { padding: 30px 20px; border-radius: var(--radius-md); }
}