/*
 * Header, Navigation, and Profile Dropdown Styles
 */

/* --- CORE LAYOUT & HERO STYLES --- */
.universe-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    text-align: center;
    padding: 20px;
}

.hero-section h1 {
    font-size: 4rem;
    margin: 0;
    color: #fff;
}

.hero-section p {
    font-size: 1.2rem;
    color: #ccc;
}

.content-section {
    padding: 100px 20px;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.content-section .section-icon,
.content-section h2,
.content-section p {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.content-section.is-visible .section-icon {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.1s;
}

.content-section.is-visible h2 {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.2s;
}

.content-section.is-visible p {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.4s;
}


/* --- HEADER CONTAINER & NAVIGATION --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 40px;
    background-color: transparent;
    border-bottom: 1px solid transparent;
    transition: padding 0.4s ease, background-color 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease;
    box-sizing: border-box;
}

.site-header.scrolled {
    padding: 15px 40px;
    background-color: rgba(15, 17, 26, 0.5);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header-left,
.header-right {
    flex: 1;
}

.header-center {
    flex: 2;
    text-align: center;
}

.header-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.site-header nav a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    padding: 5px 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.site-header nav a:hover {
    color: #fff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.site-header .site-title {
    font-weight: bold;
    font-size: 1.5rem;
    text-transform: none;
    letter-spacing: 0;
    padding: 0;
}


/* --- LOGO STYLES --- */
.site-logo {
    height: 35px;
    width: auto;
    display: block;
    transition: height 0.4s ease, filter 0.4s ease;
    filter: drop-shadow(0 0 0px rgba(255, 255, 255, 0));
}

.site-title:hover .site-logo {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.7));
}


/* --- INTERACTIVE PROFILE DROPDOWN --- */
#header-user-profile {
    position: relative;
}

#header-login-button {
    color: #fff;
    background-color: #4a90e2;
    padding: 8px 18px;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s;
}

#header-login-button:hover {
    background-color: #5aa1f2;
}

.header-profile-button {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 0;
    background: none;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
}

.header-profile-button:hover,
.header-profile-button[aria-expanded="true"] {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(74, 144, 226, 0.6);
}

#header-profile-picture {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 240px;
    background: rgba(21, 24, 38, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    padding: 5px; /* MODIFIED: Was 10px, this gives items room to breathe */
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.profile-dropdown.is-active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-dropdown .dropdown-header {
    padding: 10px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 5px;
    font-weight: bold;
    color: #fff;
}

.profile-dropdown .dropdown-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 15px;
    color: #ccc;
    text-decoration: none;
    background: none;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    box-sizing: border-box; /* ADDED: Ensures padding is included in the width */
}

.profile-dropdown .dropdown-item:hover {
    background-color: rgba(74, 144, 226, 0.3);
    color: #fff;
}

.profile-dropdown .dropdown-item.is-logout {
    margin-top: 5px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #f56c6c;
}

.profile-dropdown .dropdown-item.is-logout:hover {
    background-color: rgba(220, 53, 69, 0.3);
    color: #fff;
}

/* --- UI IMPROVEMENTS --- */
body.account-page-body #logout-button {
    display: none;
}


/* This will grey out the link and prevent the hover effect */
.profile-dropdown .dropdown-item.is-disabled {
    color: #777; /* Muted grey color */
    cursor: not-allowed;
    background-color: transparent !important; /* Ensure no background on hover */
}
/* Explicitly disable the hover effect for the disabled item */
.profile-dropdown .dropdown-item.is-disabled:hover {
    color: #777;
    background-color: transparent;
}

/* In header-styles.css */

/* Style for disabled dropdown links */
.profile-dropdown .dropdown-item.is-disabled {
  color: #6b7280; /* A muted grey color */
  cursor: not-allowed;
  background-color: transparent;
}

/* Prevents the hover effect on the disabled link */
.profile-dropdown .dropdown-item.is-disabled:hover {
  color: #6b7280;
  background-color: transparent;
}
/* Prevent Auth Flicker in Header */
/* Initially, hide both controls to prevent flicker */
.auth-state-unknown #header-logged-out-links,
.auth-state-unknown #header-user-profile {
    display: none;
}

/* When logged in, SHOW the profile and HIDE the login button */
.auth-logged-in #header-user-profile {
    display: block;
}
.auth-logged-in #header-logged-out-links {
    display: none;
}

/* When logged out, SHOW the login button and HIDE the profile */
.auth-logged-out #header-logged-out-links {
    display: block;
}
.auth-logged-out #header-user-profile {
    display: none;
}