:root {
    --primary-color: #0d1b2a;
    --secondary-color: #1b263b;
    --accent-color: #2ec4b6;
    --bg-dark: #0a0a0a;
    --bg-dark-secondary: #1a1a1a;
    --bg-card: #242424;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --border-color: #333333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 50%, #0a0a0a 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Animated Background Elements */
body::before,
body::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
}

body::before {
    background: var(--accent-color);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

body::after {
    background: var(--accent-color);
    bottom: -200px;
    right: -200px;
    animation-delay: 10s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(100px, -100px) scale(1.1);
    }

    66% {
        transform: translate(-100px, 100px) scale(0.9);
    }
}

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 450px;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card {
    background: rgba(36, 36, 36, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 100px rgba(46, 196, 182, 0.1);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--secondary-color));
}

.logo-section {
    text-align: center;
    margin-bottom: 40px;
}

.logo-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--secondary-color) 100%);
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(46, 196, 182, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(46, 196, 182, 0.3);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 15px 40px rgba(46, 196, 182, 0.5);
    }
}

.logo-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.logo-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

.welcome-text {
    text-align: center;
    margin-bottom: 15px;
}

.welcome-text h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.welcome-text p {
    font-size: 14px;
    color: var(--text-secondary);
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 18px;
    transition: all 0.3s;
}

.form-control {
    background-color: var(--bg-dark-secondary);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    padding: 14px 18px 14px 50px;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s;
    width: 100%;
}

.form-control:focus {
    background-color: var(--bg-dark);
    border-color: var(--accent-color);
    color: var(--text-primary);
    box-shadow: 0 0 0 4px rgba(46, 196, 182, 0.1);
    outline: none;
}

.form-control:focus+.input-icon {
    color: var(--accent-color);
}

.password-toggle {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s;
    z-index: 10;
}

.password-toggle:hover {
    color: var(--accent-color);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.form-check {
    display: flex;
    align-items: center;
}

.form-check-input {
    width: 18px;
    height: 18px;
    background-color: var(--bg-dark-secondary);
    border: 2px solid var(--border-color);
    cursor: pointer;
    margin-right: 8px;
}

.form-check-input:checked {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.form-check-input:focus {
    box-shadow: 0 0 0 4px rgba(46, 196, 182, 0.1);
}

.form-check-label {
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}

.forgot-password {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.forgot-password:hover {
    color: #26a89a;
    text-decoration: underline;
}

.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--accent-color) 0%, #26a89a 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 8px 20px rgba(46, 196, 182, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(46, 196, 182, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.divider {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: var(--border-color);
}

.divider span {
    background: var(--bg-card);
    padding: 0 15px;
    color: var(--text-secondary);
    font-size: 14px;
    position: relative;
    z-index: 1;
}

.social-login {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.btn-social {
    padding: 12px;
    background: var(--bg-dark-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-social:hover {
    background: var(--bg-dark);
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.btn-social i {
    font-size: 18px;
}

.register-link {
    text-align: center;
    margin-top: 30px;
    color: var(--text-secondary);
    font-size: 14px;
}

.register-link a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.register-link a:hover {
    color: #26a89a;
    text-decoration: underline;
}

.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-danger {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: #e74c3c;
}

.alert-success {
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid rgba(46, 204, 113, 0.3);
    color: #2ecc71;
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px 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);
    }
}

.footer-text {
    text-align: center;
    margin-top: 30px;
    color: var(--text-secondary);
    font-size: 12px;
}

/* Responsive */
@media (max-width: 576px) {
    .login-card {
        padding: 40px 30px;
    }

    .logo-title {
        font-size: 28px;
    }

    .welcome-text h2 {
        font-size: 20px;
    }

    .social-login {
        grid-template-columns: 1fr;
    }
}

/* Theme variants support */
[data-theme="dark-red"] {
    --primary-color: #1a1a2e;
    --secondary-color: #0f3460;
    --accent-color: #e94560;
}

[data-theme="dark-purple"] {
    --primary-color: #1e1b4b;
    --secondary-color: #312e81;
    --accent-color: #a855f7;
}

[data-theme="dark-green"] {
    --primary-color: #052e16;
    --secondary-color: #14532d;
    --accent-color: #10b981;
}