﻿@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-blue: #0066FF;
    --primary-orange: #FF6600;
    --neutral-white: #FFFFFF;
    --neutral-black: #1A1A1A;
    --neutral-gray: #4A4A4A;
    --border-gray: #E5E7EB;
    --success-green: #10B981;
    --danger-red: #EF4444;
    --text-muted: #64748B;
    --bg-light: #F8FAFC;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Login Page Wrapper */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-orange) 100%);
    position: relative;
    overflow: hidden;
}

    .login-wrapper::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%), radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
        pointer-events: none;
    }

    .login-wrapper::after {
        content: '';
        position: absolute;
        top: -20%;
        right: -20%;
        width: 60%;
        height: 60%;
        background: radial-gradient(circle, rgba(255, 255, 255, 0.04) 0%, transparent 70%);
        border-radius: 50%;
        pointer-events: none;
        animation: float 20s ease-in-out infinite;
    }

/* Login Container */
.login-container {
    background: var(--neutral-white);
    padding: 3rem 2.5rem;
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.05);
    width: 100%;
    max-width: 460px;
    position: relative;
    backdrop-filter: blur(20px);
    animation: slideUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 10;
}

    .login-container::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 5px;
        background: linear-gradient(90deg, var(--primary-blue) 0%, var(--primary-orange) 100%);
        border-radius: 24px 24px 0 0;
    }

/* Brand Section */
.login-brand {
    text-align: center;
    margin-bottom: 2.5rem;
}

.brand-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: var(--neutral-white);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(0, 102, 255, 0.3);
    animation: logoFloat 0.8s ease-out 0.3s both;
}

    .brand-logo svg {
        width: 60px;
        height: 60px;
    }

.login-container h1,
.login-container h2 {
    color: var(--neutral-black);
    font-weight: 700;
    font-size: 1.875rem;
    letter-spacing: -0.025em;
    margin: 0 0 0.5rem 0;
    text-align: center;
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 400;
    margin: 0 0 2rem 0;
    text-align: center;
    animation: fadeInUp 0.6s ease-out 0.5s both;
}

/* Form Styles */
.login-form {
    width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
    animation: fadeInUp 0.6s ease-out calc(0.6s + var(--delay, 0s)) both;
}

    .form-group:nth-of-type(1) {
        --delay: 0s;
    }

    .form-group:nth-of-type(2) {
        --delay: 0.1s;
    }

    .form-group label,
    .form-label {
        font-weight: 600;
        margin-bottom: 0.5rem;
        display: block;
        color: var(--neutral-gray);
        font-size: 0.9rem;
        letter-spacing: 0.025em;
        text-transform: uppercase;
    }

.form-control,
.form-input,
input[type="text"],
input[type="password"],
input[type="email"] {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    border-radius: 12px;
    border: 2px solid var(--border-gray);
    background: var(--bg-light);
    color: var(--neutral-gray);
    font-family: 'Raleway', sans-serif;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
}

    .form-control:focus,
    .form-input:focus,
    input[type="text"]:focus,
    input[type="password"]:focus,
    input[type="email"]:focus {
        outline: none;
        border-color: var(--primary-blue);
        background: var(--neutral-white);
        box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.08);
        transform: translateY(-1px);
    }

    .form-control:hover:not(:focus),
    .form-input:hover:not(:focus),
    input[type="text"]:hover:not(:focus),
    input[type="password"]:hover:not(:focus),
    input[type="email"]:hover:not(:focus) {
        border-color: rgba(0, 102, 255, 0.3);
    }

    .form-control::placeholder,
    .form-input::placeholder,
    input[type="text"]::placeholder,
    input[type="password"]::placeholder,
    input[type="email"]::placeholder {
        color: var(--text-muted);
        font-size: 0.95rem;
        font-weight: 400;
    }

/* Primary Button */
.btn-primary,
.login-btn,
button[type="submit"],
input[type="submit"] {
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-blue) 0%, #0052CC 100%);
    border: none;
    border-radius: 12px;
    color: var(--neutral-white);
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.025em;
    text-transform: none;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 102, 255, 0.3), 0 8px 32px rgba(0, 102, 255, 0.15);
    margin-top: 0.5rem;
    animation: fadeInUp 0.6s ease-out 0.8s both;
}

    .btn-primary::before,
    .login-btn::before,
    button[type="submit"]::before,
    input[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.6s ease;
    }

    .btn-primary:hover,
    .login-btn:hover,
    button[type="submit"]:hover,
    input[type="submit"]:hover {
        background: linear-gradient(135deg, #0052CC 0%, var(--primary-blue) 100%);
        transform: translateY(-2px);
        box-shadow: 0 8px 32px rgba(0, 102, 255, 0.4), 0 16px 64px rgba(0, 102, 255, 0.15);
    }

        .btn-primary:hover::before,
        .login-btn:hover::before,
        button[type="submit"]:hover::before,
        input[type="submit"]:hover::before {
            left: 100%;
        }

    .btn-primary:active,
    .login-btn:active,
    button[type="submit"]:active,
    input[type="submit"]:active {
        transform: translateY(-1px);
        box-shadow: 0 4px 16px rgba(0, 102, 255, 0.4), 0 8px 32px rgba(0, 102, 255, 0.2);
    }

    .btn-primary:disabled,
    .login-btn:disabled,
    button[type="submit"]:disabled,
    input[type="submit"]:disabled {
        background: var(--text-muted);
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
        opacity: 0.6;
    }

/* Loading State */
.btn-loading {
    pointer-events: none;
    color: transparent !important;
}

    .btn-loading::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 20px;
        height: 20px;
        border: 2px solid rgba(255, 255, 255, 0.3);
        border-top-color: var(--neutral-white);
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }

/* Smoke Animation */
.smoke-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
}

    .smoke-container.active {
        opacity: 1;
    }

.smoke-particle {
    position: absolute;
    background: radial-gradient(circle, rgba(0, 102, 255, 0.3) 0%, rgba(0, 102, 255, 0.1) 50%, transparent 100%);
    border-radius: 50%;
    animation: smokeRise 2s ease-out forwards;
}

/* Success/Error Messages */
.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(16, 185, 129, 0.04));
    color: var(--success-green);
    padding: 1rem 1.25rem;
    border-radius: 12px;
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-left: 4px solid var(--success-green);
    margin-bottom: 1.5rem;
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.3s ease;
}

    .alert-success::before {
        content: '✓';
        font-weight: 700;
        font-size: 1.1rem;
    }

.alert-danger,
.text-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(239, 68, 68, 0.04));
    color: var(--danger-red);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--danger-red);
    margin-top: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    animation: shake 0.3s ease-in-out;
}

    .text-danger:empty {
        display: none;
    }

/* Validation Summary */
.validation-summary-errors {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(239, 68, 68, 0.04));
    color: var(--danger-red);
    padding: 1rem 1.25rem;
    border-radius: 12px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-left: 4px solid var(--danger-red);
    margin-bottom: 1.5rem;
    font-weight: 500;
    font-size: 0.95rem;
}

    .validation-summary-errors ul {
        margin: 0;
        padding-left: 1.25rem;
    }

/* Floating Background Elements */
.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.02);
    animation: float 15s ease-in-out infinite;
}

    .shape:nth-child(1) {
        width: 300px;
        height: 300px;
        top: 10%;
        left: -5%;
        animation-delay: 0s;
    }

    .shape:nth-child(2) {
        width: 200px;
        height: 200px;
        top: 60%;
        right: -5%;
        animation-delay: 5s;
    }

    .shape:nth-child(3) {
        width: 150px;
        height: 150px;
        bottom: 10%;
        left: 70%;
        animation-delay: 10s;
    }

/* Animation Keyframes */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(60px) scale(0.9);
    }

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

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

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

@keyframes logoFloat {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.9);
    }

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

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

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }

    25% {
        transform: translate(20px, -30px) rotate(90deg) scale(1.1);
    }

    50% {
        transform: translate(-15px, 20px) rotate(180deg) scale(0.9);
    }

    75% {
        transform: translate(25px, 10px) rotate(270deg) scale(1.05);
    }
}

@keyframes smokeRise {
    0% {
        opacity: 1;
        transform: translateY(0) scale(0.5);
    }

    100% {
        opacity: 0;
        transform: translateY(-100px) scale(1.5);
    }
}

/* Responsive Design */
@media (max-width: 576px) {
    .login-wrapper {
        padding: 1rem;
    }

    .login-container {
        padding: 2rem 1.5rem;
        border-radius: 20px;
        margin: 1rem 0;
    }

        .login-container h1,
        .login-container h2 {
            font-size: 1.5rem;
            margin-bottom: 0.25rem;
        }

    .login-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .brand-logo {
        width: 56px;
        height: 56px;
        font-size: 1.25rem;
    }

        .brand-logo svg {
            width: 42px;
            height: 42px;
        }

    .form-control,
    .form-input,
    input[type="text"],
    input[type="password"],
    input[type="email"] {
        font-size: 0.95rem;
        padding: 0.875rem 1rem;
    }

    .btn-primary,
    .login-btn,
    button[type="submit"],
    input[type="submit"] {
        font-size: 0.95rem;
        padding: 0.875rem 1.25rem;
    }

    .form-group {
        margin-bottom: 1.25rem;
    }
}

@media (max-width: 400px) {
    .login-container {
        padding: 1.5rem 1.25rem;
    }

        .login-container h1,
        .login-container h2 {
            font-size: 1.375rem;
        }

    .brand-logo {
        width: 48px;
        height: 48px;
    }

        .brand-logo svg {
            width: 36px;
            height: 36px;
        }

    .shape:nth-child(1),
    .shape:nth-child(2) {
        display: none;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .login-container,
    .btn-primary,
    .form-control,
    .floating-shapes .shape,
    .login-wrapper::after {
        animation: none;
    }

    .btn-primary,
    .form-control {
        transition: none;
    }
}
