/* --- Auth System Styles (Black & White Light Edition) --- */
:root {
    /* Monochrome Palette - Light Mode */
    --bg-body: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #18181b; /* Zinc-900 */
    --text-secondary: #52525b; /* Zinc-600 */
    --text-tertiary: #71717a; /* Zinc-500 */
    
    --accent-black: #000000;
    --accent-hover: #27272a; /* Zinc-800 */
    
    --border-light: #e4e4e7; /* Zinc-200 */
    --border-hover: #d4d4d8; /* Zinc-300 */
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    
    --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Login Modal --- */
.login-overlay { 
    position: fixed; inset: 0; 
    background: rgba(0, 0, 0, 0.4); /* Lighter overlay */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999; 
    display: flex; align-items: center; justify-content: center; 
    opacity: 0; visibility: hidden; 
    transition: var(--transition);
}
.login-overlay.active { opacity: 1; visibility: visible; }

.login-card { 
    width: 400px; 
    padding: 40px; 
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 24px; 
    display: flex; flex-direction: column; align-items: center; text-align: center; 
    box-shadow: var(--shadow-lg);
    transform: scale(0.95) translateY(10px); 
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.login-overlay.active .login-card { transform: scale(1) translateY(0); }

.login-close-btn {
    position: absolute; top: 20px; right: 20px;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: transparent;
    color: var(--text-tertiary);
    border: 1px solid transparent;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
    z-index: 2;
}
.login-close-btn:hover { 
    background: var(--border-light); 
    color: var(--text-primary); 
}

.login-logo {
    width: 64px; height: 64px;
    background: var(--accent-black);
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; color: #fff;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 1;
}

.login-title { 
    font-size: 24px; font-weight: 700; 
    color: var(--text-primary);
    margin-bottom: 10px; 
    letter-spacing: -0.02em;
}

.login-desc { 
    font-size: 14px; 
    color: var(--text-secondary); 
    margin-bottom: 32px; 
    line-height: 1.5; 
    max-width: 280px;
}

.btn-google-login { 
    display: flex; align-items: center; justify-content: center; gap: 12px; 
    width: 100%; height: 48px; 
    background: #ffffff; 
    color: var(--text-primary); 
    border-radius: 12px; 
    font-size: 15px; font-weight: 600; 
    cursor: pointer; 
    border: 1px solid var(--border-light);
    transition: var(--transition);
    text-decoration: none; 
    box-shadow: var(--shadow-sm);
}
.btn-google-login:hover { 
    background: #f8f9fa;
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px); 
}

.login-divider {
    width: 100%; height: 1px; 
    background: var(--border-light); 
    margin: 28px 0;
}

.login-terms {
    font-size: 12px; color: var(--text-tertiary); line-height: 1.5; max-width: 260px;
}
.login-terms a { color: var(--text-secondary); text-decoration: none; transition: 0.2s; }
.login-terms a:hover { color: var(--text-primary); text-decoration: underline; }


/* --- Nav Profile Widget (Clean Light) --- */
.nav-credits-widget {
    display: flex; 
    align-items: center; 
    gap: 12px; 
    padding: 4px 16px 4px 16px; 
    height: 42px;
    border-radius: var(--radius-full); 
    border: 1px solid var(--border-light);
    background: #fff;
    transition: var(--transition); 
    cursor: pointer; 
    position: relative;
}

.nav-credits-widget:hover { 
    box-shadow: var(--shadow-md);
    border-color: var(--accent-black);
}
.nav-credits-widget:hover .user-dropdown { 
    opacity: 1; visibility: visible; 
    transform: translateY(10) translateX(0px); 
    pointer-events: auto;
}

.nav-info-group {
    display: flex; align-items: center; gap: 10px;
}

.nav-credits-box {
    display: flex; flex-direction: column; align-items: flex-end; justify-content: center; line-height: 1;
}
.nav-credit-val { 
    font-size: 13px; font-weight: 600; color: var(--text-primary); 
    font-feature-settings: "tnum"; 
}
.nav-credit-label { 
    font-size: 9px; color: var(--text-tertiary); font-weight: 500; text-transform: uppercase; margin-top: 2px;
}

.nav-plan-badge { 
    font-size: 10px; font-weight: 700; 
    color: #fff; 
    background: var(--accent-black);
    padding: 2px 8px;
    border-radius: 99px;
    text-transform: uppercase;
}

.nav-user-avatar { 
    width: 32px; height: 32px; 
    background: var(--accent-black);
    border-radius: 50%; 
    display: flex; align-items: center; justify-content: center; 
    color: #fff; 
    font-weight: 700; font-size: 12px; 
}

.nav-credit-icon { 
    width: 32px; height: 32px; 
    background: var(--accent-black);
    border-radius: 50%; 
    display: flex; align-items: center; justify-content: center; 
    color: #fff; 
    font-weight: 700; font-size: 12px; 
    text-transform: uppercase;
}


/* --- Dropdown Styles (Clean Light) --- */
.user-dropdown { 
    position: absolute; right: 0; top: calc(100% + 12px); 
    width: 280px; 
    background: #ffffff; 
    border: 1px solid var(--border-light);
    border-radius: 20px; 
    box-shadow: var(--shadow-lg);
    padding: 12px; 
    z-index: 1000; 
    opacity: 0; visibility: hidden; 
    transform: translateY(10px) translateX(10px); 
    transition: var(--transition); 
}

/* Profile Info */
.user-dd-profile-info { 
    padding: 8px 8px 16px 8px; 
    display: flex; flex-direction: column; gap: 4px;
    text-align: left;
}
.user-dd-name { 
    font-size: 16px; font-weight: 600; color: var(--text-primary); 
}
.user-dd-email { 
    font-size: 13px; color: var(--text-tertiary); 
}

/* Stats Row */
.user-dd-header { 
    background: #f4f4f5; /* Zinc-100 */
    border-radius: 12px;
    padding: 12px 16px;
    display: flex; justify-content: space-between; align-items: center; 
    margin-bottom: 12px; 
}
.c-label { 
    font-size: 12px; color: var(--text-secondary); font-weight: 500; 
}
.c-val-row {
    display: flex; align-items: baseline; gap: 4px;
}
.c-limit {
    font-size: 10px; color: var(--text-tertiary); text-transform: uppercase;
}
.c-val { 
    font-size: 16px; font-weight: 700; color: var(--text-primary); font-feature-settings: "tnum";
}

/* Upgrade Button */
.user-dd-progress { padding: 0 4px; margin-bottom: 12px; }
.dd-upgrade-link { 
    display: flex; align-items: center; justify-content: center;
    width: 100%; padding: 12px; 
    background: var(--accent-black);
    border-radius: 12px; 
    color: #ffffff; font-size: 14px; font-weight: 600; 
    text-decoration: none; transition: var(--transition); 
}
.dd-upgrade-link:hover { 
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.user-dd-divider { 
    height: 1px; background: var(--border-light); margin: 8px 0; 
}

/* Dropdown Item */
.user-dd-item { 
    display: flex; align-items: center; gap: 12px; 
    padding: 12px; 
    border-radius: 12px; 
    color: var(--text-secondary); 
    text-decoration: none; font-size: 14px; font-weight: 500;
    transition: 0.2s; 
}
.user-dd-item:hover { 
    background: #f4f4f5; 
    color: var(--text-primary); 
}

/* --- Nav Sign In Button (Light Mode) --- */
.btn-primary-sm {
    background: var(--accent-black); color: #fff; 
    border: none; border-radius: 99px; 
    padding: 0 20px; height: 38px; 
    font-size: 14px; font-weight: 600; 
    cursor: pointer; transition: var(--transition); 
    display: inline-flex; align-items: center; justify-content: center;
}
.btn-primary-sm:hover { 
    background: var(--accent-hover); 
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
