:root {
    /* Color Palette - Dark Gold Theme */
    --bg-color: #0d0f12;
    --text-color: #e2e8f0;
    --text-muted: #94a3b8;

    --primary-color: #d4af37;
    /* Oscar Gold */
    --primary-color-hover: #b8972a;

    --card-bg: rgba(30, 41, 59, 0.4);
    --card-border: rgba(255, 255, 255, 0.05);

    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);

    --danger-color: #ef4444;

    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-base: 0.3s ease-in-out;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* Subtle background gradient */
    background-image:
        radial-gradient(circle at 10% 20%, rgba(212, 175, 55, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(212, 175, 55, 0.05) 0%, transparent 20%);
    overflow-x: hidden;
}

/* Glassmorphism Utilities */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.title-glow {
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

p {
    line-height: 1.6;
    color: var(--text-muted);
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.header-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--glass-border);
}

.sticky-header {
    z-index: 100;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: rgba(13, 15, 18, 0.85);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    /* allow wrapping on small screens */
}

.header-nav h1 {
    font-size: 1.5rem;
    margin-bottom: 0;
    color: var(--primary-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    text-align: center;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary {
    background-color: var(--primary-color);
    color: #000;
}

.btn-primary:hover {
    background-color: var(--primary-color-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-color);
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-color);
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control option {
    background-color: var(--bg-color);
    color: var(--text-color);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e2e8f0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    /* Reduced size */
    padding-right: 2.5rem;
}

/* Screens */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
    text-align: center;
}

.auth-card h2 {
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
}

.auth-card p {
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

/* Specific Forms Layout in Auth */
.auth-form {
    text-align: left;
}

.auth-form .btn {
    width: 100%;
    margin-top: 1rem;
}

/* Dashboard & Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.category-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    border-color: rgba(212, 175, 55, 0.3);
    /* Subtle gold border on hover */
}

.category-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.75rem;
    margin-bottom: 0.5rem;
}

.category-header h3 {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin: 0;
}

/* Nominees List */
.nominees-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nominee-item {
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    border: 1px solid transparent;
    transition: all var(--transition-fast);
    position: relative;
    cursor: pointer;
}

.nominee-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(212, 175, 55, 0.2);
    transform: scale(1.01);
}

.nominee-selected {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.4);
}

.nominee-loading {
    opacity: 0.6;
    pointer-events: none;
    cursor: wait;
}

.prediction-badge {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: #000;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
}

.nominee-name {
    font-weight: 500;
    color: var(--text-color);
    display: block;
}

.nominee-movie {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    display: block;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    width: 100%;
    max-width: 500px;
    background: var(--bg-color);
    padding: 2rem;
}

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

.modal-header h2 {
    color: var(--primary-color);
    margin: 0;
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #fff;
}

.modal-body {
    margin-bottom: 1.5rem;
}

/* Utility classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mt-4 {
    margin-top: 1rem;
}

.error-message {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 1rem;
    text-align: center;
    background: rgba(239, 68, 68, 0.1);
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Loading Spinner */
.loader {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    margin: 2rem auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */

/* Tablet and smaller desktops */
@media (max-width: 900px) {
    .header-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .header-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

/* Mobile Screens */
@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }

    .header-nav {
        padding: 1rem;
    }

    .header-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.8rem;
    }

    .header-actions>* {
        width: 100%;
        margin-bottom: 0;
    }

    select#categoryFilter,
    button#btnMakePrediction,
    button#btnViewAllPredictions,
    button#logoutBtn {
        width: 100% !important;
        text-align: center;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .category-card {
        padding: 1rem;
    }

    .modal-content {
        padding: 1.5rem;
    }
}