﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --negro: #0B0F19;
    --azul1: #14213D;
    --azul2: #1D3557;
    --celeste: #4EA8DE;
    --celesteClaro: #48CAE4;
    --texto: #FFFFFF;
}

body {
    font-family: 'Segoe UI',sans-serif;
    background: linear-gradient( 135deg, var(--negro), var(--azul1), var(--azul2), var(--azul1), var(--negro) );
    background-size: 400% 400%;
    animation: fondo 15s ease infinite;
    color: var(--texto);
    min-height: 100vh;
    overflow-x: hidden;
}

@keyframes fondo {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* HEADER */

header {
    text-align: center;
    padding: 20px;
}

.logo-reciclaje {
    font-size: 90px;
    animation: flotar 4s ease-in-out infinite;
    text-shadow: 0 0 15px #48CAE4, 0 0 30px #48CAE4;
}

@keyframes flotar {
    50% {
        transform: translateY(-12px);
    }
}

h1 {
    font-size: 3rem;
    letter-spacing: 3px;
    background: linear-gradient( 90deg, #00d4ff, #7df9ff, #00d4ff );
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 10px rgba(0,212,255,.5), 0 0 25px rgba(0,212,255,.3);
}

.subtitulo {
    margin-top: 10px;
    opacity: .8;
}

#hora {
    margin-top: 15px;
    font-size: 1.3rem;
    font-weight: bold;
}

/* CONTENEDOR */

.contenedor {
    width: 95%;
    max-width: 1500px;
    margin: auto;
}

/* PANEL */

.panel {
    background: rgba(20,33,61,.85);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 20px;
    margin-top: 20px;
    border: 1px solid rgba(78,168,222,.25);
    box-shadow: 0 0 15px rgba(78,168,222,.15);
    transition: .3s;
}

    .panel:hover {
        transform: translateY(-5px);
        box-shadow: 0 0 20px rgba(72,202,228,.5);
    }

/* CAMARA */

.camara-panel {
    max-width: 800px;
    margin: 20px auto;
    text-align: center;
}

    .camara-panel video {
        width: 100%;
        max-width: 650px;
        height: 340px;
        object-fit: cover;
        border-radius: 25px;
        border: 3px solid var(--celeste);
        box-shadow: 0 0 15px rgba(72,202,228,.5);
    }

.camara-botones {
    margin-top: 20px;
}

#btnCamara {
    border: none;
    padding: 12px 25px;
    border-radius: 12px;
    cursor: pointer;
    color: white;
    font-weight: bold;
    background: linear-gradient( 135deg, #1D3557, #4EA8DE );
    transition: .3s;
}

    #btnCamara:hover {
        transform: scale(1.05);
    }

/* IA */

.ia-panel {
    text-align: center;
}

#resultadoIA {
    margin-top: 15px;
    font-size: 2rem;
    font-weight: bold;
    color: #48CAE4;
    text-shadow: 0 0 15px #48CAE4;
}

/* TARJETAS */

.cards-container {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}

.card {
    width: 420px;
}

/* GAUGE */

.gauge {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    margin: 20px auto;
    background: conic-gradient( #48CAE4 0deg, #48CAE4 270deg, #111827 270deg );
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 20px #48CAE4;
}

.gauge2 {
    background: conic-gradient( #4EA8DE 0deg, #4EA8DE 220deg, #111827 220deg );
}

.gauge-center {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: #0B0F19;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-weight: bold;
}

/* BARRAS */

.barra {
    width: 100%;
    height: 18px;
    background: #111827;
    border-radius: 20px;
    overflow: hidden;
    margin-top: 15px;
}

.barra-fill {
    height: 100%;
    width: 50%;
}

.reciclable {
    background: linear-gradient( 90deg, #48CAE4, #90E0EF );
}

.basura {
    background: linear-gradient( 90deg, #4EA8DE, #48CAE4 );
}

/* GRAFICOS */

.grafico {
    height: 130px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.barra-g {
    width: 22px;
    border-radius: 8px 8px 0 0;
    background: linear-gradient( to top, #4EA8DE, #90E0EF );
    box-shadow: 0 0 10px #48CAE4;
    animation: subir 3s infinite;
}

.b1 {
    height: 40px;
}

.b2 {
    height: 65px;
}

.b3 {
    height: 90px;
}

.b4 {
    height: 115px;
}

.b5 {
    height: 140px;
}

@keyframes subir {
    50% {
        transform: translateY(-8px);
    }
}

.tendencia {
    text-align: center;
    margin-top: 10px;
    color: #48CAE4;
}

/* SENSORES */

.sensores,
.distancias {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}

.sensor,
.distancia-card {
    width: 280px;
    text-align: center;
}

    .sensor i,
    .distancia-card i {
        font-size: 50px;
        color: #48CAE4;
        margin-bottom: 10px;
    }

    .sensor span,
    .distancia-card span {
        display: block;
        margin-top: 10px;
        font-size: 1.8rem;
        font-weight: bold;
    }

/* PARTICULAS */

.particles span {
    position: fixed;
    opacity: .12;
    font-size: 30px;
    animation: particula 12s infinite;
}

    .particles span:nth-child(1) {
        top: 10%;
        left: 5%;
    }

    .particles span:nth-child(2) {
        top: 20%;
        right: 8%;
    }

    .particles span:nth-child(3) {
        bottom: 20%;
        left: 10%;
    }

    .particles span:nth-child(4) {
        bottom: 10%;
        right: 15%;
    }

    .particles span:nth-child(5) {
        top: 60%;
        left: 50%;
    }

@keyframes particula {
    50% {
        transform: translateY(-25px) rotate(15deg);
    }
}
