/*
 * Auth Design System - "Rocket Launch" Aesthetic
 * Bold. Retro-Futuristic. Memorable.
 */

:root {
    --bg-deep: #0a0a0a;
    --bg-surface: #121214;
    --primary: #8b5cf6;
    --primary-glow: #a78bfa;
    --accent: #00f0ff;
    --accent-warm: #ff6b6b;
    --text-main: #f0f0f6;
    --text-muted: #718096;
    --border: #2d2a40;
    --gradient-1: linear-gradient(135deg, #8b5cf6 0%, #00f0ff 100%);
    --gradient-2: linear-gradient(135deg, #ff6b6b 0%, #f093fb 100%);
    --shadow-glow: 0 0 30px rgba(139, 92, 246, 0.3);
}

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

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    background: var(--bg-deep);
    color: var(--text-main);
    position: relative;
    overflow-x: hidden;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 240, 255, 0.1) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(90deg, rgba(139, 92, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
    background-size: 80px 80px;
    z-index: -1;
    pointer-events: none;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { background-position: 0 0; }
    100% { background-position: 80px 80px; }
}

/* Floating Geometric Shapes */
.geo-shape {
    position: fixed;
    pointer-events: none;
    z-index: 0;
    opacity: 0.15;
}

.geo-shape-1 {
    top: 10%;
    left: 5%;
    width: 300px;
    height: 300px;
    border: 2px solid rgba(139, 92, 246, 0.3);
    transform: rotate(45deg);
    animation: float1 15s ease-in-out infinite;
}

.geo-shape-2 {
    bottom: 20%;
    right: 10%;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), transparent);
    animation: float2 18s ease-in-out infinite;
}

.geo-shape-3 {
    top: 30%;
    right: 15%;
    width: 150px;
    height: 150px;
    background: rgba(255, 107, 107, 0.1);
    clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
    animation: float3 20s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% { transform: rotate(45deg) translateY(0); }
    50% { transform: rotate(45deg) translateY(-20px); }
}

@keyframes float2 {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-30px) scale(1.1); }
}

@keyframes float3 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(10px, -15px) rotate(5deg); }
    50% { transform: translate(-5px, -25px) rotate(-3deg); }
    75% { transform: translate(-15px, -10px) rotate(2deg); }
}

/* Container */
.auth-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Auth Card */
.auth-card {
    background: var(--bg-surface);
    border-radius: 24px;
    padding: 48px 40px;
    width: 100%;
    max-width: 440px;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 0 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(139, 92, 246, 0.2),
        inset 0 0 80px rgba(139, 92, 246, 0.05);
    border: 1px solid var(--border);
    animation: cardSlide 0.8s ease-out;
}

@keyframes cardSlide {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Decorative corner accents */
.auth-card::before {
    content: '';
    position: absolute;
    top: 20px;
    right: 20px;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--accent);
}

.auth-card::after {
    content: '';
    position: absolute;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    transform: rotate(45deg);
}

/* Logo/Branding */
.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo-text {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    animation: logoGlow 3s ease-in-out infinite alternate;
}

@keyframes logoGlow {
    0% { filter: drop-shadow(0 0 5px var(--primary)); }
    100% { filter: drop-shadow(0 0 20px var(--primary)); }
}

.auth-logo-sub {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 8px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* Form */
.auth-form {
    position: relative;
}

.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-main);
    margin-bottom: 10px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.auth-input {
    width: 100%;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.5);
    box-shadow:
        0 0 0 0 rgba(139, 92, 246, 0),
        0 0 20px rgba(139, 92, 246, 0.3);
}

.auth-input::placeholder {
    color: var(--text-muted);
}

/* Submit Button */
.auth-submit {
    width: 100%;
    padding: 18px 32px;
    background: var(--gradient-1);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.125rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.auth-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
}

.auth-submit:hover::before {
    left: 100%;
}

.auth-submit:active {
    transform: translateY(0);
}

/* Alert Messages */
.auth-alert {
    padding: 16px 20px;
    background: rgba(255, 107, 107, 0.15);
    border-left: 4px solid var(--accent-warm);
    border-radius: 8px;
    margin-bottom: 24px;
    color: #ffd4d4;
    font-size: 0.9rem;
    animation: alertShake 0.5s ease;
}

@keyframes alertShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Links */
.auth-links {
    display: flex;
    gap: 16px;
    margin-top: 24px;
}

.auth-link {
    flex: 1;
    text-align: center;
    padding: 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    border-radius: 8px;
    font-weight: 500;
}

.auth-link:hover {
    color: var(--text-main);
    background: rgba(139, 92, 246, 0.2);
}

.auth-link-primary {
    background: rgba(139, 92, 246, 0.2);
    color: var(--text-main);
}

.auth-link-primary:hover {
    background: var(--primary);
}

/* Loading State */
.loading-pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Social Auth Buttons (for future use) */
.social-auth {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.social-btn {
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: var(--text-muted);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-divider span {
    padding: 0 16px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}
