/**
 * Header Styles
 * 
 * @package TorrentBlog
 * @version 1.0.0
 */

/* ═══════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════ */

.site-header {
    background-color: var(--color-bg-secondary);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

/* ═══════════════════════════════════════════════════════════════
   LOGO
   ═══════════════════════════════════════════════════════════════ */

.site-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    text-decoration: none;
}

.site-logo .logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xl);
    flex-shrink: 0;
}

.site-logo .logo-text {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-text);
}

/* ═══════════════════════════════════════════════════════════════
   DESKTOP NAVIGATION
   ═══════════════════════════════════════════════════════════════ */

.main-nav {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu > li {
    position: relative;
    list-style: none;
}

.nav-menu > li > a {
    color: var(--color-text-secondary);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    text-decoration: none;
    display: block;
}

.nav-menu > li > a:hover,
.nav-menu > li > a.active {
    color: var(--color-text);
    background-color: var(--color-bg-tertiary);
}

/* ═══════════════════════════════════════════════════════════════
   HEADER BUTTONS
   ═══════════════════════════════════════════════════════════════ */

.header-buttons {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

/* ═══════════════════════════════════════════════════════════════
   NAVIGATION DROPDOWNS
   ═══════════════════════════════════════════════════════════════ */

/* Dropdown Container */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

/* Dropdown Toggle Button */
.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--color-text-secondary);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    cursor: pointer;
    background: transparent;
    border: none;
    font-size: inherit;
    font-family: inherit;
    line-height: inherit;
}

.nav-dropdown-toggle:hover,
.nav-dropdown.active .nav-dropdown-toggle {
    color: var(--color-text);
    background-color: var(--color-bg-tertiary);
}

/* Dropdown Arrow */
.nav-dropdown-arrow {
    font-size: 10px;
    transition: transform var(--transition-fast);
    display: inline-block;
}

.nav-dropdown.active .nav-dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu - HIDDEN BY DEFAULT */
.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 200px;
    max-height: 400px;
    overflow-y: auto;
    background-color: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1001;
    padding: 8px 0;
    display: block;
}

/* Dropdown Menu - VISIBLE STATE */
.nav-dropdown.active .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Dropdown Menu Items */
.nav-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 10px 16px;
    color: var(--color-text-secondary);
    transition: all var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active {
    color: var(--color-text);
    background-color: var(--color-bg-tertiary);
}

.nav-dropdown-menu .dropdown-icon {
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.nav-dropdown-menu .count {
    margin-left: auto;
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

/* ═══════════════════════════════════════════════════════════════
   PROFILE DROPDOWN
   ═══════════════════════════════════════════════════════════════ */

/* Profile Dropdown - Right Aligned */
.nav-dropdown.profile-dropdown {
    position: relative;
}

.nav-dropdown.profile-dropdown .nav-dropdown-menu {
    left: auto;
    right: 0;
    min-width: 220px;
}

/* Profile Toggle Button */
.profile-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 6px 12px;
    background-color: var(--color-bg-tertiary);
    border-radius: var(--radius-md);
    color: var(--color-text);
    cursor: pointer;
    border: none;
    font-size: inherit;
    font-family: inherit;
    transition: all var(--transition-fast);
    line-height: 1.4;
}

.profile-dropdown-toggle:hover {
    background-color: var(--color-border-light);
}

/* Profile Avatar */
.profile-avatar {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    max-width: 28px;
    max-height: 28px;
    background-color: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
    overflow: hidden;
    flex-shrink: 0;
    line-height: 1;
}

/* Ensure emoji/icon inside avatar is sized correctly */
.profile-avatar img,
.profile-avatar svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Profile Dropdown Menu */
.profile-dropdown-menu {
    min-width: 220px;
}

.profile-dropdown-menu .user-info {
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 8px;
}

.profile-dropdown-menu .user-info .user-name {
    font-weight: 600;
    color: var(--color-text);
    font-size: var(--font-size-base);
}

.profile-dropdown-menu .user-info .user-role {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-top: 2px;
}

.profile-dropdown-menu .dropdown-divider {
    height: 1px;
    background-color: var(--color-border);
    margin: 8px 0;
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE MENU TOGGLE
   ═══════════════════════════════════════════════════════════════ */

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-text);
    font-size: var(--font-size-2xl);
    cursor: pointer;
    padding: var(--spacing-sm);
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE MENU
   ═══════════════════════════════════════════════════════════════ */

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-bg);
    z-index: 2000;
    flex-direction: column;
    padding: var(--spacing-lg);
    overflow-y: auto;
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--color-border);
}

.mobile-menu-close {
    background: none;
    border: none;
    color: var(--color-text);
    font-size: var(--font-size-2xl);
    cursor: pointer;
    padding: var(--spacing-sm);
}

.mobile-nav-menu {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.mobile-nav-menu a {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    color: var(--color-text);
    background-color: var(--color-bg-secondary);
    border-radius: var(--radius-md);
    font-size: var(--font-size-lg);
    text-decoration: none;
}

.mobile-nav-menu a:hover,
.mobile-nav-menu a.active {
    background-color: var(--color-bg-tertiary);
}

.mobile-menu-divider {
    height: 1px;
    background-color: var(--color-border);
    margin: var(--spacing-lg) 0;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE - HEADER
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }

    .header-buttons {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }
}

@media (max-width: 480px) {
    .site-logo .logo-text {
        font-size: var(--font-size-lg);
    }

    .site-logo .logo-icon {
        width: 32px;
        height: 32px;
        font-size: var(--font-size-lg);
    }
}
/* ==========================================
   PROFILE DROPDOWN - ENHANCED DESIGN
   ========================================== */

/* Dropdown Container */
.profile-dropdown {
    position: relative;
}

/* Toggle Button */
.profile-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #fff;
}

.profile-dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.profile-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #6366f1;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-toggle-name {
    font-size: 14px;
    font-weight: 500;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-dropdown-arrow {
    font-size: 10px;
    opacity: 0.7;
    transition: transform 0.3s ease;
}

.profile-dropdown.active .nav-dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.profile-dropdown-menu.enhanced-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    background: linear-gradient(165deg, #1e2337 0%, #151929 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.98);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow: hidden;
}

.profile-dropdown.active .profile-dropdown-menu.enhanced-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* User Header Section */
.dropdown-user-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dropdown-avatar {
    flex-shrink: 0;
    position: relative;
}

.dropdown-avatar img {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    border: 2px solid rgba(99, 102, 241, 0.5);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

/* Online Status Indicator */
.dropdown-avatar::after {
    content: '';
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    background: #22c55e;
    border: 3px solid #1e2337;
    border-radius: 50%;
}

.dropdown-user-info {
    flex: 1;
    min-width: 0;
    padding-top: 2px;
}

.dropdown-user-name {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
    line-height: 1.3;
}

.dropdown-username {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 10px;
}

/* User Badges */
.dropdown-user-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.dropdown-user-badges .user-badge,
.dropdown-user-badges .badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.dropdown-user-badges .badge-admin {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.dropdown-user-badges .badge-member {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.dropdown-user-badges .badge-vip {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.dropdown-user-badges .badge-uploader {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.4);
}

/* Stats Grid */
.dropdown-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 0;
}

.dropdown-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 10px;
    background: #1a1f35;
    text-align: center;
    transition: background 0.2s ease;
}

.dropdown-stat-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.dropdown-stat-item .stat-value {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 4px;
}

.dropdown-stat-item .stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 500;
}

/* Ratio Colors */
.dropdown-stat-item.ratio-stat .stat-value {
    color: #ef4444; /* Default red for low ratio */
}

.dropdown-stat-item.ratio-stat.ratio-good .stat-value,
.dropdown-stat-item.ratio-stat.good .stat-value {
    color: #22c55e;
}

.dropdown-stat-item.ratio-stat.ratio-warning .stat-value,
.dropdown-stat-item.ratio-stat.warning .stat-value {
    color: #f59e0b;
}

.dropdown-stat-item.ratio-stat.ratio-danger .stat-value,
.dropdown-stat-item.ratio-stat.danger .stat-value {
    color: #ef4444;
}

.dropdown-stat-item.upload-stat .stat-value {
    color: #22c55e;
}

.dropdown-stat-item.download-stat .stat-value {
    color: #ef4444;
}

/* Quick Stats Row */
.dropdown-quick-stats {
    display: flex;
    justify-content: space-around;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.quick-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.2s ease;
}

.quick-stat:hover {
    color: rgba(255, 255, 255, 0.9);
}

.quick-stat svg {
    opacity: 0.7;
    flex-shrink: 0;
}

/* Menu Links */
.dropdown-menu-links {
    padding: 8px 0;
}

.dropdown-menu-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.dropdown-menu-links a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: linear-gradient(180deg, #6366f1, #8b5cf6);
    border-radius: 0 2px 2px 0;
    transition: height 0.2s ease;
}

.dropdown-menu-links a:hover {
    background: rgba(99, 102, 241, 0.1);
    color: #fff;
}

.dropdown-menu-links a:hover::before {
    height: 24px;
}

.dropdown-menu-links a svg {
    width: 18px;
    height: 18px;
    opacity: 0.6;
    flex-shrink: 0;
    transition: opacity 0.2s ease;
}

.dropdown-menu-links a:hover svg {
    opacity: 1;
}

.menu-count {
    margin-left: auto;
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.dropdown-menu-links a:hover .menu-count {
    background: rgba(99, 102, 241, 0.3);
    color: #c7d2fe;
}

/* Divider */
.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 8px 20px;
}

/* Logout Section */
.dropdown-logout {
    padding: 8px 0 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 4px;
}

.logout-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #ef4444 !important;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.logout-link:hover {
    background: rgba(239, 68, 68, 0.1);
}

.logout-link svg {
    width: 18px;
    height: 18px;
    opacity: 0.8;
}

/* Hide duplicate logout button if exists */
.header-buttons > .btn-outline[href*="logout"] {
    display: none;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

@media (max-width: 768px) {
    .profile-dropdown-menu.enhanced-dropdown {
        width: 290px;
        right: -10px;
    }
    
    .profile-toggle-name {
        display: none;
    }
    
    .dropdown-user-header {
        padding: 16px;
    }
    
    .dropdown-avatar img {
        width: 48px;
        height: 48px;
    }
    
    .dropdown-stat-item {
        padding: 12px 8px;
    }
    
    .dropdown-stat-item .stat-value {
        font-size: 16px;
    }
    
    .quick-stat span {
        display: none;
    }
    
    .dropdown-quick-stats {
        justify-content: center;
        gap: 30px;
    }
}

/* ==========================================
   ANIMATIONS
   ========================================== */

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.dropdown-user-badges .badge {
    position: relative;
    overflow: hidden;
}

.dropdown-user-badges .badge::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: shimmer 3s infinite;
}

/* ═══════════════════════════════════════════════════════════════
   AUTH MODALS (Login/Register)
   ═══════════════════════════════════════════════════════════════ */

.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.auth-modal.active {
    opacity: 1;
    visibility: visible;
}

.auth-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.auth-modal-container {
    position: relative;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg, 12px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: translateY(-20px) scale(0.95);
    transition: transform 0.3s ease;
}

.auth-modal.active .auth-modal-container {
    transform: translateY(0) scale(1);
}

.auth-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
    z-index: 10;
}

.auth-modal-close:hover {
    background: var(--color-danger, #ef4444);
    border-color: var(--color-danger, #ef4444);
    color: #fff;
}

.auth-modal-close svg {
    width: 16px;
    height: 16px;
}

/* Modal Header */
.auth-modal-header {
    text-align: center;
    padding: 32px 24px 24px;
}

.auth-modal-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark, #2563eb));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-modal-icon svg {
    width: 32px;
    height: 32px;
    color: #fff;
}

.auth-modal-icon.register-icon {
    background: linear-gradient(135deg, var(--color-success, #22c55e), #16a34a);
}

.auth-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 8px;
}

.auth-modal-subtitle {
    font-size: 14px;
    color: var(--color-text-muted);
    margin: 0;
}

/* Form Body */
.auth-form-body {
    padding: 0 24px;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form .form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 8px;
}

.auth-form .form-label svg {
    width: 16px;
    height: 16px;
    opacity: 0.6;
}

.auth-form .form-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md, 8px);
    color: var(--color-text);
    font-size: 14px;
    transition: all 0.15s ease;
}

.auth-form .form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.auth-form .form-input::placeholder {
    color: var(--color-text-muted);
}

.auth-form .form-hint {
    display: block;
    font-size: 11px;
    color: var(--color-text-muted);
    margin-top: 6px;
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
}

.password-input-wrapper .form-input {
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: var(--color-text);
}

.password-toggle svg {
    width: 20px;
    height: 20px;
}

.password-toggle .hidden {
    display: none;
}

/* Password Strength */
.password-strength {
    margin-top: 8px;
}

.password-strength .strength-bar {
    height: 4px;
    background: var(--color-bg-tertiary);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
}

.password-strength .strength-bar span {
    display: block;
    height: 100%;
    width: 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.password-strength.weak .strength-bar span {
    width: 25%;
    background: var(--color-danger, #ef4444);
}

.password-strength.fair .strength-bar span {
    width: 50%;
    background: var(--color-warning, #f59e0b);
}

.password-strength.good .strength-bar span {
    width: 75%;
    background: var(--color-primary, #3b82f6);
}

.password-strength.strong .strength-bar span {
    width: 100%;
    background: var(--color-success, #22c55e);
}

.password-strength .strength-text {
    font-size: 11px;
    color: var(--color-text-muted);
}

/* Form Row */
.auth-form .form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--color-text-secondary);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 2px solid var(--color-border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    margin-top: 1px;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-label a {
    color: var(--color-primary);
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* Forgot Password Link */
.forgot-password-link {
    font-size: 13px;
    color: var(--color-primary);
    text-decoration: none;
}

.forgot-password-link:hover {
    text-decoration: underline;
}

/* Form Message */
.form-message {
    padding: 12px 16px;
    border-radius: var(--radius-md, 8px);
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
}

.form-message.error {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--color-danger, #ef4444);
}

.form-message.success {
    display: block;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--color-success, #22c55e);
}

/* Form Footer */
.auth-form-footer {
    padding: 20px 24px;
}

.btn-block {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
}

.btn-block svg {
    width: 20px;
    height: 20px;
}

.btn-block .btn-loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-block .btn-loading .spinner {
    width: 18px;
    height: 18px;
}

.btn-block .hidden {
    display: none;
}

.btn-block.loading .btn-text {
    display: none;
}

.btn-block.loading .btn-loading {
    display: flex;
}

/* Modal Divider */
.auth-modal-divider {
    position: relative;
    text-align: center;
    padding: 0 24px;
    margin: 8px 0;
}

.auth-modal-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 24px;
    right: 24px;
    height: 1px;
    background: var(--color-border);
}

.auth-modal-divider span {
    position: relative;
    background: var(--color-bg-secondary);
    padding: 0 16px;
    font-size: 12px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Modal Switch */
.auth-modal-switch {
    text-align: center;
    padding: 20px 24px;
    font-size: 14px;
    color: var(--color-text-muted);
    border-top: 1px solid var(--color-border);
    background: var(--color-bg-tertiary);
}

.switch-modal-btn {
    background: none;
    border: none;
    color: var(--color-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-left: 4px;
}

.switch-modal-btn:hover {
    text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE - AUTH MODALS
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
    .auth-modal {
        padding: 0;
        align-items: flex-end;
    }
    
    .auth-modal-container {
        max-width: 100%;
        max-height: 95vh;
        border-radius: var(--radius-lg, 12px) var(--radius-lg, 12px) 0 0;
    }
    
    .auth-modal.active .auth-modal-container {
        transform: translateY(0);
    }
    
    .auth-modal-header {
        padding: 24px 20px 20px;
    }
    
    .auth-modal-icon {
        width: 56px;
        height: 56px;
    }
    
    .auth-modal-icon svg {
        width: 28px;
        height: 28px;
    }
    
    .auth-modal-title {
        font-size: 20px;
    }
    
    .auth-form-body {
        padding: 0 20px;
    }
    
    .auth-form-footer {
        padding: 16px 20px;
    }
    
    .auth-modal-switch {
        padding: 16px 20px;
    }
    
    /* Enhanced dropdown responsive */
    .profile-dropdown-menu.enhanced-dropdown {
        min-width: 280px;
    }
    
    .dropdown-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .dropdown-stat-item .stat-value {
        font-size: 13px;
    }
}

/* Forgot Password Icon */
.auth-modal-icon.forgot-icon {
    background: linear-gradient(135deg, var(--color-warning, #f59e0b), #d97706);
}

/* ═══════════════════════════════════════════════════════════════
   LOGIN/REGISTER BUTTONS - CLEAN STYLE
   ═══════════════════════════════════════════════════════════════ */

.header-buttons .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-md, 8px);
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

/* Login Button - Outline/Secondary Style */
.header-buttons .btn-secondary,
.header-buttons #headerLoginBtn {
    background: transparent;
    color: var(--color-text-secondary, #a0aec0);
    border: 1px solid var(--color-border, #2d3a4f);
}

.header-buttons .btn-secondary:hover,
.header-buttons #headerLoginBtn:hover {
    background: var(--color-bg-tertiary, #1e293b);
    color: var(--color-text, #e2e8f0);
    border-color: var(--color-text-muted, #64748b);
}

/* Register Button - Primary Style */
.header-buttons .btn-primary,
.header-buttons #headerRegisterBtn {
    background: var(--color-primary, #3b82f6);
    color: #ffffff;
    border: 1px solid var(--color-primary, #3b82f6);
}

.header-buttons .btn-primary:hover,
.header-buttons #headerRegisterBtn:hover {
    background: var(--color-primary-dark, #2563eb);
    border-color: var(--color-primary-dark, #2563eb);
}

/* ═══════════════════════════════════════════════════════════════
   AUTH MODALS - DYNAMIC HEIGHT FIX
   ═══════════════════════════════════════════════════════════════ */

.auth-modal-container {
    max-height: 95vh;
    max-height: calc(100vh - 40px);
    height: auto !important;
    overflow-y: auto;
    overflow-x: hidden;
}

.auth-form-body {
    max-height: none !important;
    overflow: visible !important;
}

/* Scrollbar Styling for Modal */
.auth-modal-container::-webkit-scrollbar {
    width: 6px;
}

.auth-modal-container::-webkit-scrollbar-track {
    background: var(--color-bg-tertiary, #1e293b);
    border-radius: 3px;
}

.auth-modal-container::-webkit-scrollbar-thumb {
    background: var(--color-border, #334155);
    border-radius: 3px;
}

.auth-modal-container::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-muted, #64748b);
}

/* Register Modal Specific - More Compact */
#registerModal .auth-modal-container {
    max-width: 440px;
}

#registerModal .auth-modal-header {
    padding: 24px 24px 16px;
}

#registerModal .auth-modal-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 12px;
}

#registerModal .auth-modal-icon svg {
    width: 28px;
    height: 28px;
}

#registerModal .auth-modal-title {
    font-size: 22px;
    margin-bottom: 4px;
}

#registerModal .auth-modal-subtitle {
    font-size: 13px;
}

#registerModal .form-group {
    margin-bottom: 16px;
}

#registerModal .form-label {
    font-size: 12px;
    margin-bottom: 6px;
}

#registerModal .form-input {
    padding: 10px 14px;
    font-size: 14px;
}

#registerModal .form-hint {
    font-size: 10px;
    margin-top: 4px;
}

#registerModal .auth-form-footer {
    padding: 16px 24px;
}

#registerModal .auth-modal-switch {
    padding: 14px 24px;
}

/* ═══════════════════════════════════════════════════════════════
   FORGOT PASSWORD LINK - REMOVE BORDER
   ═══════════════════════════════════════════════════════════════ */

.forgot-password-link {
    background: none !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-primary, #3b82f6);
    cursor: pointer;
    text-decoration: none;
    display: inline;
}

.forgot-password-link:hover {
    color: var(--color-primary-dark, #2563eb);
    text-decoration: underline;
}

.forgot-password-link:focus {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

/* ═══════════════════════════════════════════════════════════════
   LOGOUT BUTTON FIXES
   ═══════════════════════════════════════════════════════════════ */

/* Logout Section inside Dropdown */
.dropdown-logout {
    padding: 8px 12px 12px;
    border-top: 1px solid var(--color-border);
    background: var(--color-bg-tertiary);
    display: block !important; /* Ensure it's visible */
}

.dropdown-logout .logout-link {
    display: flex !important; /* Ensure it's visible */
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    color: #ef4444;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 14px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.dropdown-logout .logout-link:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.dropdown-logout .logout-link svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Standalone Logout Button (outside dropdown) */
.header-buttons > .btn-outline[href*="logout"],
.header-buttons > a.btn-outline {
    display: inline-flex !important; /* Make sure it's visible */
    align-items: center;
    padding: 8px 16px;
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    background: transparent;
}

.header-buttons > .btn-outline[href*="logout"]:hover,
.header-buttons > a.btn-outline:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.5);
    color: #f87171;
}

/* ═══════════════════════════════════════════════════════════════
   SHOW BOTH LOGOUT OPTIONS
   ═══════════════════════════════════════════════════════════════ */

/* Dropdown Logout - Full width button style */
.dropdown-logout {
    padding: 8px 12px 12px;
    border-top: 1px solid var(--color-border);
    background: var(--color-bg-tertiary);
    display: block;
}

.dropdown-logout .logout-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 14px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: none;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.dropdown-logout .logout-link:hover {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.dropdown-logout .logout-link svg {
    width: 18px;
    height: 18px;
}

/* Header Logout Button - Outline style */
.header-buttons > a.btn-outline,
.header-buttons > .btn.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    color: var(--color-text-secondary, #9ca3af);
    border: 1px solid var(--color-border, rgba(255,255,255,0.1));
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    background: transparent;
    margin-left: 8px;
}

.header-buttons > a.btn-outline:hover,
.header-buttons > .btn.btn-outline:hover {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.1);
}

