/* static/css/landing.css */

/* Fondo animado con gradiente */
.login-bg {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 40%, #0c1a2e 70%, #0f172a 100%);
    background-size: 400% 400%;
    animation: gradientShift 12s ease infinite;
    min-height: 100svh;
    overflow-y: auto;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Partículas flotantes */
.particle {
    position: absolute;
    border-radius: 50%;
    animation: floatParticle linear infinite;
    pointer-events: none;
}

@keyframes floatParticle {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }

    10% {
        opacity: 0.6;
    }

    90% {
        opacity: 0.3;
    }

    100% {
        transform: translateY(-10vh) scale(1.2);
        opacity: 0;
    }
}

/* Glow animado para el card */
.login-card {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(6, 182, 212, 0.15);
    box-shadow: 0 0 60px rgba(6, 182, 212, 0.07),
        0 25px 50px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: box-shadow 0.4s ease;
}

.login-card:hover {
    box-shadow: 0 0 80px rgba(6, 182, 212, 0.15),
        0 30px 60px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

/* Imagen overlay futurista */
.image-overlay {
    background: linear-gradient(to right,
            rgba(6, 182, 212, 0.15) 0%,
            rgba(15, 23, 42, 0.5) 100%);
}

/* Input glow al enfocar */
input:focus {
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.25) !important;
}

/* Botón con shimmer */
.btn-login {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 50%, #164e63 100%);
    background-size: 200% 200%;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 60%;
    height: 200%;
    background: rgba(255, 255, 255, 0.12);
    transform: skewX(-20deg);
    transition: left 0.5s ease;
}

.btn-login:hover::before {
    left: 120%;
}

.btn-login:hover {
    background-position: right center;
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.5), 0 8px 20px rgba(0, 0, 0, 0.4);
    transform: translateY(-1px);
}

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

/* Badge de estado del sistema */
.status-badge {
    animation: pulseBadge 2s ease-in-out infinite;
}

@keyframes pulseBadge {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }
}

/* Línea divisora con gradiente */
.divider-line {
    background: linear-gradient(to right, transparent, rgba(6, 182, 212, 0.4), transparent);
    height: 1px;
}

/* Social buttons */
.social-btn {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    transition: all 0.3s ease;
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(6, 182, 212, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.2);
}

/* Logo scan effect */
.scan-line {
    animation: scan 3s linear infinite;
}

@keyframes scan {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    80% {
        opacity: 1;
    }

    100% {
        transform: translateY(400%);
        opacity: 0;
    }
}

/* Stat cards */
.stat-card {
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(6, 182, 212, 0.2);
    backdrop-filter: blur(8px);
    animation: fadeInUp 0.6s ease both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Toggle password */
.toggle-pw {
    cursor: pointer;
    color: rgba(148, 163, 184, 0.7);
    transition: color 0.2s;
}

.toggle-pw:hover {
    color: rgb(6, 182, 212);
}

/* Form label accent */
.form-label {
    color: #94a3b8;
    font-size: 0.8rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

/* Animación de entrada del card */
.slide-in {
    animation: slideIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ── CSS-only parking background ─────────────────── */

/* Fondo base del lado izquierdo */
.parking-bg {
    background:
        radial-gradient(ellipse at 15% 85%, rgba(6, 182, 212, 0.22) 0%, transparent 45%),
        radial-gradient(ellipse at 85% 15%, rgba(124, 58, 237, 0.18) 0%, transparent 45%),
        radial-gradient(ellipse at 50% 50%, rgba(14, 116, 144, 0.12) 0%, transparent 65%),
        linear-gradient(135deg, #060d1a 0%, #0c1f3a 40%, #071525 70%, #060d1a 100%);
}

/* Grid perspectiva */
.perspective-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(6, 182, 212, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(6, 182, 212, 0.12) 1px, transparent 1px);
    background-size: 48px 48px;
    transform: perspective(500px) rotateX(35deg) scaleX(1.3);
    transform-origin: bottom center;
    animation: gridPulse 4s ease-in-out infinite;
}

@keyframes gridPulse {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

/* Carretera central */
.road-lane {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) perspective(400px) rotateX(30deg);
    width: 120px;
    height: 70%;
    border-left: 3px solid rgba(6, 182, 212, 0.4);
    border-right: 3px solid rgba(6, 182, 212, 0.4);
    transform-origin: bottom center;
}

.road-lane::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 100%;
    background: repeating-linear-gradient(to bottom,
            rgba(255, 255, 255, 0.15) 0px,
            rgba(255, 255, 255, 0.15) 20px,
            transparent 20px,
            transparent 40px);
    animation: roadMove 1.5s linear infinite;
}

@keyframes roadMove {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 0 40px;
    }
}

/* Spot de parqueo (rectángulo brilliant) */
.park-spot {
    position: absolute;
    border: 1px solid rgba(6, 182, 212, 0.35);
    border-radius: 4px;
    animation: spotGlow 3s ease-in-out infinite;
}

.park-spot.free {
    border-color: rgba(34, 197, 94, 0.5);
    background: rgba(34, 197, 94, 0.06);
}

.park-spot.taken {
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.05);
}

@keyframes spotGlow {

    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }
}

/* Holo ring de escaneo */
.holo-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(6, 182, 212, 0.7);
    animation: holoExpand 2.5s ease-out infinite;
}

.holo-ring::after {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    border: 1px solid rgba(6, 182, 212, 0.4);
}

@keyframes holoExpand {
    0% {
        transform: scale(0.6);
        opacity: 0;
    }

    30% {
        opacity: 1;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Auto CSS */
.css-car {
    position: absolute;
    animation: carDrive linear infinite;
}

.css-car .car-body {
    width: 80px;
    height: 30px;
    border-radius: 8px 8px 4px 4px;
    position: relative;
}

.css-car .car-roof {
    position: absolute;
    top: -18px;
    left: 14px;
    width: 50px;
    height: 20px;
    border-radius: 8px 8px 0 0;
}

.css-car .wheel {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    bottom: -7px;
    background: #1e293b;
    border: 2px solid #475569;
}

.css-car .wheel.front {
    right: 10px;
}

.css-car .wheel.back {
    left: 10px;
}

.css-car .headlight {
    position: absolute;
    width: 8px;
    height: 5px;
    border-radius: 2px;
    top: 10px;
    animation: headlightBlink 0.1s linear;
}

@keyframes carDrive {
    from {
        transform: translateX(-140px);
    }

    to {
        transform: translateX(800px);
    }
}

@keyframes headlightBlink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Floating data panel */
.data-panel {
    background: rgba(6, 182, 212, 0.07);
    border: 1px solid rgba(6, 182, 212, 0.25);
    border-radius: 10px;
    backdrop-filter: blur(4px);
    animation: panelFloat 4s ease-in-out infinite;
}

@keyframes panelFloat {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-6px);
    }
}

/* LED strips */
.led-strip {
    height: 2px;
    border-radius: 1px;
    background: linear-gradient(to right, transparent, rgba(6, 182, 212, 0.8), rgba(6, 182, 212, 0.3), transparent);
    animation: ledFlow 2s linear infinite;
    background-size: 200% 100%;
}

@keyframes ledFlow {
    from {
        background-position: 100% 0;
    }

    to {
        background-position: -100% 0;
    }
}

/* ── Optimizaciones con @media screen para 1360×768 ── */

@media screen and (max-width: 1400px) {
    .login-bg {
        padding: 0.75rem !important;
    }

    .login-card {
        max-width: 820px !important;
    }

    .slide-in-left h2 {
        font-size: 1.45rem !important;
        line-height: 1.25 !important;
    }

    .slide-in {
        padding: 1.5rem !important;
    }

    h1 {
        font-size: 1.4rem !important;
    }

    .stat-card p.text-lg {
        font-size: 0.85rem !important;
    }

    .stat-card i {
        font-size: 0.95rem !important;
    }
}

@media screen and (max-width: 1400px) and (max-height: 800px) {
    .login-bg {
        padding: 0.5rem !important;
        align-items: center;
    }

    .login-card {
        max-width: 800px !important;
        min-height: auto !important;
    }

    .slide-in-left .relative.z-10 {
        padding: 1rem !important;
        min-height: 220px !important;
    }

    .slide-in-left h2 {
        font-size: 1.25rem !important;
        margin-bottom: 0.35rem !important;
    }

    .slide-in-left p {
        font-size: 0.72rem !important;
    }

    .slide-in {
        padding: 1.25rem 1.5rem !important;
    }

    h1 {
        font-size: 1.2rem !important;
        margin-bottom: 0.15rem !important;
    }

    .slide-in .w-12,
    .slide-in .h-12,
    .slide-in .w-16,
    .slide-in .h-16 {
        width: 2.5rem !important;
        height: 2.5rem !important;
    }

    .slide-in .fa-square-parking {
        font-size: 1.2rem !important;
    }

    .mb-5,
    .mb-6,
    .mb-8 {
        margin-bottom: 0.65rem !important;
    }

    .mb-4,
    .mt-8 {
        margin-top: 0.5rem !important;
        margin-bottom: 0.5rem !important;
    }

    .py-3\.5 {
        padding-top: 0.55rem !important;
        padding-bottom: 0.55rem !important;
    }

    .btn-login {
        padding-top: 0.6rem !important;
        padding-bottom: 0.6rem !important;
        font-size: 0.85rem !important;
    }

    .stat-card {
        padding: 0.4rem 0.3rem !important;
    }

    .stat-card p.text-lg {
        font-size: 0.78rem !important;
    }

    .social-btn.w-12,
    .social-btn.h-12 {
        width: 2.5rem !important;
        height: 2.5rem !important;
    }

    .slide-in>p.text-slate-400 {
        font-size: 0.7rem !important;
        margin-bottom: 0.75rem !important;
    }

    .flex.items-center.gap-3.mb-5,
    .flex.justify-center.gap-3 {
        display: none !important;
    }
}

@media screen and (max-height: 720px) {

    .stat-card-container,
    .data-panel,
    .led-strip {
        display: none !important;
    }

    .parking-bg {
        opacity: 0.4;
    }

    .login-card {
        overflow-y: auto;
    }
}