/* General Layout & Background */
body {
    font-family: Arial, sans-serif;
    background-color: #1a1a1a;
    color: #f0f0f0;
    margin: 0;
}

/* Topbar Styling (Refined from header.php) */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: #222;
    border-bottom: 2px solid #333;
}

.topbar a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}

/* Dropdown Menu Logic */
.menu {
    text-align: right; /* Keeps the menu button on the far right */
    position: relative;
    display: inline-block;
}

.menu button {
    display: flex;
    align-items: center; /* Vertically centers text and arrow [7] */
    gap: 0.5rem; /* Space between the word and the arrow */
    white-space: nowrap; /* Prevents the arrow from dropping to a new line [8] */
    padding: 0.8rem 1.2rem; /* Consistent padding for all buttons [9] */
    height: 40px; /* Force a consistent height for all buttons [10] */
    box-sizing: border-box; /* Includes padding in the height calculation [11] */
}

.menu-content {
    display: none;
    position: absolute;
    /* Aligns the right edge of the dropdown with the right edge of the button */
    right: 0; 
    left: auto; /* Overrides any inherited left alignment */
    
    /* Ensures the menu stays on top of other content [3] */
    z-index: 100; 
    
    /* Set a width that fits your longest link, like "Edit Profile" [4] */
    min-width: 180px; 
    background-color: #333;
    box-shadow: 0 8px 16px rgba(0,0,0,0.5);
}

.menu-content a {
    color: #fff;
    padding: 12px 16px;
    display: block;
    border-bottom: 1px solid #444;
}

.menu:hover .menu-content {
    display: block;
}

/* Login Form Styling (Replacing inline styles in index.php) */
.login-form {
    max-width: 400px;
    margin: 5rem auto;
    padding: 2rem;
    background: #2c2c2c;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.login-form h2 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-error {
    color: #ff4d4d;
    text-align: center;
    margin-bottom: 1rem;
    font-weight: bold;
}

.login-form input {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    background: #444;
    border: 1px solid #555;
    color: #fff;
    border-radius: 4px;
    box-sizing: border-box; /* Ensures padding doesn't affect width */
}

.login-form button {
    width: 100%;
    padding: 0.8rem;
    background-color: #007bff;
    border: none;
    color: white;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
}

.login-form .links {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    font-size: 0.9rem;
}
.topbar {
    display: flex;
    justify-content: space-between; /* Pushes spacer and menu to the edges */
    align-items: center;
    padding: 1rem;
    background-color: #222;
    color: #fff;
}

.site-name {
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    flex-grow: 1; /* Allows the name to take up available space and center itself */
}

.topbar-spacer, .menu {
    flex: 1; /* Ensures both sides take equal space, forcing the center item to the middle */
}

/* Style for normal, unvisited links */
a, a:link {
    color: #4db6ac; /* Muted Cyan */
    text-decoration: none; /* Removes the underline for a cleaner look */
}

/* Optional: Add a hover state for better user feedback */
a:hover {
    color: #ffffff; /* Turns white when hovered */
    text-decoration: underline; /* Adds underline only on hover */
}
/* Styling for links that have been clicked */
a:visited {
    color: #d4af37; /* Suggesting Gold for high contrast */
    text-decoration: none; /* Keeps the look clean as per your header style */
}

/* Optional: Styling for when a user hovers over a visited link */
a:visited:hover {
    color: #ffffff; /* Turns white on hover for interactive feedback */
}
