* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

:root {
    --primary: #4E04D3;
    --primary-dark: #3E03A6;
    --primary-light: #5E2AE0;
    --accent: #3057F2;
    --accent-light: #4A76FF;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --dark-lighter: #334155;
    --light: #f8fafc;
    --gray: #94a3b8;
    --gray-light: #475569;
    --success: #10b981;
    --error: #ef4444;
    --border-radius: 16px;
    --shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: var(--light);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
}

/* Keep the background image but with updated colors */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("/themes/default/img/frontend/backgrounds/login.jpg");
    background-size: cover;
    background-position: center;
    filter: blur(6px) brightness(0.15) sepia(0.3) hue-rotate(-20deg);
    z-index: -1;
    transform: scale(1.1);
}

/* Add a subtle overlay with the new colors */
body::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(78, 4, 211, 0.03) 0%, 
        rgba(48, 87, 242, 0.02) 100%);
    z-index: -1;
}

.container {
    display: flex;
    width: 100%;
    max-width: 1000px;
    height: 600px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.05);
    animation: fadeIn 0.8s ease-out;
    backdrop-filter: blur(10px);
}

.login-section {
    flex: 1;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(30, 41, 59, 0.7);
    position: relative;
    overflow: hidden;
}

/* Subtle gradient border */
/* .login-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient);
    opacity: 0.8;
} */

/* Floating shapes - make sure this is visible */
.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: var(--gradient);
    opacity: 0.08;
    filter: blur(20px);
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 120px;
    height: 120px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 25s;
}

.shape-2 {
    width: 80px;
    height: 80px;
    bottom: 15%;
    right: 15%;
    animation-delay: -5s;
    animation-duration: 20s;
}

.shape-3 {
    width: 60px;
    height: 60px;
    top: 60%;
    left: 20%;
    animation-delay: -10s;
    animation-duration: 30s;
}

/* Add a couple more shapes for better effect */
.shape-4 {
    width: 90px;
    height: 90px;
    top: 20%;
    right: 10%;
    animation-delay: -15s;
    animation-duration: 22s;
    opacity: 0.05;
}

.shape-5 {
    width: 40px;
    height: 40px;
    bottom: 30%;
    left: 5%;
    animation-delay: -8s;
    animation-duration: 18s;
    opacity: 0.06;
}

.graphic-section {
    flex: 1;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.graphic-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("/themes/default/img/frontend/backgrounds/login.jpg");
    background-size: cover;
    background-position: center;
    opacity: 0.1;
    z-index: 0;
}

/* Add subtle pattern overlay */
.graphic-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.05) 2px, transparent 2px),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.03) 2px, transparent 2px);
    background-size: 40px 40px;
    opacity: 0.3;
    z-index: 0;
}

.graphic-content {
    text-align: center;
    color: white;
    z-index: 1;
    max-width: 100%;
    position: relative;
    animation: slideUp 0.8s ease-out 0.2s both;
}

.graphic-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.graphic-content p {
    font-size: 1.1rem;
    opacity: 0.95;
    line-height: 1.6;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.logo {
    text-align: center;
    margin-bottom: 2rem;
}

.logo img {
    height: 60px;
    max-width: 100%;
    filter: brightness(0) invert(1);
    transition: var(--transition);
}

.logo:hover img {
    transform: translateY(-2px);
}

.welcome-text {
    margin-bottom: 2rem;
    text-align: center;
}

.welcome-text h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--light);
    position: relative;
    display: inline-block;
}

.welcome-text h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: var(--gradient);
    border-radius: 1px;
}

.welcome-text p {
    color: var(--gray);
    font-size: 1rem;
    margin-top: 1rem;
}

.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    animation: slideIn 0.4s ease-out;
    font-size: 0.9rem;
    position: relative;
    z-index: 2;
    backdrop-filter: blur(5px);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.alert-success {
    color: var(--success);
    border-left: 3px solid var(--success);
}

.alert-error {
    color: var(--error);
    border-left: 3px solid var(--error);
}

.alert i {
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--light);
}

.input-with-icon {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    transition: var(--transition);
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: rgba(15, 23, 42, 0.6);
    color: var(--light);
    position: relative;
    z-index: 2;
    backdrop-filter: blur(5px);
}

.form-control::placeholder {
    color: var(--gray);
    opacity: 0.7;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(48, 87, 242, 0.15);
    background: rgba(15, 23, 42, 0.8);
}

.form-control:focus + .input-icon {
    color: var(--accent);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}

.checkbox-container {
    display: flex;
    align-items: center;
}

.checkbox {
    position: relative;
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 0.5rem;
}

.checkbox input {
    opacity: 0;
    width: 0;
    height: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(5px);
}

.checkbox input:checked ~ .checkmark {
    background: var(--gradient);
    border-color: transparent;
    box-shadow: 0 0 10px rgba(78, 4, 211, 0.3);
}

.checkmark:after {
    content: "✓";
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    display: none;
}

.checkbox input:checked ~ .checkmark:after {
    display: block;
}

.forgot-password {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
    font-weight: 500;
    position: relative;
    z-index: 10;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.forgot-password:hover {
    color: var(--accent-light);
    background: rgba(48, 87, 242, 0.1);
    text-decoration: none;
}

.btn {
    display: block;
    width: 100%;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 2;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(78, 4, 211, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(78, 4, 211, 0.3);
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.support-link {
    display: block;
    text-align: center;
    margin-top: 1.5rem;
    color: var(--gray);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
    position: relative;
    z-index: 10;
    padding: 0.5rem;
    border-radius: 4px;
}

.support-link:hover {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
}

.password-field {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: var(--transition);
    z-index: 3;
    background: rgba(255, 255, 255, 0.05);
}

.password-toggle:hover {
    color: var(--accent);
    background: rgba(48, 87, 242, 0.1);
}

.password-toggle:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.input-with-icon.password-field .form-control {
    padding-right: 45px;
}

.loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.loading span {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin: 0 2px;
    background-color: white;
    animation: loading 1.4s infinite ease-in-out both;
}

.loading span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading span:nth-child(2) {
    animation-delay: -0.16s;
}

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

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes loading {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(20px, -30px) rotate(120deg);
    }
    66% {
        transform: translate(-15px, 20px) rotate(240deg);
    }
}

/* Form autofill styling */
.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover,
.form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--light);
    -webkit-box-shadow: 0 0 0px 1000px rgba(15, 23, 42, 0.6) inset;
    transition: background-color 5000s ease-in-out 0s;
    border: 1px solid var(--accent);
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 0.5rem;
        overflow-y: auto;
        background: var(--dark);
    }
    
    .container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        border: 1px solid rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(20px);
    }
    
    .graphic-section {
        padding: 2rem 1rem;
        min-height: 250px;
        order: -1;
    }
    
    .graphic-content h2 {
        font-size: 1.5rem;
    }
    
    .graphic-content p {
        font-size: 1rem;
    }
    
    .login-section {
        padding: 2rem 1.5rem;
        background: rgba(30, 41, 59, 0.85);
    }
    
    /* Reduce floating shapes on mobile */
    .floating-shapes {
        display: none;
    }
}

@media (max-height: 700px) {
    .container {
        height: auto;
        min-height: auto;
        margin: 2rem 0;
    }
    
    .login-section {
        padding: 2rem;
    }
}