:root {
    --primary-color: #800000;
    /* Maroon */
    --primary-hover: #a00000;
    --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --card-bg: rgba(255, 255, 255, 0.8);
    --text-color: #333;
    --input-bg: rgba(255, 255, 255, 0.9);
    --input-border: #ddd;
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-gradient: linear-gradient(135deg, #1a1a1a 0%, #2d3436 100%);
        --card-bg: rgba(0, 0, 0, 0.6);
        --text-color: #f1f1f1;
        --input-bg: rgba(255, 255, 255, 0.1);
        --input-border: #444;
        --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8);
    }

    header h1 {
        color: var(--primary-color);
        text-shadow:
            -1px -1px 0 rgba(255, 255, 255, 0.4),
            1px -1px 0 rgba(255, 255, 255, 0.4),
            -1px 1px 0 rgba(255, 255, 255, 0.4),
            1px 1px 0 rgba(255, 255, 255, 0.4),
            0 0 10px rgba(255, 255, 255, 0.2);
    }

    button {
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-gradient);
    transition: background 0.5s ease;
    overflow-y: auto;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: var(--shadow);
    text-align: center;
    animation: fadeIn 0.8s ease-out;
}

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

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

header h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
    transition: all 0.3s ease;
}

/* Removed data-theme styles as it's now handled by media queries */

.password-group {
    position: relative;
    display: flex;
    align-items: center;
}

.password-toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 8px;
    margin: 0;
    width: auto;
    height: auto;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.password-toggle-btn:hover {
    opacity: 1;
    background: none;
    transform: translateY(-50%) scale(1.1);
    box-shadow: none;
}

.password-toggle-btn svg {
    width: 20px;
    height: 20px;
    fill: var(--text-color);
}

.subtitle {
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(128, 0, 0, 0.2);
}

button {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    background-color: var(--primary-color);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(128, 0, 0, 0.3);
}

button:active {
    transform: translateY(0);
}

.dashboard-nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.dashboard-link {
    display: block;
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    background-color: var(--card-bg);
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    border: 1px solid var(--input-border);
    transition: all 0.3s ease;
}

.dashboard-link:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(128, 0, 0, 0.2);
}

.logout-link {
    margin-top: 1rem;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.logout-link:hover {
    opacity: 0.7;
}


/* Base responsiveness */
@media (max-width: 768px) {
    body {
        align-items: flex-start;
        padding-top: 5vh;
    }

    .login-container {
        max-width: 90%;
        padding: 1.5rem;
    }
}