:root {
    --bg-color: #0b0e17;
    --card-bg: rgba(20, 25, 40, 0.65);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --accent-color: #3b82f6; 
    --accent-hover: #2563eb;
    --input-bg: rgba(11, 14, 23, 0.8);
    --input-border: rgba(255, 255, 255, 0.12);
}

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

body {
    background-color: var(--bg-color); /* This is strictly #0b0e17 */
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Background Waves Animation */
.background-waves {
    position: absolute;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: flex-end;
    pointer-events: none;
}

.waves {
    position: relative;
    width: 100%;
    height: 40vh; /* height of the waves */
    margin-bottom: -7px; /* Fix for safari gap */
    min-height: 200px;
    max-height: 400px;
}

.parallax > use {
    animation: move-forever 25s cubic-bezier(.55,.5,.45,.5) infinite;
}
.parallax > use:nth-child(1) { animation-delay: -2s; animation-duration: 12s; }
.parallax > use:nth-child(2) { animation-delay: -3s; animation-duration: 15s; }
.parallax > use:nth-child(3) { animation-delay: -4s; animation-duration: 20s; }
.parallax > use:nth-child(4) { animation-delay: -5s; animation-duration: 30s; }

@keyframes move-forever {
    0% { transform: translate3d(-90px,0,0); }
    100% { transform: translate3d(85px,0,0); }
}

/* Main Container */
.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1080px; /* Increased to allow image to be larger */
    padding: 2rem;
    perspective: 1000px; /* for the 3d tilt effect */
}

/* Glassmorphism Card */
.login-card {
    background: transparent;
    border-radius: 14px; /* Reduced from 24px to be slightly more square */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255,255,255,0.1);
    animation: fade-in-up 0.8s ease-out forwards;
    transform: translateY(20px);
    opacity: 0;
    transform-style: preserve-3d;
    display: flex;
    flex-direction: row;
    overflow: hidden;
    border: 1px solid var(--card-border);
}

.login-left {
    flex: 1;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 3.5rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-right {
    flex: 1.7; /* Increased proportion to make image larger compared to form */
    background: #000206; /* Dark background to blend smoothly with the image */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.illustration {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    transform: translateZ(10px); /* Keeps the 3D pop effect */
    /* Adds a transparency gradient from left to right */
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 40%);
    mask-image: linear-gradient(to right, transparent 0%, black 40%);
    opacity: 0.35; /* Diminui a intensidade da imagem, deixando-a mais transparente/mesclada */
}

@keyframes fade-in-up {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.logo-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 2.5rem;
    transform: translateZ(30px); /* 3d pop effect */
}

.logo {
    height: 56px;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5));
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.welcome-text {
    font-size: 1.8rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    transform: translateZ(20px);
}

.subtitle {
    color: var(--text-secondary);
    text-align: center;
    font-size: 0.95rem;
    margin-bottom: 2.5rem;
    transform: translateZ(20px);
}

/* Form Styling */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transform: translateZ(10px);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding-left: 0.25rem;
}

.input-group input {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.input-group input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    background: rgba(11, 14, 23, 0.95);
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.remember-me input {
    accent-color: var(--accent-color);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.forgot-password {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.forgot-password:hover {
    color: var(--accent-hover);
}

.btn-login {
    background: linear-gradient(180deg, rgba(35, 40, 50, 1) 0%, rgba(15, 18, 25, 1) 100%);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    margin-top: 0.5rem;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        inset 0 1px 1px rgba(255, 255, 255, 0.15),
        inset 0 -1px 1px rgba(0, 0, 0, 0.8),
        0 8px 20px rgba(0, 0, 0, 0.6);
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    letter-spacing: 0.5px;
}

/* Ultra-premium diagonal shine effect */
.btn-login::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.06) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    transition: left 0.6s ease;
}

.btn-login:hover {
    background: linear-gradient(180deg, rgba(45, 50, 65, 1) 0%, rgba(20, 25, 35, 1) 100%);
    border-color: rgba(59, 130, 246, 0.5);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 
        inset 0 1px 1px rgba(255, 255, 255, 0.25),
        inset 0 -1px 1px rgba(0, 0, 0, 0.8),
        0 12px 25px rgba(37, 99, 235, 0.3);
}

.btn-login:hover::after {
    left: 200%;
}

.btn-login:active {
    transform: translateY(1px);
    box-shadow: 
        inset 0 2px 4px rgba(0,0,0,0.8),
        0 2px 5px rgba(0,0,0,0.5);
    background: rgba(15, 18, 25, 1);
}

.register-prompt {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    transform: translateZ(10px);
}

.register-prompt a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    margin-left: 0.25rem;
    transition: color 0.2s;
}

.register-prompt a:hover {
    color: var(--accent-color);
}

/* Responsiveness */
@media (max-width: 860px) {
    .login-card {
        flex-direction: column;
    }
    
    .login-right {
        display: none; /* Hide image on smaller screens */
    }
    
    .login-container {
        max-width: 480px;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 1rem;
    }
    
    .login-left {
        padding: 2rem 1.5rem;
    }
}
