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

:root {
    --primary: #7E2BB5;
    --primary-dark: #7E2BB5;
    --primary-light: #7E2BB5;
    --secondary: #8b5cf6;
    --bg-light: #f8f7ff;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --error: #ef4444;
    --success: #10b981;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #7E2BB5 0%, #7E2BB5 50%, #7E2BB5 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.gradient-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 8s ease-in-out infinite;
}

.blob-1 {
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.blob-2 {
    width: 250px;
    height: 250px;
    background: rgba(168, 85, 247, 0.2);
    bottom: -50px;
    right: -50px;
    animation-delay: 2s;
}

.blob-3 {
    width: 200px;
    height: 200px;
    background: rgba(139, 92, 246, 0.15);
    top: 50%;
    right: 10%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(30px, -30px);
    }
}

.login-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 48px 40px;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.logo {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #7E2BB5, #7E2BB5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.subtitle {
    color: var(--text-light);
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input[type="email"],
.form-group input[type="password"] {
    height: 40px;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: var(--bg-light);
}

.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    width: 100%;
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: var(--primary);
}

.form-group.checkbox {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.form-group.checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.form-group.checkbox label {
    margin: 0;
    cursor: pointer;
    font-weight: 500;
}

.login-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #7E2BB5, #7E2BB5);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    position: relative;
    overflow: hidden;
}

.login-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(124, 58, 237, 0.3);
}

.login-btn:active:not(:disabled) {
    transform: translateY(0);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.login-btn .spinner {
    display: none;
    animation: spin 1s linear infinite;
}

.login-btn.loading .spinner {
    display: block;
}

.login-btn.loading span {
    display: none;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.error-message {
    font-size: 13px;
    color: var(--error);
    display: none;
    margin-top: -4px;
}

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

.success-message {
    font-size: 14px;
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
    padding: 12px 16px;
    border-radius: 8px;
    display: none;
    text-align: center;
}

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

#generalError {
    background: rgba(239, 68, 68, 0.1);
    padding: 12px 16px;
    border-radius: 8px;
}

.login-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.login-footer p {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-footer ul {
    list-style: none;
}

.login-footer li {
    font-size: 12px;
    color: var(--text-dark);
    margin: 6px 0;
    font-family: 'Courier New', monospace;
}

.login-footer strong {
    color: var(--primary);
}

@media (max-width: 480px) {
    .login-box {
        padding: 32px 24px;
    }

    .logo {
        font-size: 28px;
    }

    .login-btn {
        padding: 14px 20px;
        font-size: 15px;
    }

    .blob-1,
    .blob-2,
    .blob-3 {
        filter: blur(60px);
    }
}

@media (max-width: 360px) {
    .login-container {
        max-width: 100%;
    }

    .login-box {
        padding: 24px 16px;
        border-radius: 12px;
    }

    .login-header {
        margin-bottom: 24px;
    }

    .login-form {
        gap: 16px;
    }

    .login-footer {
        margin-top: 24px;
        padding-top: 16px;
    }
}
