@import url('google-fonts.css');

:root {
    --brand-red: #8B2E2E;
    --brand-red-dark: #6d2424;
    --oil-gold: #f1c40f;

    /* Ultra Transparent Glass (Dark Theme) */
    --glass-bg: rgba(0, 0, 0, 0.2);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-color: #fff;
    --input-bg: rgba(255, 255, 255, 0.9);
    --input-text: #333;
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    width: 100vw;
    /* Dark Background Image */
    background: url('../img/dark_bg.png') no-repeat center center fixed;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* Illustration Background Layer (For animated palms) */
.illustration-bg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Animated Palms Positioning - Darker to blend */
.palm-tree {
    position: absolute;
    bottom: -20px;
    z-index: 0;
    width: 350px;
    height: auto;
    filter: brightness(0.6);
    /* Darken SVGs to match night theme */
}

.palm-left {
    left: -80px;
    transform: scale(1.3);
}

.palm-right {
    right: -80px;
    transform: scale(1.2) scaleX(-1);
}

.palm-center-left {
    left: 15%;
    bottom: 5%;
    transform: scale(0.9);
    opacity: 0.8;
}

.palm-center-right {
    right: 15%;
    bottom: 5%;
    transform: scale(1.0) scaleX(-1);
    opacity: 0.8;
}

/* Particle Container - ON TOP OF EVERYTHING */
#particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
}

.oil-drop {
    width: 4px;
    height: 8px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.8), var(--oil-gold));
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(241, 196, 15, 0.4);
    opacity: 0.6;
    position: absolute;
}

@keyframes fall {
    0% {
        transform: translateY(-50px);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    100% {
        transform: translateY(110vh);
        opacity: 0;
    }
}

/* Login Container */
.login-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
    z-index: 10;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-card {
    width: 100%;
    background: var(--glass-bg);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow: hidden;
    padding: 40px 30px;
    position: relative;
    transition: all 0.3s ease;
}

/* Logo Styling */
.logo-container {
    text-align: center;
    margin-bottom: 25px;
}

.logo-img {
    max-width: 250px;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

/* Toggle Switch */
.toggle-container {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 30px;
    padding: 5px;
    width: 100%;
}

.toggle-btn {
    flex: 1;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.toggle-btn.active {
    color: #fff;
    background: var(--brand-red);
    box-shadow: 0 4px 10px rgba(139, 46, 46, 0.4);
}

.toggle-btn:hover:not(.active) {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* Forms */
.form-section {
    display: none;
    animation: fadeIn 0.5s ease;
    width: 100%;
}

.form-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    text-align: center;
    margin-bottom: 25px;
}

.section-header h2 {
    color: #fff;
    font-weight: 700;
    font-size: 1.4rem;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.section-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 400;
}

/* Inputs */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-control-custom {
    width: 100%;
    padding: 14px 15px;
    padding-left: 45px;
    background: var(--input-bg);
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 1rem;
    color: var(--input-text);
    transition: all 0.3s ease;
}

.form-control-custom:focus {
    outline: none;
    background: #fff;
    border-color: var(--brand-red);
    box-shadow: 0 0 15px rgba(139, 46, 46, 0.3);
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--brand-red);
    font-size: 1.1rem;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
}

.toggle-password:hover {
    color: var(--brand-red);
}

/* Buttons */
.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--brand-red), var(--brand-red-dark));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    margin-top: 10px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.footer-text {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 25px;
    font-size: 0.85rem;
}

/* --- New Effects Styles --- */

/* Particle Wrapper (Handles Falling) */
.particle-wrapper {
    position: absolute;
    top: -50px;
    animation-name: fall;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    z-index: 1;
    /* Low z-index */
}

#particles-container {
    z-index: 1;
    /* Behind login but in front of background */
}

/* Oil Drops */
.oil-drop {
    width: 4px;
    height: 8px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.8), var(--oil-gold));
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(241, 196, 15, 0.4);
    opacity: 0.6;
}

/* Snowflakes */
.snowflake {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    opacity: 0.8;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

/* Christmas Lights */
.light-bulb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    opacity: 0.9;
    animation-name: blink;
    animation-duration: 1s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 0.4;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Rain */
.rain-drop {
    width: 2px;
    height: 20px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(100, 149, 237, 0.8));
    opacity: 0.6;
}

/* Palm Leaves (Updated to look like a palm frond) */
.leaf {
    width: 30px;
    height: 30px;
    /* Palm Frond SVG - Replace the 'd' paths below to customize the shape */
    background-image: url('/assets/img/efectos/leaf-palm.svg');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.9;
    animation-name: rotate;
    animation-duration: 3s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg) translateX(0);
    }

    100% {
        transform: rotate(360deg) translateX(20px);
    }
}