body {
    background: #090A0F;
    background: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%);
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
    color: #E0E0E0;
    font-family: 'Inter', sans-serif;
    margin: 0;
}

#star-field {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    pointer-events: none;
}

@keyframes twinkle {
    0%, 100% { opacity: var(--star-opacity-min, 0.3); }
    50% { opacity: var(--star-opacity-max, 1); }
}

.glass-card {
    background: rgba(15, 15, 25, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.neon-text {
    text-shadow: 0 0 10px rgba(0, 162, 255, 0.5);
}

.glow-button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glow-button:hover {
    box-shadow: 0 0 25px rgba(0, 162, 255, 0.4);
    transform: translateY(-2px);
}

/* Global Form Elements */
input[type="text"], 
input[type="password"], 
input[type="email"], 
input[type="date"],
select, 
textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 0.875rem 1.25rem;
    color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Make <select> match input sizing across browsers (some ignore padding unless appearance is reset) */
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    min-height: 3.25rem; /* visually matches the inputs above */
    line-height: 1.5;
    /* Explicit padding (some browsers drop inherited padding on select after appearance reset) */
    /* Use !important because Tailwind CDN injects base styles dynamically and can win the cascade */
    padding: 0.875rem 3rem 0.875rem 1.25rem !important; /* top/right/bottom/left */
    padding-left: 1.25rem !important;
    padding-right: 3rem !important; /* room for custom caret */
    box-sizing: border-box;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 10.94l3.71-3.71a.75.75 0 111.06 1.06l-4.24 4.24a.75.75 0 01-1.06 0L5.21 8.29a.75.75 0 01.02-1.08z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem 1rem;
}

input:focus, select:focus, textarea:focus {
    border-color: #3b82f6;
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    outline: none;
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.1);
}

nav {
    position: relative;
    z-index: 100; /* Increased to stay above any content */
}

main, footer {
    position: relative;
    z-index: 10;
}

#user-profile-container {
    z-index: 110;
}

/* User Avatar */
.user-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.user-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
    border-color: rgba(102, 126, 234, 0.5);
}

/* User Dropdown */
.user-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 240px;
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    padding: 0.5rem;
    z-index: 1000;
    animation: dropdownFadeIn 0.2s ease;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-header {
    padding: 0.75rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0.5rem 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem;
    text-align: left;
    color: #E0E0E0;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.dropdown-item svg {
    flex-shrink: 0;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: rgba(20, 20, 30, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 450px;
    padding: 2rem;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    color: white;
    transition: border-color 0.2s;
}

.modal-input:focus {
    border-color: #3b82f6;
    outline: none;
}

.hidden {
    display: none !important;
}
