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

:root {
    --bg: #050505;
    --card-bg: rgba(15, 15, 15, 0.7);
    --border: rgba(255, 255, 255, 0.08);
    --accent: #d48c24;
    --text-pri: #ffffff;
    --text-sec: #888888;
    --apple-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body { 
    background-color: var(--bg); color: var(--text-pri); 
    font-family: 'Inter', sans-serif; 
    line-height: 1.5; overflow-x: hidden; min-height: 100vh; display: flex; flex-direction: column;
}

/* --- NAVBAR UNIFICADA (ENLACES A LA IZQUIERDA) --- */
header.topbar {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
    width: 92%; max-width: 1200px; height: 72px;
    background: var(--card-bg); backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid var(--border); border-radius: 22px;
    display: flex; align-items: center; 
    justify-content: flex-start; /* Alinea todo al principio (izquierda) */
    padding: 0 24px; z-index: 1000; transition: 0.4s var(--apple-ease);
    gap: 10px; /* Espacio pequeño entre logo y nav */
}

.logo { 
    display: flex; align-items: center; gap: 12px; 
    text-decoration: none; color: white; font-weight: 800; 
    font-size: 1.2rem; flex-shrink: 0; 
    margin-right: 10px; /* Espacio extra después del logo */
}

nav { 
    display: flex; gap: 2px; 
    /* Eliminamos flex: 1 y justify-content: center para que no ocupen todo el centro */
}

nav a { 
    color: white; opacity: 0.6; text-decoration: none; font-weight: 600; 
    padding: 10px 14px; border-radius: 12px; transition: 0.3s; font-size: 0.9rem; 
}
nav a:hover { opacity: 1; background: rgba(255,255,255,0.05); }

/* Empuja la lupa y el usuario a la derecha del todo */
.right-actions { 
    margin-left: auto; 
    display: flex; align-items: center; gap: 15px; flex-shrink: 0; 
}

/* --- BOTONES --- */
.btn-apple {
    padding: 12px 24px; border-radius: 14px; font-weight: 700; cursor: pointer;
    transition: 0.3s var(--apple-ease); text-decoration: none; border: none; font-size: 0.9rem;
    display: inline-flex; align-items: center; justify-content: center; font-family: 'Inter', sans-serif;
}
.btn-pri { background: white; color: black; }
.btn-pri:hover { transform: scale(1.05); background: #eee; }
.btn-sec { background: rgba(255,255,255,0.1); color: white; backdrop-filter: blur(10px); }
.btn-sec:hover { background: rgba(255,255,255,0.15); }

/* --- USER MENU --- */
.user-menu-wrapper { position: relative; display: flex; align-items: center; }
.menu-trigger { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--border); cursor: pointer; transition: 0.3s; object-fit: cover; background: #111; }
.menu-trigger:hover { border-color: var(--accent); }
.user-dropdown {
    position: absolute; top: 55px; right: 0; width: 250px;
    background: rgba(20, 20, 20, 0.98); backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--border); border-radius: 20px;
    padding: 15px; display: none; flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); z-index: 1100;
}
.user-dropdown.active { display: flex; animation: fadeIn 0.2s ease; }
.dropdown-header { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.user-name { font-weight: 800; color: white; display: block; font-size: 1.1rem; letter-spacing: -0.5px; }
.user-email { font-size: 0.8rem; color: #666; word-break: break-all; }
.menu-option { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; text-decoration: none; color: white; font-weight: 600; font-size: 0.9rem; transition: 0.2s; }
.menu-option:hover { background: rgba(255, 255, 255, 0.05); }
.menu-option.logout { color: #ff4d4d; }

/* --- SEARCH --- */
#search-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px);
    display: none; flex-direction: column; align-items: center; padding-top: 15vh; z-index: 2000;
}
.search-box { width: 90%; max-width: 700px; text-align: center; }
.search-box input { width: 100%; background: transparent; border: none; border-bottom: 2px solid var(--border); padding: 15px; color: white; font-size: 2.5rem; font-weight: 800; outline: none; font-family: 'Inter', sans-serif; }

/* --- FOOTER --- */
.site-footer {
    width: 92%; max-width: 1200px; margin: 100px auto 40px;
    background: var(--card-bg); border: 1px solid var(--border); border-radius: 32px;
    padding: 60px 40px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px;
}
.footer-logo { font-size: 2rem; font-weight: 900; margin-bottom: 15px; letter-spacing: -1.5px; }
.footer-socials { display: flex; gap: 20px; margin-bottom: 20px; }
.footer-socials a { color: white; opacity: 0.5; transition: 0.3s; }
.footer-socials a:hover { opacity: 1; color: var(--accent); transform: translateY(-3px); }
.footer-link { color: var(--text-sec); text-decoration: none; font-weight: 600; display: block; margin-bottom: 12px; transition: 0.3s; }
.footer-link:hover { color: white; }

@media (max-width: 850px) {
    nav { display: none; }
    .site-footer { flex-direction: column; text-align: center; align-items: center; }
    .footer-right { align-items: center; }
}

.fade-in-up { animation: fadeInUp 0.8s var(--apple-ease) forwards; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
