@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors - HSL Format */
    --background: 240 10% 3.9%;
    --foreground: 210 40% 98%;
    --card: 240 10% 7%;
    --primary: 252 83% 57%;
    --primary-glow: 252 83% 67%;
    --secondary: 192 91% 36%;
    --secondary-glow: 192 91% 46%;
    --accent: 316 73% 52%;
    --muted: 240 9% 13%;
    --muted-foreground: 240 5% 64.9%;
    --border: 240 6% 20%;
    --input: 240 6% 20%;
    --ring: 252 83% 57%;

    /* Gradients */
    --gradient-hero: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--accent)) 50%, hsl(var(--secondary)) 100%);
    --gradient-card: linear-gradient(145deg, hsl(var(--card)) 0%, hsl(240 10% 9%) 100%);
    --gradient-text: linear-gradient(90deg, hsl(var(--primary-glow)), hsl(316 73% 62%), hsl(var(--secondary-glow)));

    /* Shadows */
    --shadow-glow-primary: 0 0 40px hsl(var(--primary) / 0.3);
    --shadow-elegant: 0 20px 60px -10px hsl(var(--background) / 0.8);
    --shadow-card: 0 8px 32px hsl(var(--background) / 0.4);

    /* Transitions */
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(145deg, hsl(var(--background)) 0%, hsl(240 12% 6%) 100%);
    color: hsl(var(--foreground));
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Background effects */
body::before {
    content: '';
    position: fixed;
    top: 20%;
    left: 10%;
    width: 12rem;
    height: 12rem;
    background: hsl(var(--primary) / 0.1);
    border-radius: 50%;
    filter: blur(80px);
    animation: float 4s ease-in-out infinite;
    z-index: -1;
}

body::after {
    content: '';
    position: fixed;
    bottom: 20%;
    right: 10%;
    width: 10rem;
    height: 10rem;
    background: hsl(var(--secondary) / 0.1);
    border-radius: 50%;
    filter: blur(80px);
    animation: float 4s ease-in-out infinite reverse;
    z-index: -1;
}

/* ===== TYPOGRAPHY ===== */
h1, h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    line-height: 1.2;
}

h1 {
    font-size: 2rem;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    text-align: center;
}

/* ===== HEADER ===== */
header {
    background: linear-gradient(145deg, hsl(var(--card) / 0.8), hsl(240 10% 9% / 0.8));
    backdrop-filter: blur(20px);
    border-bottom: 1px solid hsl(var(--border) / 0.2);
    padding: 1.4rem 0;
    text-align: center;
    position: relative;
}

header p {
    margin-top: 1rem;
}

header a {
    color: hsl(var(--primary-glow));
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: var(--transition-smooth);
    position: relative;
}

header a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-hero);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

header a:hover {
    color: hsl(var(--foreground));
    background: hsl(var(--primary) / 0.1);
}

header a:hover::after {
    transform: scaleX(1);
}

/* ===== MAIN CONTENT ===== */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem 1rem;
    position: relative;
    z-index: 10;
}

section {
    background: var(--gradient-card);
    border: 1px solid hsl(var(--border) / 0.5);
    border-radius: 1.5rem;
    padding: 3rem;
    width: 100%;
    max-width: 480px;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-card), var(--shadow-glow-primary);
    position: relative;
    overflow: hidden;
}

section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-hero);
}

/* ===== FORM STYLES ===== */
form {
    width: 100%;
}

#login-instructions {
    color: hsl(var(--muted-foreground));
    margin-bottom: 2rem;
    text-align: center;
    font-size: 0.95rem;
}

label {
    display: block;
    color: hsl(var(--foreground));
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

input {
    width: 100%;
    padding: 1rem;
    background: hsl(var(--input));
    border: 1px solid hsl(var(--border));
    border-radius: 0.75rem;
    color: hsl(var(--foreground));
    font-size: 1rem;
    transition: var(--transition-smooth);
    margin-bottom: 1.5rem;
}

input:focus {
    outline: none;
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
    background: hsl(var(--card));
}

input::placeholder {
    color: hsl(var(--muted-foreground));
}

button {
    width: 100%;
    padding: 1rem 2rem;
    background: var(--gradient-hero);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-glow-primary);
    margin-top: 1rem;
}

button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent, hsl(var(--foreground) / 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-glow-primary), 0 15px 40px hsl(var(--primary) / 0.4);
}

button:hover::before {
    transform: translateX(100%);
}

button:active {
    transform: translateY(0) scale(0.98);
}

/* ===== ADDITIONAL LINKS ===== */
main > p {
    margin-top: 2rem;
    text-align: center;
    color: hsl(var(--muted-foreground));
}

main > p a {
    color: hsl(var(--primary-glow));
    text-decoration: none;
    font-weight: 500;
    position: relative;
}

main > p a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-hero);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

main > p a:hover::after {
    transform: scaleX(1);
}

/* ===== FOOTER ===== */
footer {
    background: hsl(var(--card));
    border-top: 1px solid hsl(var(--border) / 0.5);
    padding: 1.5rem 0;
    text-align: center;
}

footer p {
    color: hsl(var(--muted-foreground));
    font-size: 0.9rem;
}

/* ===== ACCESSIBILITY ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== ANIMATIONS ===== */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    header {
        padding: 1.5rem 1rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    main {
        padding: 2rem 1rem;
    }
    
    section {
        padding: 2rem 1.5rem;
        margin: 0 1rem;
    }
    
    input, button {
        padding: 0.875rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    section {
        padding: 1.5rem 1rem;
    }
    
    h1 {
        font-size: 1.25rem;
    }
    
    input, button {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.forgot-password {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 0.9rem;
    color: hsl(var(--muted-foreground));
}

.forgot-password a {
    color: hsl(var(--primary-glow));
    text-decoration: none;
    font-weight: 800;
    position: relative;
}

.forgot-password a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-hero);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.forgot-password a:hover::after {
    transform: scaleX(1);
}
