/* ============================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================ */

:root {
    /* ===== COLORS - LIGHT MODE ===== */
    
    /* Backgrounds */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    
    /* Text */
    --text-primary: #212529;
    --text-secondary: #495057;
    --text-muted: #6c757d;
    --text-inverse: #ffffff;
    
    /* Brand/Accent */
    --primary: #007bff;
    --primary-hover: #0056b3;
    --primary-light: #cce5ff;
    --primary-dark: #004085;
    
    --secondary: #6c757d;
    --success: #28a745;
    --success-dark: #1e7e34;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
    
    /* UI Elements */
    --border-color: #dee2e6;
    --border-light: #e9ecef;
    --divider: rgba(0,0,0,0.1);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.15);
    
    /* Interactive States */
    --hover-bg: rgba(0,0,0,0.05);
    --active-bg: rgba(0,0,0,0.1);
    --focus-ring: rgba(0,123,255,0.25);
    
    /* ===== LAYOUT & SPACING ===== */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;
    
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    
    --max-width: 1200px;
    
    /* ===== TYPOGRAPHY ===== */

    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
    
    /* ===== TRANSITIONS ===== */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
}

/* ============================================
   DARK MODE OVERRIDES
   ============================================ */

.darkmode {
    /* Backgrounds */
    --bg-primary: #0f1419;
    --bg-secondary: #1a1f26;
    --bg-tertiary: #242a33;
    
    /* Text */
    --text-primary: #e9ecef;
    --text-secondary: #adb5bd;
    --text-muted: #6c757d;
    --text-inverse: #000000;
    
    /* Brand/Accent */
    --primary: #4da3ff;
    --primary-hover: #70b5ff;
    --primary-light: rgba(77,163,255,0.15);
    --primary-dark: #2d85e8;
    
    --secondary: #868e96;
    --success: #2ecc71;
    --success-dark: #25a25a;
    --danger: #e74c3c;
    --warning: #f39c12;
    --info: #3498db;
    
    /* UI Elements */
    --border-color: #343a40;
    --border-light: #2d3339;
    --divider: rgba(255,255,255,0.1);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.4);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.5);
    
    /* Interactive States */
    --hover-bg: rgba(255,255,255,0.05);
    --active-bg: rgba(255,255,255,0.1);
    --focus-ring: rgba(77,163,255,0.35);
}

/* ============================================
   BASE STYLES
   ============================================ */

/* FIXED: Changed from 50% to 100% for proper font sizing */
html {
    font-size: 100%;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    
    line-height: var(--line-height-normal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--transition-base), 
                color var(--transition-base);
}

/* Global link styles */
a {
    color: var(--primary);
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-hover);
}

/* Selection styles */
::selection {
    background: var(--primary-light);
    color: var(--text-primary);
}

/* ============================================
   NOTIFICATION STYLES (Updated with Variables)
   ============================================ */

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: var(--success);
    color: var(--text-inverse);
    padding: 15px; /* 15px = 0.9375rem, keeping as px for fixed positioning */
    border-radius: 5px; /* 5px = 0.3125rem */
    z-index: 10000;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 250px;
    transition: all var(--transition-base);
}

.notification.error {
    background-color: var(--danger);
}

.notification .fa-times {
    cursor: pointer;
    margin-left: 0.9375rem; /* 15px converted */
}

.notification.fade-out {
    opacity: 0;
    transition: opacity var(--transition-slow) ease-out;
}

/* ============================================
   FORM FIELD STYLES (Updated with Variables)
   ============================================ */

.input-field {
    position: relative;
    margin-bottom: 1.25rem; /* 20px converted: 20/16 = 1.25rem */
}

.input-field input {
    width: 100%;
    padding: 0.625rem 0; /* 10px converted */
    font-size: 1rem; /* 16px = 1rem */
    border: none;
    border-bottom: 1px solid var(--border-color);
    outline: none;
    background: transparent;
    color: var(--text-primary);
    transition: border-color var(--transition-fast);
}

.input-field label {
    position: absolute;
    top: 0.625rem; /* 10px converted */
    left: 0;
    font-size: 1rem; /* 16px = 1rem */
    color: var(--text-muted);
    pointer-events: none;
    transition: var(--transition-base) ease all;
}

.input-field input:focus ~ label,
.input-field input:not(:placeholder-shown) ~ label,
.input-field.focused label {
    top: -0.625rem; /* -10px converted */
    font-size: 0.75rem; /* 12px converted */
    color: var(--primary);
}

.password-field {
    position: relative;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 0.625rem; /* 10px converted */
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.password-toggle:hover {
    color: var(--primary);
}

/* ============================================
   HEADER STYLES (Updated with Variables)
   ============================================ */

.site-header {
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-base);
}

/* Theme toggle button styling */
.theme-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
    padding: 0.5rem;
    border-radius: var(--radius-full);
}

.theme-toggle .theme-icon {
    font-size: 1.25rem; /* 20px = 1.25rem */
}

/* Dark mode icon adjustments */
.darkmode .theme-toggle .fa-moon::before {
    content: "\f185"; /* Sun icon in dark mode */
}

/* Dropdown styles */
.user-dropdown {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

/* Button styles */
.button {
    background-color: var(--primary);
    color: var(--text-inverse);
    border: none;
    padding: 0.625rem 1.25rem; /* 10px 20px converted */
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.button:hover {
    background-color: var(--primary-hover);
}

.primary-button {
    background-color: var(--primary);
}

.danger-button {
    background-color: var(--danger);
}

.danger-button:hover {
    background-color: #c82333;
}

/* ============================================
   MODAL STYLES (Updated with Variables)
   ============================================ */

.auth-overlay {
    background-color: rgba(0, 0, 0, 0.5);
}

.darkmode .auth-overlay {
    background-color: rgba(0, 0, 0, 0.8);
}

.auth-box {
    background-color: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    color: var(--text-primary);
}

.gig-modal-overlay {
    background-color: rgba(0, 0, 0, 0.5);
}

.darkmode .gig-modal-overlay {
    background-color: rgba(0, 0, 0, 0.8);
}

.gig-modal {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.gig-modal-header {
    background: linear-gradient(135deg, var(--primary) 0%, #7209b7 100%);
    color: var(--text-inverse);
}

/* Form feedback */
.form-feedback {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.form-feedback--success {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success);
    border-color: var(--success);
}

.form-feedback--error {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger);
    border-color: var(--danger);
}

/* Input focus states */
input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
    .notification {
        min-width: 200px;
        padding: 0.75rem; /* 12px = 0.75rem */
    }
    
    .input-field {
        margin-bottom: 1rem;
    }
}



    /* --- CSS Variables for Gig Modal --- */
    :root {
        /* Light Mode Colors */
        --gig-modal-overlay-bg: rgba(0, 0, 0, 0.5);
        --gig-modal-bg: #ffffff;
        --gig-modal-header-gradient-start: #4361ee;
        --gig-modal-header-gradient-end: #7209b7;
        --gig-modal-header-text: #ffffff;
        --gig-modal-close-bg: rgba(255, 255, 255, 0.2);
        --gig-modal-close-hover-bg: rgba(255, 255, 255, 0.3);
        --gig-modal-border: #eeeeee;
        --form-label-color: #333333;
        --form-input-border: #e1e5e9;
        --form-input-focus-border: #4361ee;
        --btn-primary-bg: #4361ee;
        --btn-primary-hover-bg: #3a56d4;
        --btn-secondary-bg: #6c757d;
        --btn-secondary-hover-bg: #5a6268;
        --form-feedback-success-bg: #d4edda;
        --form-feedback-success-text: #155724;
        --form-feedback-success-border: #c3e6cb;
        --form-feedback-error-bg: #f8d7da;
        --form-feedback-error-text: #721c24;
        --form-feedback-error-border: #f5c6cb;
        --auth-link-color: #4361ee;
        --auth-link-hover-color: #3a56d4;
        --shadow-color-heavy: rgba(0, 0, 0, 0.3);
        
        /* Sizes (adjusted for new base font-size) */
        --gig-modal-font-size: 0.8rem; /* Was 16px, now 0.8rem (16px/20px) */
        --gig-modal-title-size: 0.75rem; /* Was 1.5rem, divided by 2 */
        --gig-modal-close-size: 1.2rem; /* Was 24px, divided by 2 */
        --gig-modal-close-box: 1.5rem; /* Was 30px, divided by 2 */
        --gig-modal-padding: 1rem; /* Was 20px, divided by 2 */
        --gig-modal-spacing: 0.5rem; /* Was 10px, divided by 2 */
        --gig-modal-input-padding: 0.6rem; /* Was 12px, divided by 2 */
        --gig-modal-button-padding: 0.6rem 1.2rem; /* Was 12px 24px, divided by 2 */
        --gig-modal-border-radius: 0.6rem; /* Was 12px, divided by 2 */
        --gig-modal-border-radius-small: 0.4rem; /* Was 8px, divided by 2 */
    }

    .darkmode {
        /* Dark Mode Colors */
        --gig-modal-overlay-bg: rgba(0, 0, 0, 0.7);
        --gig-modal-bg: #1e1e1e;
        --gig-modal-header-gradient-start: #3a56d4;
        --gig-modal-header-gradient-end: #5a189a;
        --gig-modal-header-text: #ffffff;
        --gig-modal-close-bg: rgba(255, 255, 255, 0.1);
        --gig-modal-close-hover-bg: rgba(255, 255, 255, 0.2);
        --gig-modal-border: #333333;
        --form-label-color: #e0e0e0;
        --form-input-border: #444444;
        --form-input-focus-border: #63a4ff;
        --btn-primary-bg: #3a56d4;
        --btn-primary-hover-bg: #2a46c4;
        --btn-secondary-bg: #5a6268;
        --btn-secondary-hover-bg: #4a5258;
        --form-feedback-success-bg: rgba(212, 237, 218, 0.15);
        --form-feedback-success-text: #d4edda;
        --form-feedback-success-border: rgba(195, 230, 203, 0.3);
        --form-feedback-error-bg: rgba(248, 215, 218, 0.15);
        --form-feedback-error-text: #f8d7da;
        --form-feedback-error-border: rgba(245, 198, 203, 0.3);
        --auth-link-color: #63a4ff;
        --auth-link-hover-color: #3a56d4;
        --shadow-color-heavy: rgba(0, 0, 0, 0.5);
    }

    /* Gig Modal Styles */
    .gig-modal-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: var(--gig-modal-overlay-bg);
        z-index: 10000;
        align-items: center;
        justify-content: center;
    }

    .gig-modal-overlay.active {
        display: flex;
    }

    .gig-modal {
        background: var(--gig-modal-bg);
        border-radius: var(--gig-modal-border-radius);
        width: 90%;
        max-width: 600px;
        max-height: 90vh;
        overflow-y: auto;
        box-shadow: 0 0.5rem 1.5rem var(--shadow-color-heavy); /* Was 10px 30px, divided by 2 */
    }

    .gig-modal-header {
        padding: var(--gig-modal-padding);
        border-bottom: 1px solid var(--gig-modal-border);
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: linear-gradient(135deg, var(--gig-modal-header-gradient-start) 0%, var(--gig-modal-header-gradient-end) 100%);
        color: var(--gig-modal-header-text);
        border-radius: var(--gig-modal-border-radius) var(--gig-modal-border-radius) 0 0;
    }

    .gig-modal-header h3 {
        margin: 0;
        font-size: var(--gig-modal-title-size);
        color: var(--gig-modal-header-text);
    }

    .gig-modal-close {
        font-size: var(--gig-modal-close-size);
        cursor: pointer;
        background: var(--gig-modal-close-bg);
        width: var(--gig-modal-close-box);
        height: var(--gig-modal-close-box);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.3s;
        color: var(--gig-modal-header-text);
    }

    .gig-modal-close:hover {
        background: var(--gig-modal-close-hover-bg);
    }

    .gig-modal-body {
        padding: var(--gig-modal-padding);
    }

    .form-group {
        margin-bottom: 1rem; /* Was 20px, divided by 2 */
    }

    .form-group label {
        display: block;
        margin-bottom: 0.4rem; /* Was 8px, divided by 2 */
        font-weight: 600;
        color: var(--form-label-color);
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        width: 100%;
        padding: var(--gig-modal-input-padding);
        border: 1px solid var(--form-input-border); /* Was 2px, divided by 2 */
        border-radius: var(--gig-modal-border-radius-small);
        font-size: var(--gig-modal-font-size);
        transition: border-color 0.3s;
        background-color: var(--gig-modal-bg);
        color: var(--form-label-color);
    }

    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        border-color: var(--form-input-focus-border);
        outline: none;
    }

    .form-actions {
        display: flex;
        gap: 0.5rem; /* Was 10px, divided by 2 */
        justify-content: flex-end;
        margin-top: 1.5rem; /* Was 30px, divided by 2 */
    }

    .btn-primary {
        background: var(--btn-primary-bg);
        color: var(--gig-modal-header-text);
        border: none;
        padding: var(--gig-modal-button-padding);
        border-radius: var(--gig-modal-border-radius-small);
        cursor: pointer;
        font-size: var(--gig-modal-font-size);
        font-weight: 600;
        transition: background 0.3s;
    }

    .btn-primary:hover {
        background: var(--btn-primary-hover-bg);
    }

    .btn-secondary {
        background: var(--btn-secondary-bg);
        color: var(--gig-modal-header-text);
        border: none;
        padding: var(--gig-modal-button-padding);
        border-radius: var(--gig-modal-border-radius-small);
        cursor: pointer;
        font-size: var(--gig-modal-font-size);
        font-weight: 600;
        transition: background 0.3s;
    }

    .btn-secondary:hover {
        background: var(--btn-secondary-hover-bg);
    }

    /* Form Feedback Styles */
    .form-feedback {
        display: none;
        padding: 0.5rem 0.75rem; /* Was 10px 15px, divided by 2 */
        margin: 0.75rem 0; /* Was 15px, divided by 2 */
        border-radius: var(--gig-modal-border-radius-small);
        font-size: 0.7rem; /* Was 14px, divided by 2 */
        text-align: center;
    }

    .form-feedback--success {
        background-color: var(--form-feedback-success-bg);
        color: var(--form-feedback-success-text);
        border: 1px solid var(--form-feedback-success-border);
    }

    .form-feedback--error {
        background-color: var(--form-feedback-error-bg);
        color: var(--form-feedback-error-text);
        border: 1px solid var(--form-feedback-error-border);
    }

    .auth-footer-links {
        margin-top: 0.75rem; /* Was 15px, divided by 2 */
        text-align: center;
    }

    .auth-footer-links .auth-link {
        color: var(--auth-link-color);
        text-decoration: none;
        font-size: 0.7rem; /* Was 14px, divided by 2 */
        transition: color 0.3s;
    }

    .auth-footer-links .auth-link:hover {
        color: var(--auth-link-hover-color);
        text-decoration: underline;
    }

    @media (max-width: 768px) {
        .gig-modal {
            width: 95%;
            margin: 1rem; /* Was 20px, divided by 2 */
        }
        
        .form-actions {
            flex-direction: column;
        }
        
        .btn-primary,
        .btn-secondary {
            width: 100%;
        }
    }

    /* ============================================
   HEADER SIZING FIXES
   ============================================ */

.site-header {
    height: 60px; /* Fixed height */
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0 20px;
}

.site-header .flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
}

.brand-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.main-nav {
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    height: 100%;
}

.nav-item {
    height: 100%;
    display: flex;
    align-items: center;
    margin: 0 10px;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: background-color var(--transition-fast);
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-link:hover {
    background-color: var(--hover-bg);
}

.action-icons {
    display: flex;
    align-items: center;
    gap: 15px;
    height: 100%;
}

.action-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    cursor: pointer;
    transition: background-color var(--transition-fast);
    color: var(--text-primary);
}

.action-icon:hover {
    background-color: var(--hover-bg);
}

.hamburger-menu {
    display: none;
    font-size: 1.2rem;
    cursor: pointer;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 15px;
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 1001;
}

.user-dropdown.active {
    display: block;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .site-header {
        padding: 0 15px;
        height: 56px;
    }
    
    .hamburger-menu {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .nav-list {
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        align-items: stretch;
        height: auto;
        padding: 20px;
        border-top: 1px solid var(--border-color);
        box-shadow: var(--shadow-md);
        display: none;
        z-index: 1000;
    }
    
    .nav-list.active {
        display: flex;
    }
    
    .nav-item {
        height: auto;
        margin: 5px 0;
    }
    
    .nav-link {
        height: 44px;
        padding: 0 15px;
    }
    
    .brand-logo {
        font-size: 1.3rem;
    }
}

/* Theme toggle button fix */
.theme-toggle {
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}
