﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --success-color: #10b981;
    --error-color: #ef4444;
    --white: #ffffff;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 20px 60px rgba(102, 126, 234, 0.25);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

/* Background Wrapper */
.login-wrapper {
    min-height: 100vh;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Animated Background Shapes */
.bg-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: -150px;
    left: -150px;
    animation-duration: 25s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    top: 50%;
    right: -100px;
    animation-duration: 20s;
    animation-delay: 2s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    bottom: 10%;
    left: 10%;
    animation-duration: 18s;
    animation-delay: 4s;
}

.shape-4 {
    width: 250px;
    height: 250px;
    bottom: -125px;
    right: 20%;
    animation-duration: 22s;
    animation-delay: 1s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }

    25% {
        transform: translateY(-30px) rotate(90deg);
    }

    50% {
        transform: translateY(-60px) rotate(180deg);
    }

    75% {
        transform: translateY(-30px) rotate(270deg);
    }
}

/* Login Container */
.login-container {
    width: 100%;
    max-width: 460px;
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logo Section */
.logo-section {
    text-align: center;
    margin-bottom: 30px;
    animation: fadeIn 0.8s ease-out;
}

.logo-circle {
    width: 80px;
    height: 80px;
    background: var(--white);
    border-radius: 50%;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    animation: bounce 2s infinite;
}

    .logo-circle i {
        font-size: 36px;
        background: var(--primary-gradient);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.brand-name {
    font-size: 32px;
    font-weight: 700;
    color: var(--white);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.5px;
}

/* Login Card */
.login-card {
    background: var(--white);
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card-header {
    text-align: center;
    margin-bottom: 36px;
}

    .card-header h2 {
        font-size: 28px;
        font-weight: 700;
        color: var(--text-dark);
        margin-bottom: 8px;
    }

    .card-header p {
        color: var(--text-light);
        font-size: 15px;
    }

/* Form Styles */
.login-form {
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 24px;
}

    .form-group label {
        display: block;
        font-size: 14px;
        font-weight: 600;
        color: var(--text-dark);
        margin-bottom: 10px;
    }

        .form-group label i {
            margin-right: 8px;
            color: var(--primary-color);
        }

/* Input Wrapper */
.input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
    background: #f8fafc;
}

    .form-input:focus {
        border-color: var(--primary-color);
        background: var(--white);
        box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    }

    .form-input::placeholder {
        color: #cbd5e1;
    }

/* Input Border Animation */
.input-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.form-input:focus ~ .input-border {
    width: 100%;
}

/* Toggle Password Button */
.toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px;
    transition: color 0.3s ease;
}

    .toggle-password:hover {
        color: var(--primary-color);
    }

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

/* Custom Checkbox */
.remember-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    position: relative;
}

    .remember-checkbox input[type="checkbox"] {
        position: absolute;
        opacity: 0;
        cursor: pointer;
    }

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s ease;
    background: var(--white);
}

.remember-checkbox:hover .checkmark {
    border-color: var(--primary-color);
}

.remember-checkbox input:checked ~ .checkmark {
    background: var(--primary-gradient);
    border-color: var(--primary-color);
}

.checkmark::after {
    content: '';
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.remember-checkbox input:checked ~ .checkmark::after {
    display: block;
}

.label-text {
    font-size: 14px;
    color: var(--text-light);
}

/* Forgot Link */
.forgot-link {
    font-size: 14px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

    .forgot-link:hover {
        color: var(--secondary-color);
        text-decoration: underline;
    }

/* Login Button */
.btn-login {
    width: 100%;
    padding: 16px;
    background: var(--primary-gradient);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

    .btn-login::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;
    }

    .btn-login:hover::before {
        left: 100%;
    }

    .btn-login:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
    }

    .btn-login:active {
        transform: translateY(0);
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    }

    .btn-login i {
        transition: transform 0.3s ease;
    }

    .btn-login:hover i {
        transform: translateX(4px);
    }

/* Divider */
.divider {
    position: relative;
    text-align: center;
    margin: 28px 0;
}

    .divider::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, var(--border-color), transparent);
    }

    .divider span {
        background: var(--white);
        padding: 0 20px;
        position: relative;
        color: var(--text-light);
        font-size: 13px;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

/* Social Login */
.social-login {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 28px;
}

.btn-social {
    padding: 12px 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--white);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-dark);
}

    .btn-social:hover {
        border-color: var(--primary-color);
        background: #f8fafc;
        transform: translateY(-2px);
        box-shadow: var(--shadow-sm);
    }

    .btn-social svg {
        flex-shrink: 0;
    }

/* Signup Section */
.signup-section {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

    .signup-section p {
        font-size: 14px;
        color: var(--text-light);
    }

.signup-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
}

    .signup-link:hover {
        color: var(--secondary-color);
        text-decoration: underline;
    }

/* Footer */
.login-footer {
    text-align: center;
    margin-top: 24px;
    animation: fadeIn 1s ease-out 0.3s both;
}

    .login-footer p {
        color: rgba(255, 255, 255, 0.9);
        font-size: 13px;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    }

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 576px) {
    .login-container {
        max-width: 100%;
    }

    .login-card {
        padding: 36px 28px;
        border-radius: 20px;
    }

    .card-header h2 {
        font-size: 24px;
    }

    .brand-name {
        font-size: 28px;
    }

    .logo-circle {
        width: 70px;
        height: 70px;
    }

        .logo-circle i {
            font-size: 32px;
        }

    .social-login {
        grid-template-columns: 1fr;
    }

    .form-options {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .shape-1, .shape-2, .shape-3, .shape-4 {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 380px) {
    .login-card {
        padding: 28px 20px;
    }

    .card-header h2 {
        font-size: 22px;
    }

    .form-input {
        font-size: 14px;
        padding: 12px 14px;
    }

    .btn-login {
        padding: 14px;
        font-size: 15px;
    }
}

/* Loading State (Optional) */
.btn-login.loading {
    pointer-events: none;
    opacity: 0.7;
}

    .btn-login.loading span {
        visibility: hidden;
    }

    .btn-login.loading::after {
        content: '';
        position: absolute;
        width: 20px;
        height: 20px;
        border: 3px solid rgba(255, 255, 255, 0.3);
        border-top-color: white;
        border-radius: 50%;
        animation: spin 0.6s linear infinite;
    }

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Focus Visible for Accessibility */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
