/* public/css/main.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Urbanist:wght@600;700&display=swap');

/* RESET & BASE */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

html, body {
    height: 100%;
    width: 100%;
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background-color: transparent; /* Important for fixed background */
    overflow-x: hidden;
}

/* --- VIBRANT ANIMATED BACKGROUND --- */
.lab-gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    /* Vibrant Apple-style mesh gradient */
    background: linear-gradient(120deg, #e0c3fc 0%, #8ec5fc 100%),
                radial-gradient(at top left, rgba(255,255,255,0.5), transparent 50%);
    background-size: 200% 200%;
    animation: labGradientMove 15s ease infinite;
    opacity: 1;
    pointer-events: none;
}

@keyframes labGradientMove {
    0% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
    100% { background-position: 0% 0%; }
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: #1D1D1F;
    letter-spacing: -0.02em;
}

p {
    line-height: 1.5;
    color: var(--text-secondary);
}

/* --- APP SHELL LAYOUT --- */
.app-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

.app-main-container {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 24px 20px 100px; /* Bottom padding for mobile nav */
    position: relative;
    z-index: 1;
}

/* --- APPLE-STYLE TOP NAVIGATION --- */
.app-topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 64px;
    width: 100%;
    padding: 0 24px;
    
    display: flex;
    align-items: center;
    justify-content: space-between;
    
    /* Premium Glass Effect */
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.02);
}

.header-left { display: flex; align-items: center; width: 150px; }
.header-center { display: flex; gap: 8px; align-items: center; } 
.header-right { display: flex; align-items: center; gap: 16px; width: 150px; justify-content: flex-end; }

.brand-link { text-decoration: none; display: flex; align-items: center; gap: 12px; }
.brand-logo { 
    width: 32px; height: 32px; 
    border-radius: 8px; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}
.brand-link:hover .brand-logo { transform: scale(1.1) rotate(5deg); }
.brand-text { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: #1D1D1F; }

/* Navigation Pills */
.app-topbar .nav-link {
    text-decoration: none;
    color: #6e6e73; /* Apple Gray */
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.app-topbar .nav-link:hover {
    color: #1D1D1F;
    background: rgba(0, 0, 0, 0.04);
}

.app-topbar .nav-link.active {
    color: #1D1D1F;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    font-weight: 600;
}
/* Hide old indicator */
.app-topbar .nav-link.active::after { display: none; }


/* --- GLOBAL INPUTS (Apple Style) --- */
input, select, textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(60, 60, 67, 0.1); /* Apple separator color */
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    font-family: var(--font-body);
    font-size: 1rem;
    color: #1D1D1F;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

input:focus, select:focus {
    outline: none;
    background: #FFFFFF;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px var(--accent-glow);
    transform: translateY(-1px);
}

/* --- BUTTONS --- */
.btn-primary {
    background: #1D1D1F; /* Apple Black */
    color: white;
    font-family: var(--font-body);
    font-weight: 600;
    padding: 14px 28px;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 1rem;
}
.btn-primary:hover { transform: scale(1.02); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); }
.btn-primary:active { transform: scale(0.98); }

.btn-magic {
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 100px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
}
.btn-magic:hover { transform: translateY(-2px) scale(1.02); }

/* --- UTILS --- */
.glass-panel {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.05);
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
    .desktop-only { display: none !important; }
    .brand-text { display: none; }
    .app-topbar { padding: 0 16px; height: 60px; }
    
    .app-main-container {
        padding: 20px 16px 100px;
    }
}