/* Color Palette: 
   Dark Background: #131923 (Very Dark Blue)
   Card Background: #1f2937 (Slightly lighter dark blue)
   Primary Red (Action): #ef4444 
   Secondary Blue (Info/Download): #3b82f6
   Text Color: #f9fafb (Off-white)
*/

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #131923; /* Very Dark Blue Background */
    color: #f9fafb; /* Light Text */
}

.container {
    background: #1f2937; /* Card Background */
    padding: 40px;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border: 1px solid #374151; /* Subtle border */
}

h1 {
    color: #ef4444; /* Red Accent */
    text-align: center;
    margin-bottom: 25px;
}

h2 {
    color: #f9fafb;
    border-bottom: 1px solid #374151;
    padding-bottom: 10px;
    margin-top: 30px;
}

label {
    display: block;
    margin-top: 15px;
    margin-bottom: 5px;
    font-weight: 500;
    color: #d1d5db; /* Lighter gray for labels */
}

input[type="text"], input[type="password"] {
    width: 100%;
    padding: 12px;
    margin: 5px 0 15px 0;
    box-sizing: border-box;
    border: 1px solid #4b5563;
    border-radius: 8px;
    background-color: #374151; /* Input background */
    color: #f9fafb;
    transition: border-color 0.3s;
}

input[type="text"]:focus, input[type="password"]:focus {
    outline: none;
    border-color: #3b82f6; /* Blue border on focus */
}

/* --- BUTTONS --- */
button {
    text-transform: uppercase;
    font-weight: bold;
    padding: 12px 20px;
    margin: 10px 0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s, transform 0.1s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* Default button - Apply Red Accent for main actions (Login/Signup/Logout) */
button:not(#download-btn) {
    background-color: #ef4444; /* Primary Red */
    color: white;
}

button:not(#download-btn):hover {
    background-color: #dc2626; 
    transform: translateY(-2px);
}

/* Download button - Apply Secondary Blue Accent */
#download-btn {
    background-color: #3b82f6; /* Secondary Blue */
    color: white;
}

#download-btn:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
}

/* --- MESSAGES --- */
.message {
    padding: 10px;
    margin: 15px 0;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9em;
}

/* Light green text on darker green background for success */
.success { 
    background-color: #064e3b; 
    color: #6ee7b7; 
    border: 1px solid #10b981;
}

/* Light red text on darker red background for danger/error */
.danger { 
    background-color: #7f1d1d; 
    color: #fca5a5; 
    border: 1px solid #f87171;
}

small {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: #9ca3af;
}

#username-display {
    color: #ef4444;
}