
/* =========================================
   TOOLZONA - DISEÑO PROFESIONAL 2.0
========================================= */


/* VARIABLES DE COLORES */

:root {

    --fondo: #080d19;
    --fondo-secundario: #0f172a;
    --tarjeta: #111a2b;
    --campo: #0b1220;

    --primario: #6366f1;
    --primario-hover: #4f46e5;
    --acento: #a5b4fc;

    --texto: #f1f5f9;
    --texto-secundario: #94a3b8;

    --borde: #26334b;
    --fondo-icono: #29264d;
    --fondo-cabecera: rgba(8, 13, 25, 0.94);

    --sombra: 0 15px 40px rgba(0, 0, 0, 0.25);

    color-scheme: dark;

}


/* MODO CLARO - PREPARADO PARA ACTIVAR */

body.modo-claro {

    --fondo: #f8fafc;
    --fondo-secundario: #eef2ff;
    --tarjeta: #ffffff;
    --campo: #f8fafc;

    --primario: #4f46e5;
    --primario-hover: #4338ca;
    --acento: #4338ca;

    --texto: #0f172a;
    --texto-secundario: #475569;

    --borde: #dce3ed;
    --fondo-icono: #e0e7ff;
    --fondo-cabecera: rgba(255, 255, 255, 0.94);

    --sombra: 0 15px 40px rgba(15, 23, 42, 0.08);

    color-scheme: light;

}


/* CONFIGURACIÓN GENERAL */

* {

    margin: 0;
    padding: 0;
    box-sizing: border-box;

}

[hidden] {

    display: none !important;

}

html {

    scroll-behavior: smooth;
    scroll-padding-top: 100px;

}

body {

    font-family: Arial, Helvetica, sans-serif;
    background: var(--fondo);
    color: var(--texto);
    line-height: 1.6;
    min-height: 100vh;

    transition:
        background 0.25s ease,
        color 0.25s ease;

}

button,
input,
textarea,
select {

    font: inherit;

}

button,
a,
input,
textarea,
select {

    -webkit-tap-highlight-color: transparent;

}

a {

    color: inherit;
    text-decoration: none;

}

button {

    cursor: pointer;

}

button:focus-visible,
a:focus-visible {

    outline: 3px solid var(--acento);
    outline-offset: 4px;

}


/* =========================================
   CABECERA
========================================= */

header {

    position: sticky;
    top: 0;
    z-index: 100;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;

    padding: 18px max(5%, calc((100% - 1300px) / 2));

    background: var(--fondo-cabecera);

    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);

    border-bottom: 1px solid var(--borde);

}


/* LOGOTIPO */

.logo {

    font-size: 30px;
    font-weight: 900;
    letter-spacing: -1.5px;

    white-space: nowrap;

}

.logo span {

    color: var(--acento);

}


/* NAVEGACIÓN */

nav {

    display: flex;
    align-items: center;
    gap: 30px;

}

nav a {

    font-size: 14px;
    font-weight: 600;
    color: var(--texto-secundario);

    transition: color 0.2s ease;

}

nav a:hover {

    color: var(--acento);

}


/* =========================================
   PORTADA PRINCIPAL
========================================= */

.hero {

    position: relative;

    text-align: center;

    padding: 100px 20px 85px;

    overflow: hidden;

    background:

        radial-gradient(
            ellipse at 50% 0%,
            rgba(99, 102, 241, 0.20),
            transparent 65%
        ),

        var(--fondo);

}


/* ETIQUETA SUPERIOR */

.etiqueta {

    display: inline-block;

    padding: 8px 18px;

    background: var(--fondo-icono);
    color: var(--acento);

    border: 1px solid rgba(99, 102, 241, 0.35);

    border-radius: 50px;

    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;

    margin-bottom: 24px;

}


/* TÍTULO PRINCIPAL */

.hero h1 {

    max-width: 1000px;

    margin: 0 auto 22px;

    font-size: clamp(36px, 5.5vw, 66px);
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -2px;

    color: var(--texto);

}


/* DESCRIPCIÓN */

.hero p {

    max-width: 680px;

    margin: 0 auto 36px;

    font-size: 18px;

    color: var(--texto-secundario);

}


/* =========================================
   BUSCADOR
========================================= */

#buscador {

    display: block;

    width: 100%;
    max-width: 620px;

    margin: 0 auto;

    padding: 20px 24px 20px 54px;

    border: 1px solid var(--borde);
    border-radius: 16px;

    background-color: var(--tarjeta);

    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23818cf8' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");

    background-repeat: no-repeat;
    background-position: 19px center;

    color: var(--texto);

    font-size: 16px;

    box-shadow: var(--sombra);

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;

}

#buscador::placeholder {

    color: var(--texto-secundario);

}

#buscador:focus {

    border-color: var(--primario);

    box-shadow:
        0 0 0 4px rgba(99, 102, 241, 0.15);

}


/* =========================================
   CONTENIDO PRINCIPAL
========================================= */

main {

    width: 92%;
    max-width: 1300px;

    margin: 0 auto;

    padding-bottom: 70px;

}

main > h2 {

    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;

    margin-bottom: 28px;

}


/* CUADRÍCULA DE HERRAMIENTAS */

.contenedor {

    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(250px, 1fr));

    gap: 22px;

}


/* =========================================
   TARJETAS
========================================= */

.tarjeta {

    position: relative;

    display: flex;
    flex-direction: column;

    min-width: 0;

    background: var(--tarjeta);

    border: 1px solid var(--borde);
    border-radius: 20px;

    padding: 26px;

    overflow: hidden;

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;

}

.tarjeta::before {

    content: "";

    position: absolute;

    top: 0;
    left: 0;
    right: 0;

    height: 3px;

    background: linear-gradient(
        90deg,
        #6366f1,
        #a855f7
    );

    opacity: 0;

    transition: opacity 0.25s ease;

}

@media (hover: hover) {

    .tarjeta:hover {

        transform: translateY(-6px);

        border-color: var(--primario);

        box-shadow: var(--sombra);

    }

    .tarjeta:hover::before {

        opacity: 1;

    }

}


/* ICONOS */

.icono {

    display: flex;

    align-items: center;
    justify-content: center;

    width: 58px;
    height: 58px;

    background: var(--fondo-icono);

    border: 1px solid rgba(99, 102, 241, 0.18);

    border-radius: 16px;

    font-size: 28px;

    margin-bottom: 20px;

}


/* TÍTULOS DE LAS TARJETAS */

.tarjeta h3 {

    font-size: 19px;
    line-height: 1.4;

    margin-bottom: 10px;

    font-weight: 700;

}


/* DESCRIPCIONES */

.tarjeta p {

    font-size: 14px;
    line-height: 1.7;

    color: var(--texto-secundario);

    margin-bottom: 24px;

}


/* BOTONES */

.tarjeta button {

    width: 100%;

    margin-top: auto;

    padding: 13px 15px;

    border: none;
    border-radius: 10px;

    background: linear-gradient(
        135deg,
        #6366f1,
        #4f46e5
    );

    color: #ffffff;

    font-size: 14px;
    font-weight: 700;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;

}

.tarjeta button::after {

    content: " →";

}

.tarjeta button:hover {

    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.3);

}

.tarjeta button:active {

    transform: scale(0.98);

}


/* =========================================
   PANEL DE HERRAMIENTAS
========================================= */

#panel {

    width: 100%;
    max-width: 850px;

    margin: 45px auto;

    padding: 35px;

    background: var(--tarjeta);

    border: 1px solid var(--borde);
    border-radius: 24px;

    box-shadow: var(--sombra);

    scroll-margin-top: 100px;

    animation: aparecer 0.3s ease;

}

@keyframes aparecer {

    from {

        opacity: 0;
        transform: translateY(12px);

    }

    to {

        opacity: 1;
        transform: translateY(0);

    }

}

#panel h2 {

    font-size: 28px;
    line-height: 1.3;

    margin-bottom: 20px;

}

#panel p {

    color: var(--texto-secundario);

    font-size: 14px;

    margin-bottom: 20px;

}

#panel label {

    display: block;

    margin: 16px 0 8px;

    font-size: 14px;
    font-weight: 600;

}


/* CAMPOS DE FORMULARIO */

#panel input,
#panel textarea,
#panel select {

    display: block;

    width: 100%;
    min-width: 0;

    padding: 14px 16px;

    margin-bottom: 16px;

    background: var(--campo);

    color: var(--texto);

    border: 1px solid var(--borde);
    border-radius: 10px;

    outline: none;

    font-size: 16px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;

}

#panel input:focus,
#panel textarea:focus,
#panel select:focus {

    border-color: var(--primario);

    box-shadow:
        0 0 0 3px rgba(99, 102, 241, 0.15);

}

#panel input::placeholder,
#panel textarea::placeholder {

    color: var(--texto-secundario);

}

#panel textarea {

    min-height: 140px;

    resize: vertical;

}


/* SUBIR ARCHIVOS */

#panel input[type="file"] {

    padding: 16px;

    border: 2px dashed var(--borde);

}

#panel input[type="file"]::file-selector-button {

    padding: 10px 15px;

    margin-right: 12px;

    background: var(--primario);

    color: white;

    border: none;
    border-radius: 8px;

    cursor: pointer;

}


/* BOTONES DEL PANEL */

#panel button {

    padding: 12px 20px;

    margin: 5px 6px 5px 0;

    border: none;
    border-radius: 10px;

    background: var(--primario);

    color: #ffffff;

    font-size: 14px;
    font-weight: 600;

    transition:
        background 0.2s ease,
        transform 0.2s ease;

}

#panel button:hover {

    background: var(--primario-hover);

}

#panel button:active {

    transform: scale(0.98);

}


/* =========================================
   RESULTADOS
========================================= */

#resultado {

    padding: 22px;

    margin-top: 25px;

    background: var(--fondo-secundario);

    border: 1px solid var(--borde);
    border-left: 4px solid var(--primario);

    border-radius: 12px;

    color: var(--acento);

    font-size: 17px;
    line-height: 1.9;

    white-space: pre-wrap;
    overflow-wrap: anywhere;

}

#resultado:empty {

    display: none;

}

#tiempo,
#pantallaTimer {

    color: var(--acento) !important;

    font-variant-numeric: tabular-nums;

}


/* =========================================
   ESTADÍSTICAS - PRÓXIMA ACTUALIZACIÓN
========================================= */

.estadisticas {

    display: flex;

    justify-content: center;
    flex-wrap: wrap;

    gap: 45px;

    margin-top: 35px;

}

.estadistica {

    display: flex;
    flex-direction: column;

    text-align: center;

}

.estadistica strong {

    font-size: 28px;

    color: var(--acento);

}

.estadistica span {

    font-size: 13px;

    color: var(--texto-secundario);

}


/* =========================================
   CATEGORÍAS - PRÓXIMA ACTUALIZACIÓN
========================================= */

.categorias {

    display: flex;

    justify-content: center;
    flex-wrap: wrap;

    gap: 12px;

    margin: 0 0 35px;

}

.categoria-btn {

    padding: 11px 20px;

    border: 1px solid var(--borde);
    border-radius: 50px;

    background: var(--tarjeta);

    color: var(--texto-secundario);

    font-size: 14px;
    font-weight: 600;

    transition: all 0.2s ease;

}

.categoria-btn:hover,
.categoria-btn.activa {

    background: var(--primario);

    border-color: var(--primario);

    color: #ffffff;

}


/* BOTÓN DE CAMBIO DE TEMA */

#botonTema {

    display: flex;

    justify-content: center;
    align-items: center;

    width: 42px;
    height: 42px;

    background: var(--tarjeta);

    border: 1px solid var(--borde);
    border-radius: 12px;

    color: var(--texto);

    font-size: 20px;

}

#botonTema:hover {

    border-color: var(--primario);

}


/* =========================================
   ESPACIO PUBLICITARIO
========================================= */

.publicidad {

    display: flex;

    align-items: center;
    justify-content: center;

    min-height: 120px;

    margin-top: 50px;

    padding: 20px;

    background: var(--fondo-secundario);

    border: 1px dashed var(--borde);
    border-radius: 16px;

    color: var(--texto-secundario);

    font-size: 12px;
    letter-spacing: 2px;

    text-transform: uppercase;

}


/* =========================================
   PIE DE PÁGINA
========================================= */

footer {

    padding: 35px 20px;

    text-align: center;

    background: var(--fondo-secundario);

    border-top: 1px solid var(--borde);

    color: var(--texto-secundario);

    font-size: 13px;

}

footer a:hover {

    color: var(--acento);

}


/* =========================================
   DISEÑO RESPONSIVE - TABLETS
========================================= */

@media (max-width: 900px) {

    .hero {

        padding: 75px 20px 65px;

    }

    .contenedor {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 16px;

    }

    .tarjeta {

        padding: 22px;

    }

}


/* =========================================
   DISEÑO RESPONSIVE - MÓVILES
========================================= */

@media (max-width: 600px) {

    header {

        padding: 15px 5%;

        gap: 10px;

    }

    .logo {

        font-size: 25px;

    }

    nav {

        gap: 12px;

    }

    nav a {

        font-size: 12px;

    }

    .hero {

        padding: 55px 18px 45px;

    }

    .hero h1 {

        font-size: 36px;
        letter-spacing: -1px;

    }

    .hero p {

        font-size: 15px;

    }

    .etiqueta {

        font-size: 10px;

    }

    #buscador {

        padding: 16px 15px 16px 48px;

        background-position: 15px center;

        font-size: 16px;

    }

    main {

        width: 92%;

        padding-bottom: 40px;

    }

    main > h2 {

        font-size: 23px;

    }

    .contenedor {

        grid-template-columns: 1fr;

        gap: 15px;

    }

    .tarjeta {

        padding: 22px;

        border-radius: 16px;

    }

    .tarjeta h3 {

        font-size: 18px;

    }

    .icono {

        width: 50px;
        height: 50px;

        font-size: 25px;

    }

    #panel {

        padding: 20px;

        border-radius: 16px;

    }

    #panel h2 {

        font-size: 23px;

    }

    #panel button {

        width: 100%;

        margin: 5px 0;

    }

    #resultado {

        font-size: 15px;

        padding: 16px;

    }

    .estadisticas {

        gap: 20px;

    }

    .estadistica strong {

        font-size: 23px;

    }

    .categorias {

        gap: 8px;

    }

    .categoria-btn {

        padding: 9px 14px;

        font-size: 12px;

    }

    .publicidad {

        min-height: 90px;

        margin-top: 30px;

    }

}


/* ACCESIBILIDAD: REDUCIR ANIMACIONES */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {

        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;

    }

}


/* =========================================
   FIN DEL DISEÑO TOOLZONA 2.0
========================================= */
