
/* =====================================
   TAE SPACE - VOTACIONES
   DISEÑO EXCLUSIVO PARA CELULAR
===================================== */


/* CONFIGURACIÓN GENERAL */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --purple: #806096;
    --purple-light: #f0eaf4;
    --purple-bg: #f4f0f5;

    --pink-bg: #f7eaf0;
    --pink-text: #b36c87;

    --dark: #292433;
    --gray: #918b98;

    --border: #eae7eb;
}

html {
    width: 100%;
    background: #ffffff;
}

body {
    width: 100%;
    min-width: 0;
    min-height: 100vh;

    background: #ffffff;
    color: var(--dark);

    font-family: Arial, Helvetica, sans-serif;

    -webkit-font-smoothing: antialiased;
}

button {
    font-family: inherit;
    cursor: pointer;
}


/* CONTENEDOR PRINCIPAL */

.app {
    width: 100%;
    max-width: 430px;
    min-height: 100vh;

    margin: 0 auto;
    padding: 0 18px 30px;

    background: #ffffff;
    overflow-x: hidden;
}


/* =====================================
   PRESENTACIÓN CENTRADA
===================================== */

.intro {
    width: 100%;
    padding-top: 30px;

    text-align: center;
}

.eyebrow {
    color: #90749e;

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 2px;
    line-height: 1.4;

    margin-bottom: 10px;
}

.intro h1 {
    color: var(--dark);

    font-size: 29px;
    font-weight: 800;

    line-height: 1.15;
    letter-spacing: -0.7px;
}

.description {
    color: var(--gray);

    font-size: 13px;
    line-height: 1.4;

    margin-top: 8px;
    margin-bottom: 23px;
}


/* =====================================
   CATEGORÍAS
===================================== */


/* FILTROS CON DESLIZAMIENTO */

.categories {
    width: 100%;
    height: 44px;
    padding: 4px;

    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2px;

    position: relative;

    background: #f4f0f5;
    border-radius: 16px;

    margin-bottom: 23px;
}

/* FONDO BLANCO DESLIZANTE */

.category-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc((100% - 14px) / 4);
    height: 36px;
    background: #ffffff;
    border-radius: 13px;
    box-shadow: 0 2px 8px rgba(54, 39, 65, 0.08);
    transition: transform 0.3s cubic-bezier(.22, 1, .36, 1);
    pointer-events: none;
}

.categories[data-active="web"] .category-slider {
    transform: translateX(calc(100% + 2px));
}

.categories[data-active="app"] .category-slider {
    transform: translateX(calc((100% + 2px) * 2));
}

.categories[data-active="cumpleaños"] .category-slider {
    transform: translateX(calc((100% + 2px) * 3));
}

/* POSICIONES DEL FONDO */

.categories[data-active="web"] .category-slider {
    transform: translateX(calc(100% + 2px));
}

.categories[data-active="app"] .category-slider {
    transform: translateX(calc((100% + 2px) * 2));
}

.categories[data-active="cumpleaños"] .category-slider {
    transform: translateX(calc((100% + 2px) * 3));
}

/* BOTONES */

.category {
    position: relative;
    z-index: 1;

    min-width: 0;
    padding: 0 2px;

    border: none;
    border-radius: 13px;

    background: transparent;
    color: #77717e;

    font-size: 12px;
    font-weight: 700;

    white-space: nowrap;
    cursor: pointer;

    transition: color 0.25s ease;
}

.category.active {
    background: transparent;
    color: #806096;
}



/* =====================================
   TÍTULO DE VOTACIONES
===================================== */

.section-title {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 5px;

    margin: 0 2px 13px;
}

.section-title h2 {
    color: var(--dark);

    font-size: 14px;
    font-weight: 800;

    white-space: nowrap;
}

.section-title span {
    color: var(--gray);

    font-size: 13px;

    white-space: nowrap;
}


/* =====================================
   LISTA DE TARJETAS
===================================== */

.voting-list {
    display: flex;
    flex-direction: column;

    gap: 12px;
}


/* =====================================
   TARJETAS DE VOTACIÓN
===================================== */

.voting-card {
    width: 100%;

    padding: 12px 13px;

    background: #ffffff;

    border: 1px solid var(--border);
    border-radius: 17px;

    box-shadow: 0 1px 3px rgba(35, 25, 43, 0.025);
}


/* ETIQUETAS */

.card-top {
    display: flex;

    justify-content: space-between;
    align-items: center;

    margin-bottom: 10px;
}

.tag {
    min-width: 45px;
    height: 21px;

    padding: 0 9px;

    display: inline-flex;

    justify-content: center;
    align-items: center;

    border-radius: 20px;

    font-size: 10px;
    font-weight: 800;
}

.app-tag {
    color: #846995;
    background: var(--purple-light);
}

.countdown {
    color: var(--pink-text);
    background: var(--pink-bg);
}

/* INFORMACIÓN DE LA VOTACIÓN */

.card-heading {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    margin-bottom: 10px;
}

.voting-icon {
    width: 46px;
    height: 46px;
    min-width: 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #f1ebf5;
    border-radius: 11px;

    color: #806096;
}

.voting-icon svg {
    width: 24px;
    height: 24px;
}

.voting-info {
    flex: 1;
    min-width: 0;
    display: block;
    margin-bottom: 0;
}

.voting-details {
    width: 100%;
}

.voting-details {
    width: 100%;
}

.voting-details h3 {
    color: var(--dark);

    font-size: 13px;
    line-height: 1.2;

    font-weight: 800;

    margin-bottom: 3px;
}

.platform {
    color: var(--purple);

    font-size: 10px;
    line-height: 1.2;

    font-weight: 800;
    letter-spacing: 0.6px;
}

.date {
    color: var(--gray);

    font-size: 10px;
    line-height: 1.3;
}


/* =====================================
   BOTONES
===================================== */

.card-buttons {
    width: 100%;

    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 8px;
}

.card-buttons button {
    width: 100%;
    height: 33px;

    border: none;
    border-radius: 9px;

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 0.2px;
}

.vote-button {
    color: #ffffff;
    background: var(--purple);
}

.tutorial-button {
    color: var(--purple);
    background: #f2edf4;
}


/* =====================================
   MENSAJE SIN VOTACIONES
===================================== */

.empty-message {
    display: none;

    padding: 20px;

    text-align: center;

    color: var(--gray);
    font-size: 13px;
}


/* =====================================
   CELULARES PEQUEÑOS
===================================== */

@media (max-width: 350px) {

    .app {
        padding-left: 14px;
        padding-right: 14px;
    }

    .eyebrow {
        font-size: 10px;
        letter-spacing: 1.5px;
    }

    .intro h1 {
        font-size: 26px;
    }

    .category {
        font-size: 10px;
    }

    .section-title h2 {
        font-size: 13px;
    }

    .section-title span {
        font-size: 12px;
    }

    .voting-details h3 {
        font-size: 12px;
    }

    .date {
        font-size: 9px;
    }

    .card-heading {
        gap: 9px;
    }

    .voting-icon {
        width: 42px;
        height: 42px;
        min-width: 42px;
    }

    .voting-icon svg {
        width: 22px;
        height: 22px;
    }

}


/* =================================
   FILTRO DESPLEGABLE DE PLATAFORMAS
================================= */

.platform-filter {
    display: none;

    width: 100%;
    height: 39px;

    position: relative;

    margin-top: -12px;
    margin-bottom: 20px;
}

.platform-filter.visible {
    display: block;
}

.platform-filter select {
    width: 100%;
    height: 100%;

    padding: 0 35px 0 14px;

    appearance: none;
    -webkit-appearance: none;

    border: 1px solid #eae4ee;
    border-radius: 12px;

    outline: none;

    background: #ffffff;

    color: #806096;

    font-size: 12px;
    font-weight: 700;

    cursor: pointer;
}

.filter-arrow {
    position: absolute;

    right: 14px;
    top: 50%;

    transform: translateY(-55%);

    color: #806096;

    font-size: 19px;

    pointer-events: none;
}

/* AVISO DE BIENVENIDA */

.welcome-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 20px;

    background: rgba(35, 25, 43, 0.35);
    backdrop-filter: blur(3px);

    opacity: 1;
    transition: opacity 0.3s ease;
}

.welcome-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.welcome-box {
    width: 100%;
    max-width: 340px;

    padding: 30px 23px 23px;

    background: #ffffff;
    border: 1px solid #e9dfef;
    border-radius: 23px;

    text-align: center;

    box-shadow: 0 12px 40px rgba(54, 39, 65, 0.13);

    animation: welcomeAppear 0.4s ease;
}

.welcome-icon {
    color: #9878ac;
    font-size: 43px;
    line-height: 1;
    margin-bottom: 17px;
}

.welcome-box h2 {
    color: #493b54;
    font-size: 21px;
    line-height: 1.3;
    font-weight: 800;
    margin-bottom: 13px;
}

.welcome-box p {
    color: #756b7d;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 23px;
}

.welcome-box button {
    width: 100%;
    height: 45px;

    border: none;
    border-radius: 11px;

    background: #806096;
    color: #ffffff;

    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;

    cursor: pointer;
}

.welcome-box button:active {
    transform: scale(0.98);
}

@keyframes welcomeAppear {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 350px) {
    .welcome-box {
        padding: 26px 19px 20px;
    }

    .welcome-box h2 {
        font-size: 19px;
    }

    .welcome-box p {
        font-size: 12px;
    }
}


/* BENEFICIO Y CRONÓMETRO EN UNA LÍNEA */

.card-extra {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    margin-top: -5px;
    margin-bottom: 8px;
}

.card-benefit {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: fit-content;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    border-radius: 0;
}

.card-benefit span,
.card-benefit strong {
    font-size: 9px;
    font-weight: 700;
}

.card-benefit span {
    color: #a56b83;
}

.card-benefit strong {
    color: #a34f75;
}

/* CRONÓMETRO SIMPLE */

.timer-value {
    color: #604477;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.6px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}


/* =================================
   BOTÓN ÚNICO
================================= */

.card-buttons {
    grid-template-columns: 1fr;
}



#tituloAdmin {
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    cursor: pointer;
}




/* ACCESO PRIVADO DE ADMINISTRACIÓN */

.admin-login-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(41, 36, 51, 0.38);
}

.admin-login-overlay.show {
    display: flex;
}

.admin-login-box {
    position: relative;
    width: 100%;
    max-width: 330px;
    padding: 25px 20px 20px;
    border-radius: 18px;
    background: #fff;
    text-align: center;
}

.admin-login-box h2 {
    color: var(--dark);
    font-size: 18px;
}

.admin-login-box > p {
    margin-top: 7px;
    color: var(--gray);
    font-size: 11px;
}

.admin-login-close {
    position: absolute;
    top: 9px;
    right: 12px;
    border: 0;
    background: transparent;
    color: var(--gray);
    font-size: 23px;
    cursor: pointer;
}

#admin-login-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

#admin-password {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: none;
    font-size: 12px;
}

#admin-password:focus {
    border-color: var(--purple);
}

#admin-login-form button {
    height: 42px;
    border: 0;
    border-radius: 10px;
    background: var(--purple);
    color: white;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

#admin-login-error {
    min-height: 13px;
    color: #c45d78;
    font-size: 10px;
}

/* QUITAR RESALTADO AZUL AL TOCAR EN CELULARES */

button,
a,
.filter,
.category-tab,
button *,
a * {
    -webkit-tap-highlight-color: transparent;
}

/* QUITAR DESTELLO AZUL AL TOCAR EN CELULARES */

* {
    -webkit-tap-highlight-color: transparent;
}

button,
a,
[role="button"],
input,
select {
    -webkit-tap-highlight-color: transparent;
}