/* =============================================
   AapkaLove — Premium Minimal Header
   Apple-Inspired · Refined · Professional
   ============================================= */

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

:root {
    --al-nav-h: 70px;
    --al-nav-h-mobile: 64px;
    --al-nav-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --al-nav-accent: #E0217A;
    --al-nav-text: #000000;
    --al-nav-muted: #666666;
    --al-nav-bg: rgba(255, 255, 255, 0.98);
    --al-nav-border: rgba(0, 0, 0, 0.04);
    --al-nav-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    --al-nav-blur: 10px;
    --al-transition: 150ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

body {
    padding-top: 0 !important;
}

/* ── Header Shell ─────────────────────────────── */
.al-header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--al-nav-h);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    transition: background var(--al-transition), box-shadow var(--al-transition), border-color var(--al-transition);
}

.al-header-container {
    width: 100%;
    max-width: 1280px;
    height: 100%;
    padding: 0 32px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 32px;
}

/* ── Left: Logo & Status ─────────────────────── */
.al-navbar-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

.al-logo {
    font-family: var(--al-nav-font);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--al-nav-text) !important;
    text-decoration: none !important;
    letter-spacing: -0.05em;
    white-space: nowrap;
    transition: opacity var(--al-transition);
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
}

.al-logo:hover { opacity: 0.8; }

.al-logo-accent {
    color: var(--al-nav-accent);
}

.al-header-divider {
    width: 1px;
    height: 20px;
    background: rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.al-header-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--al-nav-font);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #888888;
    white-space: nowrap;
    user-select: none;
}

.al-live-dot {
    width: 6px;
    height: 6px;
    background: var(--al-nav-accent);
    border-radius: 50%;
    flex-shrink: 0;
    animation: al-live-pulse 2s ease-in-out infinite;
}

@keyframes al-live-pulse {
    0% { transform: scale(0.9); opacity: 0.6; box-shadow: 0 0 0 0 rgba(224, 33, 122, 0.4); }
    50% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 4px rgba(224, 33, 122, 0); }
    100% { transform: scale(0.9); opacity: 0.6; box-shadow: 0 0 0 0 rgba(224, 33, 122, 0); }
}

/* ── Center Nav ──────────────────────────────── */
.al-navbar-center {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.al-header-links {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 6px;
    height: 100%;
}

.al-header-links li {
    margin: 0;
    padding: 0;
    height: 100%;
    display: flex;
    align-items: center;
}

.al-header-links a {
    font-family: var(--al-nav-font);
    font-size: 0.95rem;
    font-weight: 500;
    color: #444444 !important;
    text-decoration: none !important;
    padding: 6px 14px;
    border-radius: 8px;
    transition: all 150ms ease;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    letter-spacing: -0.01em;
    position: relative;
}

.al-header-links a:hover {
    color: var(--al-nav-text) !important;
    background: rgba(0, 0, 0, 0.04);
}

.al-header-links a:active {
    background: rgba(0, 0, 0, 0.06);
}

/* Active state */
.al-header-links a.al-active {
    color: var(--al-nav-accent) !important;
    font-weight: 600;
    background: transparent;
}
.al-header-links a.al-active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 3px;
    border-radius: 2px;
    background: var(--al-nav-accent);
}

/* ── Right Actions ───────────────────────────── */
.al-navbar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

/* Search */
.al-header-search {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--al-nav-font);
    font-size: 0.95rem;
    font-weight: 500;
    color: #444444 !important;
    text-decoration: none !important;
    padding: 6px 12px;
    border-radius: 8px;
    background: transparent;
    white-space: nowrap;
    transition: all var(--al-transition);
    -webkit-tap-highlight-color: transparent;
    letter-spacing: -0.01em;
}

.al-header-search:hover {
    color: var(--al-nav-text) !important;
    background: rgba(0, 0, 0, 0.04);
}

.al-header-search:active {
    transform: translateY(1px);
    background: rgba(0, 0, 0, 0.06);
}

.al-header-search svg {
    width: 18px;
    height: 18px;
}

/* Notifications */
.al-header-notifications {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--al-nav-muted);
    cursor: pointer;
    background: transparent;
    border: none;
    transition: all var(--al-transition);
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.al-header-notifications:hover {
    color: var(--al-nav-accent);
    background: rgba(0, 0, 0, 0.04);
}

.al-header-notifications:active {
    transform: translateY(1px);
    background: rgba(0, 0, 0, 0.06);
}

.al-header-notifications svg {
    width: 18px;
    height: 18px;
}

.al-nav-notif-badge {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 6px;
    height: 6px;
    background: var(--al-nav-accent);
    border-radius: 50%;
    font-size: 0;
    box-shadow: 0 0 0 2px var(--al-nav-bg);
}

/* Notification dropdown */
.al-notif-dropdown {
    position: absolute;
    top: calc(100% + 14px);
    right: -10px;
    width: 340px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.03);
    opacity: 0;
    visibility: hidden;
    transform-origin: top right;
    transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 1000;
}

.al-header-notifications.is-open .al-notif-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.al-notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.al-notif-header h4 {
    margin: 0;
    font-family: var(--al-nav-font);
    font-size: 1rem;
    font-weight: 600;
    color: var(--al-nav-text);
    letter-spacing: -0.01em;
}

.al-notif-mark-read {
    background: none;
    border: none;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--al-nav-accent);
    cursor: pointer;
    padding: 0;
    transition: opacity var(--al-transition);
}

.al-notif-mark-read:hover { opacity: 0.7; }

.al-notif-footer {
    display: block;
    text-align: center;
    padding: 14px;
    background: #fafafa;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 0 0 16px 16px;
    font-family: var(--al-nav-font);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none !important;
    color: var(--al-nav-muted) !important;
    transition: color var(--al-transition), background var(--al-transition);
}

.al-notif-footer:hover { 
    color: var(--al-nav-text) !important;
    background: #f0f0f0;
}

/* LovePoints wallet chip */
.al-header-lp {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 100px;
    text-decoration: none !important;
    color: var(--al-nav-text) !important;
    font-family: var(--al-nav-font);
    font-size: 0.9rem;
    font-weight: 600;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    transition: all var(--al-transition);
    white-space: nowrap;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.al-lp-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--al-nav-accent);
    flex-shrink: 0;
}

.al-lp-icon svg {
    width: 14px;
    height: 14px;
}

.al-lp-amount {
    font-weight: 600;
    color: var(--al-nav-text);
    letter-spacing: -0.01em;
}

.al-lp-label {
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--al-nav-muted);
}

.al-header-lp:hover {
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    background: #fafafa;
    transform: translateY(-1px);
}

.al-header-lp:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

/* Profile */
.al-header-profile {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    border-radius: 100px;
    text-decoration: none !important;
    color: var(--al-nav-text) !important;
    font-family: var(--al-nav-font);
    font-size: 0.95rem;
    font-weight: 500;
    background: transparent;
    transition: all var(--al-transition);
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    letter-spacing: -0.01em;
}

.al-header-profile:hover {
    background: rgba(0, 0, 0, 0.04);
}

.al-header-profile:active {
    background: rgba(0, 0, 0, 0.06);
}

.al-header-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
}

.al-header-profile-name {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.al-header-chevron {
    color: var(--al-nav-muted);
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    transition: transform var(--al-transition);
}

.al-header-profile:hover .al-header-chevron {
    color: var(--al-nav-text);
}

/* Auth CTA for guests & Create Poll CTA */
.al-header-login {
    font-family: var(--al-nav-font);
    font-size: 0.95rem;
    font-weight: 500;
    color: #444444 !important;
    text-decoration: none !important;
    padding: 8px 12px;
    border-radius: 8px;
    transition: color var(--al-transition), background var(--al-transition);
    -webkit-tap-highlight-color: transparent;
    letter-spacing: -0.01em;
}

.al-header-login:hover {
    color: var(--al-nav-text) !important;
    background: rgba(0, 0, 0, 0.04);
}

.al-header-login:active {
    background: rgba(0, 0, 0, 0.06);
}

.al-header-create {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    background: var(--al-nav-accent);
    color: #ffffff !important;
    padding: 8px 18px;
    font-family: var(--al-nav-font);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 100px;
    text-decoration: none !important;
    letter-spacing: 0.01em;
    transition: all var(--al-transition);
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 2px 6px rgba(224, 33, 122, 0.2);
    white-space: nowrap;
}

.al-header-create:hover {
    background: #c01c68;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(224, 33, 122, 0.3);
}

.al-header-create:active {
    transform: translateY(1px);
    box-shadow: 0 1px 3px rgba(224, 33, 122, 0.15);
}

/* Hamburger */
.al-header-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--al-nav-text);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: background var(--al-transition);
    -webkit-tap-highlight-color: transparent;
    width: 44px;
    height: 44px;
}

.al-header-menu-btn:hover {
    background: rgba(0, 0, 0, 0.04);
}

.al-header-menu-btn:active {
    background: rgba(0, 0, 0, 0.06);
}

.al-header-menu-btn svg {
    width: 20px;
    height: 20px;
}

/* ── Mobile Dropdown Menu ───────────────────────────── */
.al-mobile-menu {
    display: flex;
    position: absolute;
    top: calc(var(--al-nav-h-mobile) + 8px);
    right: 16px;
    width: min(320px, 85vw);
    background: #ffffff;
    z-index: 9998;
    padding: 24px 20px 24px;
    border-radius: 20px;
    flex-direction: column;
    gap: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px) scale(0.98);
    transform-origin: top right;
    transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 2px 10px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.al-mobile-menu.is-open {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0) scale(1);
}

.al-mobile-header-text {
    font-family: var(--al-nav-font);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--al-nav-muted);
    margin: 0 0 28px 0;
    letter-spacing: 0.02em;
}

.al-mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.al-mobile-nav a {
    font-family: var(--al-nav-font);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--al-nav-text) !important;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    transition: color var(--al-transition), background var(--al-transition);
    -webkit-tap-highlight-color: transparent;
    letter-spacing: -0.02em;
}

.al-mobile-nav a:hover,
.al-mobile-nav a.al-active {
    color: var(--al-nav-accent) !important;
    background: rgba(224, 33, 122, 0.04);
}

.al-mobile-nav a svg {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    opacity: 0.7;
    transition: opacity var(--al-transition), color var(--al-transition);
}

.al-mobile-nav a.al-active svg,
.al-mobile-nav a:hover svg {
    opacity: 1;
    color: var(--al-nav-accent);
}

.al-mobile-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.05);
    margin: 24px 0;
}

.al-mobile-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.al-mobile-actions .al-btn-cta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    background: var(--al-nav-accent);
    color: #ffffff !important;
    padding: 12px 20px;
    font-family: var(--al-nav-font);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 100px;
    text-decoration: none !important;
    letter-spacing: 0.01em;
    transition: background var(--al-transition), transform var(--al-transition), box-shadow var(--al-transition);
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 4px 12px rgba(224, 33, 122, 0.25);
}

.al-mobile-actions .al-btn-cta:hover {
    background: #c01c68;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(224, 33, 122, 0.35);
}

.al-mobile-actions .al-btn-cta:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(224, 33, 122, 0.2);
}

.al-mobile-actions .al-btn-signin {
    display: flex;
    align-items: center;
    color: var(--al-nav-text) !important;
    text-decoration: none !important;
    font-family: var(--al-nav-font);
    font-size: 1rem;
    font-weight: 500;
    padding: 16px 20px;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: #ffffff;
    gap: 12px;
    transition: background var(--al-transition), border-color var(--al-transition);
    -webkit-tap-highlight-color: transparent;
}

.al-mobile-actions .al-btn-signin:hover {
    background: #fafafa;
    border-color: rgba(0, 0, 0, 0.12);
}

.al-mobile-actions .al-btn-signin:active {
    background: #f0f0f0;
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 1100px) {
    .al-header-status { display: none; }
    .al-header-divider { display: none; }
    .al-header-container { gap: 20px; }
}

@media (max-width: 900px) {
    .al-header { height: var(--al-nav-h-mobile); }
    .al-header-container {
        grid-template-columns: 1fr auto;
        padding: 0 16px;
        gap: 0;
    }
    .al-navbar-center { display: none; }
    .al-header-search span { display: none; }
    .al-header-search { padding: 8px; border-radius: 50%; width: 36px; height: 36px; justify-content: center; background: rgba(0,0,0,0.04); }
    .al-header-search svg { margin: 0; }
    .al-header-create { padding: 8px 12px; font-size: 0.85rem; border-radius: 8px; }
    .al-header-create svg { display: none; }
    .al-header-login { display: none; }
    .al-header-notifications { display: none; }
    .al-header-lp { display: none; }
    .al-header-profile-dropdown { display: none; }
    .al-header-menu-btn { display: flex; }
    .al-navbar-right { gap: 10px; }
}

@media (max-width: 480px) {
    .al-header-container { padding: 0 16px; }
    .al-navbar-right { gap: 8px; }
    .al-header-create { padding: 6px 10px; font-size: 0.8rem; }
}

/* User Profile Dropdown */
.al-header-profile-dropdown {
    position: relative;
}

.al-user-dropdown-menu {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 8px;
    min-width: 200px;
    margin-top: 10px;
    animation: al-fade-in-up 200ms ease forwards;
    background: #ffffff;
    z-index: 1000;
}

@keyframes al-fade-in-up {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.al-user-dropdown-menu .dropdown-item {
    font-family: var(--al-nav-font);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--al-nav-text);
    padding: 8px 16px;
    border-radius: 8px;
    transition: background 150ms ease, color 150ms ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.al-user-dropdown-menu .dropdown-item:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--al-nav-accent);
}

.al-user-dropdown-menu .dropdown-item.text-danger:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545 !important;
}

.al-user-dropdown-menu .dropdown-divider {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    margin: 8px 0;
}

