﻿@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #2c5364;
    --primary-dark: #203a43;
    --primary-light: #3a6b7c;
    --gradient: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    --accent: #00c9ff;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --white: #ffffff;
    --gray-light: #f8f9fa;
    --gray: #6c757d;
    --gray-dark: #495057;
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
    --shadow-lg: 0 25px 50px rgba(0,0,0,0.15);
    --border-radius: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
    padding: 20px;
}

/* Animated Background */
.bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.floating-shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.shape-1 {
    width: 150px;
    height: 150px;
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.shape-2 {
    width: 80px;
    height: 80px;
    top: 70%;
    right: 10%;
    animation-delay: 2s;
}

.shape-3 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 15%;
    animation-delay: 4s;
}

.shape-4 {
    width: 60px;
    height: 60px;
    top: 30%;
    right: 20%;
    animation-delay: 1s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg) scale(1);
    }

    33% {
        transform: translateY(-25px) rotate(120deg) scale(1.05);
    }

    66% {
        transform: translateY(10px) rotate(240deg) scale(0.95);
    }
}

/* Auth Container */
.auth-container {
    width: 100%;
    max-width: 460px;
    animation: slideInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(60px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Auth Card */
.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(25px);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 50px 45px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: var(--transition);
}

    .auth-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 5px;
        background: linear-gradient(90deg, var(--accent), var(--primary), var(--accent));
        background-size: 200% 100%;
        animation: shimmer 2.5s infinite linear;
    }

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.auth-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 35px 70px rgba(0, 0, 0, 0.25);
}

/* Logo Styles */
.auth-logo {
    text-align: center;
    margin-bottom: 25px;
    position: relative;
}

.logo-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 85px;
    height: 85px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 22px;
    margin-bottom: 20px;
    box-shadow: 0 20px 40px rgba(44, 83, 100, 0.35);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

    .logo-container:hover {
        transform: rotate(8deg) scale(1.08);
        box-shadow: 0 25px 50px rgba(44, 83, 100, 0.4);
    }

    .logo-container::before {
        content: '';
        position: absolute;
        width: 200%;
        height: 200%;
        background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.25), transparent);
        transform: rotate(45deg);
        animation: shine 4s infinite;
    }

@keyframes shine {
    0% {
        transform: translateX(-150%) rotate(45deg);
    }

    100% {
        transform: translateX(150%) rotate(45deg);
    }
}

.logo-icon {
    font-size: 34px;
    font-weight: bold;
    color: white;
    position: relative;
    z-index: 2;
}

/* Lock Illustration */
.password-illustration {
    text-align: center;
    margin: 15px 0 30px;
    animation: gentleBounce 3s ease-in-out infinite;
    position: relative;
}

    .password-illustration::before {
        content: '';
        position: absolute;
        width: 100px;
        height: 100px;
        background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        border-radius: 50%;
        opacity: 0.1;
        z-index: -1;
    }

.lock-icon {
    width: 130px;
    height: 130px;
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.15));
    transition: var(--transition);
    color: var(--primary);
}

.password-illustration:hover .lock-icon {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.2));
    color: var(--accent);
}

@keyframes gentleBounce {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

/* Text Styles */
.auth-title {
    text-align: center;
    font-size: 30px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

    .auth-title::after {
        content: '';
        position: absolute;
        bottom: -8px;
        left: 50%;
        transform: translateX(-50%);
        width: 60px;
        height: 3px;
        background: linear-gradient(90deg, var(--accent), var(--primary));
        border-radius: 2px;
    }

.auth-subtext {
    text-align: center;
    color: var(--gray);
    font-size: 16px;
    font-weight: 400;
    margin-bottom: 40px;
    line-height: 1.7;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

/* Alert Styles */
.alert {
    border-radius: 14px;
    border: none;
    padding: 18px 22px;
    margin-bottom: 30px;
    animation: fadeInScale 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    position: relative;
    overflow: hidden;
    font-weight: 500;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

    .alert::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 5px;
        border-radius: 14px 0 0 14px;
    }

.alert-success {
    background: linear-gradient(135deg, rgba(212, 237, 218, 0.9), rgba(195, 230, 203, 0.9));
    color: #155724;
    border-left: 5px solid var(--success);
}

.alert-danger {
    background: linear-gradient(135deg, rgba(248, 215, 218, 0.9), rgba(245, 198, 203, 0.9));
    color: #721c24;
    border-left: 5px solid var(--danger);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Form Styles */
.auth-form {
    margin-top: 15px;
}

.form-group {
    position: relative;
    margin-bottom: 30px;
}

.form-control {
    border: 2.5px solid #e9ecef;
    border-radius: 14px;
    padding: 18px 25px 18px 55px;
    height: 60px;
    font-size: 16px;
    font-weight: 400;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    width: 100%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

    .form-control:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 4px rgba(44, 83, 100, 0.15);
        outline: none;
        transform: translateY(-3px);
        background: rgba(255, 255, 255, 0.95);
    }

    .form-control::placeholder {
        color: #adb5bd;
        font-weight: 400;
    }

/* Form Icons */
.form-icon {
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    z-index: 2;
    transition: var(--transition);
    font-size: 18px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-control:focus + .form-icon {
    color: var(--primary);
    transform: translateY(-50%) scale(1.2);
}

/* Button Styles */
.auth-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    font-weight: 600;
    border-radius: 14px;
    height: 60px;
    border: none;
    font-size: 17px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 10px 25px rgba(44, 83, 100, 0.3);
    letter-spacing: 0.5px;
}

    .auth-btn:hover {
        transform: translateY(-4px);
        box-shadow: 0 20px 40px rgba(44, 83, 100, 0.4);
        letter-spacing: 1px;
    }

    .auth-btn:active {
        transform: translateY(-1px);
    }

    .auth-btn::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.6s;
    }

    .auth-btn:hover::before {
        left: 100%;
    }

    .auth-btn i {
        font-size: 18px;
        transition: var(--transition);
    }

    .auth-btn:hover i {
        transform: translateX(3px);
    }

/* Footer Links */
.auth-footer {
    text-align: center;
    margin-top: 35px;
    padding-top: 25px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    position: relative;
}

.auth-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 10px;
    background: rgba(44, 83, 100, 0.05);
}

    .auth-link:hover {
        color: var(--primary-dark);
        transform: translateX(8px);
        text-decoration: none;
        background: rgba(44, 83, 100, 0.1);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }

    .auth-link i {
        font-size: 14px;
        transition: var(--transition);
    }

    .auth-link:hover i {
        transform: translateX(-2px);
    }

/* Loading Animation */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

    .btn-loading::after {
        content: '';
        position: absolute;
        width: 24px;
        height: 24px;
        top: 50%;
        left: 50%;
        margin-left: -12px;
        margin-top: -12px;
        border: 3px solid transparent;
        border-top: 3px solid white;
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-container {
        max-width: 420px;
        padding: 15px;
    }

    .auth-card {
        padding: 40px 35px;
    }

    .auth-title {
        font-size: 26px;
    }

    .lock-icon {
        width: 110px;
        height: 110px;
    }

    .form-control {
        height: 55px;
        padding: 16px 20px 16px 50px;
    }

    .auth-btn {
        height: 55px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 35px 25px;
        border-radius: 18px;
    }

    .auth-title {
        font-size: 24px;
    }

    .auth-subtext {
        font-size: 15px;
        margin-bottom: 30px;
    }

    .logo-container {
        width: 75px;
        height: 75px;
    }

    .lock-icon {
        width: 100px;
        height: 100px;
    }

    .form-control {
        height: 52px;
        padding: 14px 18px 14px 48px;
        font-size: 15px;
    }

    .auth-btn {
        height: 52px;
        font-size: 15px;
    }

    .alert {
        padding: 15px 18px;
        font-size: 14px;
    }
}
