/* =========================================
   VARIABLES
   ========================================= */

:root {
    /* --- Colors --- */
    --bg-color: #000000;

    --text-primary: #FFFFFF;
    --text-secondary: #A0A0A0;
    --text-muted: #D0D0D0;
    --text-subtle: #666666;

    /* --- Surfaces --- */
    --surface-color: #0F0F0F;
    --surface-subtle: rgba(255, 255, 255, 0.05);

    /* --- Borders --- */
    --border-color: rgba(255, 255, 255, 0.10);
    --border-width: 1px;

    /* --- Brand --- */
    --accent-color: #A855F7;
    --accent-button: #7637E5;
    --accent-light: #A88FF6;

    /* --- Semantic: Success --- */
    --success-bg: rgba(4, 183, 69, 0.20);
    --success-text: #04B745;

    /* --- Semantic: Info --- */
    --info-bg: rgba(216, 234, 255, 0.07);
    --info-text: #5FAFFF;

    /* --- Semantic: Warning --- */
    --warning-color: #FACC15;

    /* --- Semantic: Danger --- */
    --danger-bg: rgba(239, 68, 68, 0.08);
    --danger-text: #EF4444;

    /* --- Spacing --- */
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 48px;
}


/* =========================================
   FUENTES
   ========================================= */

@font-face {
    font-family: 'PP Nikkei Journal';
    src:
        url('fonts/PPNikkeiJournal-Regular.woff2') format('woff2'),
        url('fonts/PPNikkeiJournal-Regular.woff') format('woff'),
        url('fonts/PPNikkeiJournal-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}


/* =========================================
   RESET
   ========================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family:
        'PP Nikkei Journal',
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
}

a {
    color: var(--text-primary);
    text-decoration: none;
}


/* =========================================
   ESTRUCTURA GENERAL
   ========================================= */

.page-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: 64px;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.content-left {
    display: flex;
    flex-direction: column;
    gap: 64px;
}

.content-right {
    display: none;
}


/* =========================================
   CABECERA
   ========================================= */

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.btn-help {
    background-color: var(--surface-subtle);
    color: var(--text-muted);
    border: var(--border-width) solid var(--border-color);
    border-radius: 0;
    padding: 8px 16px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;

    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: color 0.3s ease;
}


/* --- Animación botón ayuda --- */

.btn-help::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background-color: var(--text-primary);
    transition: height 0.3s ease;
    z-index: -1;
}

.btn-help:hover {
    color: var(--bg-color);
}

.btn-help:hover img {
    filter: brightness(0);
}

.btn-help:hover::before {
    height: 100%;
}


/* =========================================
   SECCIÓN HERO
   ========================================= */

.hero-text {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.hero-text h1 {
    font-size: 3.25rem;
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 8px 0;
}

.hero-text p {
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 300;
}

.hero-text p strong {
    font-weight: bold;
}

.app-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-icon img,
.apk-icon img {
    max-width: 80px;
    max-height: 80px;
    width: auto;
    height: auto;
}


/* =========================================
   FEATURE PILLS
   ========================================= */

.features-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 0;
}

.pill {
    padding: 6px 16px;
    border: var(--border-width) solid var(--border-color);
    background-color: var(--surface-subtle);
    border-radius: 24px;
    font-size: 14px;
    font-weight: 400;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: default;
    transition: all 0.3s ease;
}


/* --- Pill 1: Actualizaciones --- */

.features-pills .pill:nth-child(1):hover {
    background-color: var(--info-bg);
    border-color: rgba(95, 175, 255, 0.30);
    color: var(--info-text);
}


/* --- Pill 2: Verificación --- */

.features-pills .pill:nth-child(2):hover {
    background-color: rgba(168, 85, 247, 0.10);
    border-color: rgba(168, 85, 247, 0.30);
    color: var(--accent-color);
}


/* --- Pill 3: Instalación rápida --- */

.features-pills .pill:nth-child(3):hover {
    background-color: rgba(250, 204, 21, 0.10);
    border-color: rgba(250, 204, 21, 0.30);
    color: var(--warning-color);
}

/* El icono base sin transición de salida */
.pill svg {
    transform-style: preserve-3d;
    transform: rotateX(0deg);
}

/* El giro solo se anima al entrar el cursor; al salir vuelve al instante sin girar al revés */
.pill:hover svg {
    transform: rotateX(360deg);
    transition: transform 1.2s ease-in-out;
}


/* =========================================
   STORE BUTTONS
   ========================================= */

.store-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 12px;
}

.btn-store {
    background: transparent;
    color: var(--text-primary);
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
}

.btn-store img {
    max-height: 50px;
    width: auto;
}


/* =========================================
   CUENTA
   ========================================= */

.account-req {
    font-size: 14px !important;
    font-weight: 300;
    color: #99A1AF;
    margin-top: -4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.account-req img {
    width: 18px;
    height: 18px;
}


/* =========================================
   SECCIÓN DESCARGAS APK
   ========================================= */

.apk-downloads {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.download-link-header {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}


/* =========================================
   APK CARD
   ========================================= */

.apk-card {
    background-color: var(--surface-subtle);
    border: var(--border-width) solid var(--border-color);
    border-radius: 0;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    width: 100%;
}

.apk-info {
    display: flex;
    gap: 20px;
    flex: 1;
}

.apk-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(0, 201, 80, 0.12);
    border-radius: 4px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.apk-details {
    flex: 1;
}

.apk-details h3 {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.apk-details p {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 300;
    margin-bottom: 12px;
}

.link-guide {
    color: var(--accent-light);
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.link-guide span {
    position: relative;
}

.link-guide span::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 1px;
    background-color: currentColor;

    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s ease;
}

.link-guide:hover span::after {
    transform: scaleX(1);
}

.link-guide:hover {
    opacity: 0.8;
}

.link-guide .ui-icon {
    width: 14px;
    height: 14px;
}


/* =========================================
   APK ACTION
   ========================================= */

.apk-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.version-info {
    display: flex;
    flex-direction: column;
}

.version-info strong {
    font-size: 14px;
    font-weight: bold;
    color: var(--text-primary);
}

.version-info span {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-muted);
}


/* =========================================
   ICONOS
   ========================================= */

.btn-help img {
    width: 20px;
    height: 20px;
}


/* =========================================
   BOTÓN PRINCIPAL
   ========================================= */

.btn-primary {
    background-color: var(--accent-button);
    color: var(--text-primary);
    border: none;
    padding: 10px 16px;
    border-radius: 0;
    font-size: 14px;
    font-weight: 500;
    max-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    white-space: nowrap;

    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: color 0.3s ease;
}

.btn-primary::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background-color: var(--text-primary);
    transition: height 0.3s ease;
    z-index: -1;
}

.btn-primary:hover {
    color: var(--bg-color);
}

.btn-primary:hover::before {
    height: 100%;
}


/* =========================================
   ETIQUETAS / TAGS
   ========================================= */

.tag-green,
.tag-blue,
.tag-red {
    font-size: 14px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.tag-green {
    background-color: var(--success-bg);
    color: var(--success-text);
}

.tag-blue {
    background-color: var(--info-bg);
    color: var(--info-text);
}

.tag-red {
    background-color: var(--danger-bg);
    color: var(--danger-text);
}


/* =========================================
   ACORDEONES
   ========================================= */

.accordion {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.accordion-item {
    background-color: var(--surface-color);
    border: var(--border-width) solid var(--border-color);
    border-radius: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.accordion-header {
    padding: var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.accordion-header > span {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}


/* --- Accordion content --- */

.accordion-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition:
        max-height 0.4s ease,
        opacity 0.4s ease;
}

.accordion-item.active .accordion-content {
    max-height: 800px;
    opacity: 1;
}

.accordion-item.active .chevron {
    transform: rotate(180deg);
}

.chevron {
    transition: transform 0.3s ease;
}


/* =========================================
   ALERT BOX
   ========================================= */

.alert-box {
    max-width: 520px;
    width: 100%;
    background-color: var(--danger-bg);
    border: var(--border-width) solid rgba(239, 68, 68, 0.20);
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 16px;
}

.alert-box span {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-muted);
}


/* =========================================
   VERSION LIST
   ========================================= */

.version-list {
    list-style: none;
    display: flex;
    flex-direction: column;
}

.version-list li {
    height: 50px;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* NUEVO: Transición suave para el fondo */
    transition: background-color 0.3s ease;
}

/* NUEVO: Fondo un poco más claro al pasar el cursor */
.version-list li:hover {
    background-color: rgba(255, 255, 255, 0.03); 
}

.v-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.v-info strong {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.60);
    /* NUEVO: Transición suave para el color */
    transition: color 0.3s ease;
}

.v-info span {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-subtle);
    /* NUEVO: Transición suave para el color */
    transition: color 0.3s ease;
}

.version-list li:hover .v-info strong {
    color: var(--text-primary); 
}

.version-list li:hover .v-info span {
    color: var(--text-muted); /* Se vuelve un gris más luminoso */
}


/* =========================================
   BOTÓN DESCARGA PEQUEÑO
   ========================================= */

.btn-download-sm {
    background-color: var(--surface-subtle);
    border: var(--border-width) solid var(--border-color);
    border-radius: 0;
    padding: 6px 10px;
    font-size: 14px;
    font-weight: 400;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;

    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: color 0.3s ease;
}

.btn-download-sm::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background-color: var(--text-primary);
    transition: height 0.3s ease;
    z-index: -1;
}

.btn-download-sm:hover {
    color: var(--bg-color);
}

.btn-download-sm:hover img {
    filter: brightness(0);
}

.btn-download-sm:hover::before {
    height: 100%;
}


/* =========================================
   MOCKUP MÓVIL
   ========================================= */

.phone-mockup img {
    max-width: 478px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}


/* =========================================
   ANIMACIÓN MOCKUP
   ========================================= */

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

.phone-mockup img {
    max-width: 478px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    animation: float 4s ease-in-out infinite;
}


/* =========================================
   FOOTER
   ========================================= */

.footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    border-top: none;
    min-height: 56px;

    position: relative;
    z-index: 101;
    background-color: var(--bg-color);

    margin-bottom: -24px;
    padding: 16px 0 40px 0;
}

.footer-links {
    display: flex;
    gap: var(--spacing-lg);
}

.footer-links a {
    position: relative;
    font-size: 14px;
    font-weight: 400;
    color: #F5F3FF;
    text-decoration: none;
    transition: opacity 0.25s ease;
}

.footer-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 100%;
    height: 1px;
    background-color: currentColor;

    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s ease;
}

.footer-links a:hover {
    opacity: 0.75;
}

.footer-links a:hover::after {
    transform: scaleX(1);
}


/* =========================================
   EFECTO DEGRADADO INFERIOR
   ========================================= */

.bottom-gradient {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background:
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 1) 100%
        );
    pointer-events: none;
    z-index: 100;
}


/* =========================================
   DESKTOP
   ========================================= */

@media (min-width: 1024px) {

    .main-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        gap: 64px;
    }

    .content-left {
        width: 55%;
        min-height: 850px;
    }

    .content-right {
        display: block;
        width: 40%;
        position: sticky;
        top: 40px;
        align-self: flex-start;
        height: max-content;
    }

    .hero-text h1 {
        font-size: 4.5rem;
    }

    .apk-card {
        flex-direction: row;
        align-items: stretch;
        gap: 20px;
    }

    .apk-info {
        flex: 1;
    }

    .apk-action {
        border-top: none;
        border-left: none;
        padding-top: 0;
        padding-left: 0;
        flex-direction: column;
        justify-content: space-between;
        align-items: flex-end;
        min-width: 160px;
        text-align: right;
    }

    .footer {
        flex-direction: row;
        justify-content: space-between;
    }
}