/* ===== Backdrop Apps ===== */
#appsBackdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 1000;
}

#appsBackdrop.open {
    display: block;
}

/* ===== Modal Apps ===== */
.apps-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: min(850px, 95%);
    max-height: 90vh;
    overflow-y: auto; /* scroll si contenido largo */
    background: #000;
    border-radius: 20px;
    padding: 35px;
    z-index: 1001;
    color: #fff;
    text-align: center;

    border: 1px solid var(--neon);
    box-shadow: 0 0 10px rgba(0, 255, 128, 0.4);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.4s ease;

    /* Scroll oculto en PC */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 10+ */
}

.apps-panel::-webkit-scrollbar {
    width: 0; /* Chrome, Edge, Safari */
}

.apps-panel.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    animation: modalEnter 0.5s ease forwards;
}

/* ===== Animación modal ===== */
@keyframes modalEnter {
    0% { opacity: 0; transform: translate(-50%, -40%) scale(0.8); }
    60% { opacity: 1; transform: translate(-50%, -52%) scale(1.05); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ===== Títulos ===== */
.apps-title {
    color: var(--neon);
    margin-bottom: 8px;
    font-size: 22px;
    font-weight: 600;
}

.apps-desc {
    color: #bbb;
    font-size: 14px;
    margin-bottom: 25px;
}

/* ===== Grid Apps ===== */
.apps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
}

/* ===== Tarjetas estilo neón con logo a la derecha ===== */
.app-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    border-radius: 14px;
    padding: 18px;
    border: 1px solid #00ff80;
    transition: all 0.25s ease;
    box-shadow: 0 0 12px rgba(0, 255, 128, 0.2);
}

.app-card:hover {
    border-color: var(--neon);
    transform: translateY(-3px);
}

/* Contenedor del contenido y logo */
.app-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Info a la izquierda */
.app-info {
    flex: 1;
    padding-right: 12px;
    text-align: left;
}

.app-info h3 {
    color: var(--neon);
    font-size: 18px;
    margin-bottom: 6px;
}

.app-desc-text {
    font-size: 14px;
    color: #ccc;
    line-height: 1.4;
    word-wrap: break-word; /* evita desbordes */
}

/* Logo y botón a la derecha */
.app-logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.app-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 12px;
}

/* Botón de descarga dentro de la tarjeta */
.btn-download-app {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    font-weight: 600;
    border-radius: 10px;
    background: linear-gradient(180deg, #3DDC84, #2FAE60);
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.btn-download-app:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 18px rgba(61, 220, 132, 0.35);
}

/* Botón de cerrar modal */
.apps-panel .sheet-close {
    background: transparent;
    border: none;
    color: var(--neon);
    font-size: 24px;
    float: right;
    cursor: pointer;
}

/* ===== Responsive móviles ===== */
@media (max-width: 600px) {
    .apps-panel {
        width: 90%;
        padding: 20px;
        max-height: 85vh;
        scrollbar-width: thin; /* scroll visible */
        overflow-y: auto;
    }
    .apps-panel::-webkit-scrollbar {
        width: 6px;
    }
    .apps-panel::-webkit-scrollbar-thumb {
        background-color: rgba(0,255,128,0.4);
        border-radius: 3px;
    }
    .apps-panel::-webkit-scrollbar-track {
        background: transparent;
    }

    .app-info h3 {
        font-size: 16px;
    }
    .app-desc-text {
        font-size: 12px;
    }
    .app-logo {
        width: 60px;
        height: 60px;
    }
    .btn-download-app {
        font-size: 11px;
        padding: 6px 10px;
    }

    /* Ajuste clave: app-card y logo-container */
    .app-card {
        flex-direction: column; /* ya lo tenías */
        align-items: flex-start;
    }
    .app-logo-container {
        flex-direction: column; /* <--- cambio aquí */
        justify-content: center; /* centra logo y botón */
        width: 100%;
        gap: 10px;
        margin-top: 10px;
        align-items: center; /* centra horizontalmente */
    }
}

