:root {
    --primary-gradient: linear-gradient(135deg, #d4af37 0%, #c9a635 100%);
    --secondary-gradient: linear-gradient(135deg, #e6c547 0%, #b8941f 100%);
    --background-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --input-bg: rgba(255, 255, 255, 0.05);
    --input-border: rgba(255, 255, 255, 0.1);
    --input-focus-border: #d4af37;
    --error-color: #f5576c;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Login Logo */
.login-logo {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
    animation: slideUp 0.5s ease-out;
}

.login-logo-image {
    height: 100px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
}

/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Reset and Base Styles */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background-gradient);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    overflow: hidden;
    position: relative;
    flex-direction: column;
}

/* Animated Background Elements */
body::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 20% 80%, rgba(212, 175, 55, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(201, 166, 53, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(230, 197, 71, 0.1) 0%, transparent 40%);
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -30px) rotate(5deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(-5deg);
    }
}

/* Form Container - Glassmorphism Card */
form {
    position: relative;
    z-index: 1;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 420px;
    margin: 1rem;
    box-shadow:
        0 25px 50px -12px var(--shadow-color),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Title - Add via CSS */
form::before {
    content: 'Welcome Back';
    display: block;
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

form::after {
    content: 'Sign in to continue to your account';
    display: block;
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Form Field Containers */
form>div {
    margin-bottom: 1.5rem;
}

/* Labels */
label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

/* Input Fields */
input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    font-family: var(--font-family);
    color: var(--text-primary);
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
}

input[type="text"]:hover,
input[type="password"]:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

input[type="text"]:focus,
input[type="password"]:focus {
    border-color: var(--input-focus-border);
    background: rgba(255, 255, 255, 0.1);
    box-shadow:
        0 0 0 4px rgba(212, 175, 55, 0.15),
        0 0 20px rgba(212, 175, 55, 0.1);
}

input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

/* Focus state for parent div - highlight label */
form>div:focus-within label {
    color: var(--text-primary);
}

/* Submit Button */
button[type="submit"] {
    width: 100%;
    padding: 1rem 1.5rem;
    margin-top: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-family);
    color: var(--text-primary);
    background: var(--primary-gradient);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
    transition: left 0.5s ease;
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow:
        0 10px 40px -10px rgba(212, 175, 55, 0.5),
        0 0 20px rgba(212, 175, 55, 0.3);
}

button[type="submit"]:hover::before {
    left: 100%;
}

button[type="submit"]:active {
    transform: translateY(0);
}

button[type="submit"]:focus {
    outline: none;
    box-shadow:
        0 0 0 4px rgba(212, 175, 55, 0.3),
        0 10px 40px -10px rgba(212, 175, 55, 0.5);
}

/* Error Message Styling */
div[style*="color: red"],
.error-message {
    position: relative;
    z-index: 1;
    background: rgba(245, 87, 108, 0.1);
    border: 1px solid rgba(245, 87, 108, 0.3);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-top: 1.5rem;
    max-width: 420px;
    width: calc(100% - 2rem);
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--error-color) !important;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20%,
    60% {
        transform: translateX(-5px);
    }

    40%,
    80% {
        transform: translateX(5px);
    }
}

/* Responsive Design */
@media (max-width: 480px) {
    form {
        padding: 2rem 1.5rem;
        border-radius: 20px;
        margin: 0.5rem;
    }

    form::before {
        font-size: 1.75rem;
    }

    form::after {
        font-size: 0.875rem;
        margin-bottom: 1.5rem;
    }

    input[type="text"],
    input[type="password"] {
        padding: 0.875rem 1rem;
    }

    button[type="submit"] {
        padding: 0.875rem 1.25rem;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode adjustments */
@media (prefers-contrast: high) {

    input[type="text"],
    input[type="password"] {
        border: 2px solid var(--text-primary);
    }

    button[type="submit"] {
        border: 2px solid var(--text-primary);
    }
}