/* =================================================================
   Global Styles & Variables
   ================================================================= */
:root {
    --primary-bg: #1A2238; /* Deep Navy Blue */
    --secondary-bg: #2C3E50; /* Lighter Navy Card BG */
    --accent-blue: #4A90E2; /* Bright Blue for buttons */
    --text-primary: #F2F2F2; /* Off-white for text */
    --text-secondary: #9B9B9B; /* Grey for subtitles */
    --border-color: #4A4A4A;
    --error-color: #E74C3C;
}

body {
    background-color: var(--primary-bg);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 20px;
}

/* =================================================================
   Authentication Pages (Login / Register)
   ================================================================= */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.auth-box {
    background-color: var(--secondary-bg);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.auth-box h1 {
    margin-bottom: 30px;
}

.auth-box label {
    display: block;
    text-align: left;
    margin-bottom: 5px;
    color: var(--text-secondary);
}

.auth-box input[type="email"],
.auth-box input[type="password"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background-color: var(--primary-bg);
    color: var(--text-primary);
    box-sizing: border-box; /* Important for consistent sizing */
}

.password-wrapper {
    position: relative;
}

.password-wrapper i {
    position: absolute;
    top: 38px;
    right: 15px;
    cursor: pointer;
    color: var(--text-secondary);
}

.auth-box button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 4px;
    background-color: var(--accent-blue);
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.auth-box button:hover {
    background-color: #357ABD;
}

.auth-box p {
    margin-top: 20px;
    color: var(--text-secondary);
}

.auth-box a {
    color: var(--accent-blue);
    text-decoration: none;
}

.flash-messages {
    list-style: none;
    padding: 10px;
    margin-bottom: 20px;
    background-color: rgba(231, 76, 60, 0.1);
    border: 1px solid var(--error-color);
    border-radius: 4px;
    color: var(--error-color);
}

/* =================================================================
   Dashboard Styles
   ================================================================= */

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
}

header h1 {
    margin: 0;
}

header .user-info a {
    color: var(--accent-blue);
    margin-left: 15px;
    text-decoration: none;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.card {
    background-color: var(--secondary-bg);
    padding: 20px;
    border-radius: 8px;
}

.card.disabled {
    opacity: 0.5;
}

.card h2 {
    margin-top: 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Specific card styles */
.search-history ul {
    list-style: none;
    padding: 0;
}
.search-history li {
    padding: 5px 0;
}
.results ul {
    list-style: none;
    padding: 0;
}
.results li {
    background-color: var(--primary-bg);
    padding: 8px;
    border-radius: 4px;
    margin-bottom: 5px;
}