:root {
    --bg-dark: #0f172a;
    --card-bg: #111827;
    --accent: #22d3ee;
    --accent-hover: #06b6d4;
    --text-primary: #f9fafb;
    --text-secondary: #94a3b8;
    --input-bg: #1f2937;
    --input-border: #374151;
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: #000;
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url("../images/login_backimage_1.png");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-primary);
    overflow-x: hidden;
    padding: 20px 0;
}

.auth-logo {
    position: fixed;
    top: 32px;
    left: 40px;
    font-size: 24px;
    font-weight: 800;
    color: white;
    text-decoration: none;
    z-index: 100;
    transition: all 0.3s ease;
}

.auth-logo span {
    color: var(--accent);
}

.auth-container {
    width: 100%;
    max-width: 440px;
    padding: 16px;
}

.auth-card {
    background: rgba(17, 24, 39, 0.9);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    text-align: center;
    width: 100%;
}

.auth-icon-wrapper {
    width: 48px;
    height: 48px;
    background: rgba(34, 211, 238, 0.1);
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--accent);
}

.auth-card h1 {
    font-size: clamp(20px, 5vw, 24px);
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.auth-card p.subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
}

.form-group {
    text-align: left;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i.input-icon {
    position: absolute;
    left: 16px;
    color: var(--text-secondary);
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 10px;
    padding: 12px 14px 12px 42px;
    color: white;
    font-size: 14px;
    transition: all 0.2s ease;
    outline: none;
}

.input-wrapper input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
}

.input-wrapper .password-toggle {
    position: absolute;
    right: 16px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
}

.input-wrapper .password-toggle:hover {
    color: var(--accent);
}

.btn-auth {
    width: 100%;
    background: var(--accent);
    color: #0f172a;
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 4px;
}

.btn-auth:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 10px 20px -5px rgba(34, 211, 238, 0.3);
}

.auth-footer {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-footer a {
    color: var(--accent);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: opacity 0.2s;
}

.auth-footer a:hover {
    opacity: 0.8;
}

.auth-footer span {
    color: var(--text-secondary);
    font-size: 14px;
}

.messages {
    margin-bottom: 20px;
}

.message {
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 8px;
    text-align: left;
}

.message-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

/* Animations */
.auth-card {
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsiveness */
@media (max-width: 768px) {
    .auth-logo {
        top: 24px;
        left: 24px;
        font-size: 20px;
    }

    .auth-container {
        padding: 40px 16px;
    }

    .auth-card {
        padding: 32px 24px;
    }
}

@media (max-width: 480px) {
    body {
        align-items: flex-start;
        padding-top: 80px;
    }

    .auth-logo {
        position: absolute;
        width: 100%;
        left: 0;
        top: 24px;
        display: flex;
        justify-content: center;
        background: transparent;
    }

    .auth-card {
        padding: 24px 16px;
        border-radius: 16px;
    }

    .auth-card h1 {
        font-size: 22px;
    }

    .btn-auth {
        padding: 14px;
    }
    
    .input-wrapper input {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}