@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --colorPrimary: #0A172E;
    --colorSecondary: #61BB46;
    --colorActive: rgb(17, 173, 72);
}

body {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    background: linear-gradient(135deg, #0A172E 0%, #1a2a4e 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================
   PARTÍCULAS DE FONDO (CANVAS)
   ============================================ */

.background {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    z-index: 1;
}

/* ============================================
   HEADER / NAVEGACIÓN
   ============================================ */

header {
    width: 100%;
    height: 70px;
    position: fixed;
    z-index: 200;
    top: 0;
}

.nav {
    background-color: var(--colorPrimary);
    height: 70px;
    color: #fff;
    width: 100%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: width 0.3s;
}

.nav_container {
    display: flex;
    height: 100%;
    width: 90%;
    margin: 0 auto;
    justify-content: space-between;
    align-items: center;
}

.nav_menu {
    display: grid;
    grid-auto-flow: column;
    gap: 3em;
}

.nav_item {
    color: #fff;
    text-decoration: none;
    --clippy: polygon(100% 0, 100% 0, 100% 100%, 100% 100%);
    font-size: 20px;
    font-weight: 400;
}

.nav_item::after {
    content: "";
    display: block;
    background: #fff;
    width: 99%;
    margin-top: 3px;
    height: 3px;
    clip-path: var(--clippy);
    transition: clip-path .4s;
}

.nav_item:hover {
    --clippy: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

.nav_label,
.nav_input {
    display: none;
}

.nav_logo {
    width: 100px;
    height: 50px;
    object-fit: cover;
}

.active {
    color: var(--colorSecondary);
}

.active::after {
    background: var(--colorSecondary);
}

/* ============================================
   PAGE HEADER
   ============================================ */

.page-header {
    padding-top: 120px;
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    z-index: 2;
}

.header-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 25px;
    background: linear-gradient(135deg, #61BB46, #4fa838);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    color: white;
    box-shadow: 0 10px 30px rgba(97, 187, 70, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.page-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: #fff;
    font-weight: 800;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.page-subtitle {
    font-size: clamp(1rem, 2vw, 1.4rem);
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    padding-bottom: 100px;
}

.container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   TARJETAS DE INFORMACIÓN
   ============================================ */

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.info-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 25px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #61BB46, #4fa838);
    border-radius: 20px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.info-card:nth-child(2)::before {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.info-card:nth-child(3)::before {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.info-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.info-card:hover::before {
    opacity: 1;
}

.card-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #61BB46, #4fa838);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    flex-shrink: 0;
}

.info-card:nth-child(2) .card-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.info-card:nth-child(3) .card-icon {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.card-content h3 {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.card-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    margin-bottom: 8px;
}

.card-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   CONTENEDOR DEL GRÁFICO
   ============================================ */

.chart-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 50px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 20px;
}

.chart-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.chart-title i {
    color: var(--colorSecondary);
    font-size: 2rem;
}

.chart-title h2 {
    color: #fff;
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    font-weight: 700;
    margin: 0;
}

.chart-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.badge {
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge-live {
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
    color: white;
}

.badge-live i {
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.badge-updated {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

/* ============================================
   GRÁFICO
   ============================================ */

.chart-wrapper {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.chart-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 15px;
}

.chart-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(10, 23, 46, 0.95), transparent);
    padding: 25px;
}

.chart-stats {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
}

.stat-item i {
    color: var(--colorSecondary);
    font-size: 1.2rem;
}

/* ============================================
   INFORMACIÓN ADICIONAL
   ============================================ */

.additional-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.info-box {
    background: rgba(255, 255, 255, 0.03);
    border-left: 4px solid var(--colorSecondary);
    border-radius: 10px;
    padding: 25px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    transition: all 0.3s ease;
}

.info-box:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
}

.info-box i {
    color: var(--colorSecondary);
    font-size: 2rem;
    flex-shrink: 0;
    margin-top: 3px;
}

.info-box h4 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.info-box p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin: 0;
    font-size: 0.95rem;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
    background: #414141;
    padding: 30px 0 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 100%;
    position: relative;
    z-index: 2;
}

.footer__social {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.footer__img {
    width: 40px;
    height: 40px;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: brightness(0.8);
}

.footer__img:hover {
    transform: scale(1.2) rotate(5deg);
    filter: brightness(1.2);
}

.titulo-final {
    font-size: 1.5rem;
    color: var(--colorSecondary);
    font-weight: 600;
    margin: 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media screen and (max-width: 900px) {
    .info-cards {
        grid-template-columns: 1fr;
    }

    .chart-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .chart-stats {
        flex-direction: column;
    }

    .additional-info {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 768px) {
    .page-header {
        padding-top: 100px;
        margin-bottom: 40px;
    }

    .header-icon {
        width: 80px;
        height: 80px;
        font-size: 40px;
    }

    .info-card {
        padding: 25px 20px;
    }

    .card-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }

    .card-value {
        font-size: 1.8rem;
    }

    .chart-container {
        padding: 20px;
    }
}

@media screen and (max-width: 660px) {
    .nav_label {
        display: block;
        cursor: pointer;
        align-items: center;
        padding-top: 5px;
    }

    .nav_menu {
        position: fixed;
        top: 70px;
        bottom: 0;
        background-image: linear-gradient(to top, #00c6fb 0%, #005bea 100%);
        width: 100%;
        left: 0px;
        display: flex;
        justify-content: start;
        flex-direction: column;
        align-items: center;
        clip-path: circle(0 at center);
        transition: clip-path 0.5s;
        padding-top: 30px;
    }

    .nav_input:checked + .nav_menu {
        clip-path: circle(100% at center);
    }

    .nav_img {
        width: 30px;
        height: 30px;
    }

    .nav_logo {
        width: 65px;
        height: 35px;
    }

    .container {
        width: 95%;
        padding: 0 10px;
    }

    .chart-overlay {
        padding: 15px;
    }

    .stat-item {
        font-size: 0.85rem;
    }

    .info-box {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .info-box i {
        margin: 0 auto;
    }
}

@media screen and (max-width: 500px) {
    .page-title {
        font-size: 1.6rem;
    }

    .badge {
        font-size: 0.75rem;
        padding: 6px 12px;
    }

    .card-value {
        font-size: 1.6rem;
    }
}