body {
    box-sizing: border-box;
}

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

:root {
    --navy: #0B3A6E;
    --azure: #2E6FD8;
    --slate: #64748B;
    --sand: #E9ECEF;
    --emerald: #10B981;
    --white: #FFFFFF;
    --glass: rgba(255, 255, 255, 0.25);
    --glass-dark: rgba(255, 255, 255, 0.15);
    --glass-light: rgba(255, 255, 255, 0.35);
    --shadow-soft: 0 8px 32px rgba(11, 58, 110, 0.15);
    --shadow-glow: 0 0 40px rgba(46, 111, 216, 0.2);
    --gradient-bg: linear-gradient(135deg, #0B3A6E 0%, rgba(46, 111, 216, 0.3) 100%);
    --gradient-card: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.1) 100%);
    --gradient-accent: linear-gradient(135deg, var(--azure) 0%, var(--emerald) 100%);
}

body {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.45;
    background: var(--gradient-bg);
    color: var(--navy);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Advanced Glass Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(46, 111, 216, 0.15) 0%, transparent 60%),
        radial-gradient(circle at 80% 70%, rgba(16, 185, 129, 0.12) 0%, transparent 55%),
        radial-gradient(circle at 40% 80%, rgba(46, 111, 216, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 60% 20%, rgba(255, 255, 255, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 10% 90%, rgba(16, 185, 129, 0.06) 0%, transparent 45%);
    pointer-events: none;
    z-index: -1;
    animation: backgroundShift 20s ease-in-out infinite;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.02) 50%, transparent 70%),
        linear-gradient(-45deg, transparent 30%, rgba(46, 111, 216, 0.03) 50%, transparent 70%);
    pointer-events: none;
    z-index: -1;
    animation: lightShift 15s ease-in-out infinite reverse;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: var(--navy);
}

/* Login Container */
.login-container {
    width: 100%;
    max-width: 480px;
    padding: 20px;
    position: relative;
    z-index: 10;
}

/* Premium Glass Login Card */
.login-card {
    background: var(--gradient-card);
    backdrop-filter: blur(30px);
    border-radius: 32px;
    padding: 48px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    box-shadow:
        0 20px 60px rgba(11, 58, 110, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        inset 0 -1px 0 rgba(255, 255, 255, 0.15);
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    opacity: 0.8;
}

.login-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
    animation: shimmer 4s ease-in-out infinite;
}

.login-card:hover::after {
    opacity: 1;
}

/* Logo Section */
.login-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 24px;
}

.logo-icon {
    width: 72px;
    height: 72px;
    background: var(--gradient-accent);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 28px;
    box-shadow:
        0 12px 32px rgba(46, 111, 216, 0.4),
        0 0 24px rgba(16, 185, 129, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    transition: all 0.4s ease;
    animation: pulse 3s ease-in-out infinite;
}

.logo-icon::before {
    content: '';
    position: absolute;
    inset: -4px;
    background: var(--gradient-accent);
    border-radius: 28px;
    opacity: 0.4;
    filter: blur(16px);
    z-index: -1;
    animation: glow 3s ease-in-out infinite;
}

.logo-icon::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, transparent 100%);
    border-radius: 21px 21px 0 0;
    pointer-events: none;
}

.logo-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--white);
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 8px;
}

.login-description {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

/* Form Elements */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 12px;
    font-weight: 500;
    color: var(--white);
    font-size: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.form-input {
    width: 100%;
    padding: 18px 24px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    font-size: 16px;
    background: var(--glass);
    backdrop-filter: blur(15px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 56px;
    font-family: 'Inter', sans-serif;
    color: var(--azure);
    position: relative;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 4px 12px rgba(0, 0, 0, 0.05);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--azure);
    background: var(--glass-light);
    box-shadow:
        0 0 0 4px rgba(46, 111, 216, 0.2),
        0 8px 32px rgba(46, 111, 216, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.form-input:focus::placeholder {
    color: rgba(255, 255, 255, 0.7);
    transform: translateY(-2px);
}

/* Password Input with Eye Icon */
.password-group {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    z-index: 10;
}

.password-toggle:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
}

/* Remember Me Checkbox */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0;
}

.custom-checkbox {
    position: relative;
    width: 20px;
    height: 20px;
}

.custom-checkbox input {
    opacity: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.checkbox-mark {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    background: var(--glass);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-checkbox input:checked+.checkbox-mark {
    background: var(--gradient-accent);
    border-color: var(--azure);
    box-shadow: 0 0 12px rgba(46, 111, 216, 0.4);
}

.checkbox-mark::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.2s ease;
}

.custom-checkbox input:checked+.checkbox-mark::after {
    transform: rotate(45deg) scale(1);
}

.checkbox-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}

/* Premium Login Button */
.login-btn {
    width: 100%;
    padding: 18px 32px;
    border-radius: 20px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 16px;
    min-height: 56px;
    font-family: 'Inter', sans-serif;
    position: relative;
    overflow: hidden;
    background: var(--gradient-accent);
    color: white;
    box-shadow:
        0 12px 32px rgba(46, 111, 216, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-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 ease;
}

.login-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow:
        0 20px 60px rgba(46, 111, 216, 0.4),
        0 0 40px rgba(16, 185, 129, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:active {
    transform: translateY(-2px) scale(1.01);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loading State */
.login-btn.loading {
    pointer-events: none;
}

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

/* Forgot Password Link */
.forgot-password {
    text-align: center;
    margin-top: 24px;
}

.forgot-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 12px;
    display: inline-block;
}

.forgot-link:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

/* Language Switcher */
.lang-switcher {
    position: absolute;
    top: 32px;
    right: 32px;
    display: flex;
    background: var(--glass);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.lang-btn {
    padding: 10px 16px;
    border: none;
    background: none;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-btn.active {
    background: var(--gradient-accent);
    color: white;
    box-shadow: 0 4px 12px rgba(46, 111, 216, 0.3);
}

/* Error Message */
.error-message {
    background: rgba(255, 107, 107, 0.2);
    border: 1px solid rgba(255, 107, 107, 0.3);
    color: #a63b3b;
    padding: 16px 20px;
    border-radius: 16px;
    font-size: 14px;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
    display: none;
    animation: slideDown 0.3s ease;
    box-shadow: 0 0 16px rgba(255, 107, 107, 0.2);
}

.error-message.show {
    display: block;
}

/* Success Message */
.success-message {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--emerald);
    padding: 16px 20px;
    border-radius: 16px;
    font-size: 14px;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
    display: none;
    animation: slideDown 0.3s ease;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.2);
}

.success-message.show {
    display: block;
}

/* Footer */
.login-footer {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

/* Premium Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(60px) scale(0.9);
    }

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

@keyframes backgroundShift {

    0%,
    100% {
        transform: translateX(0) translateY(0) scale(1);
    }

    25% {
        transform: translateX(10px) translateY(-5px) scale(1.02);
    }

    50% {
        transform: translateX(-5px) translateY(10px) scale(0.98);
    }

    75% {
        transform: translateX(-10px) translateY(-10px) scale(1.01);
    }
}

@keyframes lightShift {

    0%,
    100% {
        opacity: 0.3;
        transform: rotate(0deg) scale(1);
    }

    50% {
        opacity: 0.6;
        transform: rotate(2deg) scale(1.1);
    }
}

@keyframes shimmer {

    0%,
    100% {
        opacity: 0;
        transform: translateX(-100%) translateY(-100%) rotate(0deg);
    }

    50% {
        opacity: 0.3;
        transform: translateX(0%) translateY(0%) rotate(45deg);
    }
}

@keyframes glow {

    0%,
    100% {
        box-shadow:
            0 0 20px rgba(46, 111, 216, 0.3),
            0 0 40px rgba(16, 185, 129, 0.1);
    }

    50% {
        box-shadow:
            0 0 40px rgba(46, 111, 216, 0.5),
            0 0 60px rgba(16, 185, 129, 0.2);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

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

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

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

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .login-container {
        padding: 16px;
    }

    .login-card {
        padding: 32px 24px;
        border-radius: 24px;
    }

    .logo-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }

    .logo-text {
        font-size: 28px;
    }

    .lang-switcher {
        top: 16px;
        right: 16px;
    }

    .login-footer {
        bottom: 16px;
        font-size: 12px;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Focus Ring */
*:focus {
    outline: 2px solid var(--azure);
    outline-offset: 2px;
}

.form-input:focus,
.login-btn:focus {
    outline: none;
}

/* Floating Particles */
.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.6;
    animation: float 8s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}