/* ============================================
   App Download Box v2.0 - Tema Hijo AsapTheme
   ============================================ */

.adb-download-box {
    background: #fff;
    border: 1px solid #e8ecf0;
    border-radius: 16px;
    padding: 24px;
    margin: 32px 0;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    position: relative;
    overflow: hidden;
}

.adb-download-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4f46e5, #7c3aed, #db2777);
}

/* --- Header --- */
.adb-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.adb-app-icon {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    flex-shrink: 0;
}

.adb-app-icon-placeholder {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    flex-shrink: 0;
}

.adb-header-info { flex: 1; }

.adb-app-name {
    margin: 0 0 6px !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #1a1a2e !important;
    line-height: 1.2 !important;
}

.adb-stars-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.adb-stars { display: inline-flex; gap: 1px; }
.adb-star { font-size: 18px; line-height: 1; }
.adb-star.full  { color: #f59e0b; }
.adb-star.half  { color: #f59e0b; opacity: 0.55; }
.adb-star.empty { color: #d1d5db; }

.adb-stars-num {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
}

/* --- Info Grid --- */
.adb-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
    margin-bottom: 20px;
    padding: 14px 16px;
    background: #f8fafc;
    border-radius: 10px;
}

.adb-info-item { display: flex; flex-direction: column; gap: 2px; }
.adb-info-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: #9ca3af; }
.adb-info-value { font-size: 13px; font-weight: 500; color: #374151; }

/* --- Botones de plataforma --- */
.adb-platforms-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 16px 0;
}

.adb-plat-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--plat-color, #4f46e5);
    color: #fff !important;
    border: none;
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 3px 12px rgba(0,0,0,0.18);
}

.adb-plat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    filter: brightness(1.1);
}

.adb-plat-btn:active { transform: translateY(0); }

.adb-plat-icon {
    display: flex;
    align-items: center;
}

.adb-plat-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    stroke: currentColor;
}

.adb-plat-label { white-space: nowrap; }

/* --- Contador --- */
.adb-countdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 0;
}

.adb-countdown-ring {
    position: relative;
    width: 88px;
    height: 88px;
}

.adb-ring-svg {
    width: 88px;
    height: 88px;
    transform: rotate(-90deg);
}

.adb-ring-bg   { fill: none; stroke: #e5e7eb; stroke-width: 2.5; }
.adb-ring-fill { fill: none; stroke: #4f46e5; stroke-width: 2.5; stroke-linecap: round; transition: stroke-dasharray 1s linear; }

.adb-countdown-num {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 26px;
    font-weight: 800;
    color: #4f46e5;
    line-height: 1;
}

.adb-countdown-text {
    font-size: 13px;
    color: #6b7280;
    margin: 0 !important;
    font-style: italic;
}

/* --- Estado listo --- */
.adb-ready {
    padding: 16px 0;
    animation: adbFadeIn 0.5s ease;
}

@keyframes adbFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.adb-ready-text {
    font-size: 15px;
    font-weight: 700;
    color: #059669;
    margin: 0 0 14px !important;
    text-align: center;
}

.adb-final-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.adb-final-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--plat-color, #059669);
    color: #fff !important;
    text-decoration: none !important;
    padding: 12px 22px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 50px;
    transition: all 0.25s ease;
    box-shadow: 0 3px 12px rgba(0,0,0,0.2);
}

.adb-final-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.28);
    filter: brightness(1.1);
    color: #fff !important;
}

.adb-final-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    stroke: currentColor;
}

/* --- Ads --- */
.adb-ad-wrapper { margin: 16px 0; text-align: center; }
.adb-ad-label { display: block; font-size: 10px; color: #9ca3af; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.adb-ad-adsense, .adb-ad-banner { display: block; overflow: hidden; }

/* --- Responsive --- */
@media (max-width: 520px) {
    .adb-download-box { padding: 16px; border-radius: 12px; }
    .adb-app-name { font-size: 18px !important; }
    .adb-app-icon, .adb-app-icon-placeholder { width: 58px; height: 58px; }
    .adb-info-grid { grid-template-columns: repeat(2, 1fr); }
    .adb-plat-btn, .adb-final-btn { padding: 10px 16px; font-size: 13px; }
    .adb-platforms-grid, .adb-final-btns { gap: 8px; }
}
