/* =============================================
   APK STORE - CSS Principal (Cliente)
   Design: Roxo neon + Preto - Inspirado em IPTV premium
   ============================================= */

* {
    box-sizing: border-box;
}

:root {
    --primary-color: #a855f7;
    --button-color: #a855f7;
    --bg-color: #1a0033;
    --card-bg: rgba(26, 14, 46, 0.85);
    --card-border: rgba(168, 85, 247, 0.25);
    --text-light: #ffffff;
    --text-muted: #b0a8c7;
    --shadow-glow: 0 0 30px rgba(168, 85, 247, 0.35);
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body.client-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-light);
    background: var(--bg-color);
    background-image:
        var(--bg-image, none),
        radial-gradient(ellipse at top, rgba(168, 85, 247, 0.25), transparent 60%),
        radial-gradient(ellipse at bottom, rgba(91, 33, 182, 0.2), transparent 60%);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
    position: relative;
}

body.client-body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 0, 26, 0.85) 0%, rgba(26, 0, 51, 0.92) 100%);
    z-index: -1;
    pointer-events: none;
}

/* ===== HEADER ===== */
.site-header {
    position: relative;
    padding: 40px 0 20px;
    overflow: hidden;
}

.header-glow {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 250px;
    background: radial-gradient(ellipse, rgba(168, 85, 247, 0.4), transparent 70%);
    filter: blur(40px);
    z-index: -1;
    pointer-events: none;
}

.logo-text {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
    text-shadow: 0 0 40px rgba(168, 85, 247, 0.4);
}

.site-logo {
    max-height: 80px;
    width: auto;
    filter: drop-shadow(0 0 20px rgba(168, 85, 247, 0.5));
}

.top-text {
    font-size: 1.05rem;
    color: var(--text-muted);
    font-weight: 400;
    max-width: 600px;
}

/* ===== MAIN ===== */
.main-content {
    padding: 30px 0 60px;
}

/* ===== APK CARD ===== */
.apk-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    overflow: hidden;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: transform 0.35s cubic-bezier(.2,.7,.3,1), box-shadow 0.35s ease, border-color 0.35s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.apk-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 18px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(168,85,247,0.4), transparent 50%, rgba(168,85,247,0.2));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.6;
}

.apk-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-glow);
    border-color: var(--primary-color);
}

/* Thumbnail */
.apk-thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #0f0823, #1a0e2e);
}

.apk-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.apk-card:hover .apk-thumb {
    transform: scale(1.05);
}

.apk-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    background: linear-gradient(135deg, #2d1b4e, #1a0033);
    color: rgba(255,255,255,0.3);
}

.thumb-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.4));
    pointer-events: none;
}

/* Conteúdo do card */
.apk-content {
    padding: 22px 20px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    flex: 1;
}

.apk-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    text-align: center;
    line-height: 1.3;
    color: #fff;
}

.apk-version {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
}

/* Botão de download */
.btn-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 36px;
    background: var(--button-color);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.35);
    cursor: pointer;
    min-width: 160px;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(168, 85, 247, 0.55);
    color: #fff;
    filter: brightness(1.1);
}

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

/* Pills de códigos (Downloader / NT DOWN) */
.apk-codes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    align-items: center;
}

.code-pill {
    background: rgba(34, 211, 238, 0.12);
    border: 1px solid rgba(34, 211, 238, 0.35);
    color: #67e8f9;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}

.code-pill:hover {
    background: rgba(34, 211, 238, 0.2);
    border-color: #22d3ee;
    transform: scale(1.03);
}

.code-pill .code-label {
    opacity: 0.85;
}

.code-pill .code-value {
    font-weight: 800;
    letter-spacing: 0.3px;
}

/* Estado vazio */
.empty-state {
    color: var(--text-muted);
}

.empty-icon {
    font-size: 5rem;
    opacity: 0.6;
}

/* ===== FOOTER ===== */
.site-footer {
    border-top: 1px solid rgba(168, 85, 247, 0.15);
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 40px;
}

/* ===== TOAST ===== */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast-msg {
    pointer-events: auto;
    background: rgba(26, 14, 46, 0.95);
    border: 1px solid var(--primary-color);
    color: #fff;
    padding: 14px 20px;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4), 0 0 20px rgba(168,85,247,0.3);
    min-width: 250px;
    font-weight: 500;
    animation: toastSlide 0.3s ease;
    backdrop-filter: blur(10px);
}

.toast-msg.success { border-color: #22c55e; box-shadow: 0 8px 30px rgba(0,0,0,0.4), 0 0 20px rgba(34,197,94,0.3); }
.toast-msg.error   { border-color: #ef4444; box-shadow: 0 8px 30px rgba(0,0,0,0.4), 0 0 20px rgba(239,68,68,0.3); }
.toast-msg.info    { border-color: #3b82f6; box-shadow: 0 8px 30px rgba(0,0,0,0.4), 0 0 20px rgba(59,130,246,0.3); }

@keyframes toastSlide {
    from { transform: translateX(120%); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}

/* ===== RESPONSIVO ===== */
@media (max-width: 768px) {
    .logo-text { font-size: 2rem; }
    .top-text { font-size: 0.95rem; padding: 0 16px; }
    .apk-title { font-size: 1.1rem; }
    .btn-download { padding: 11px 28px; min-width: 140px; }
    .site-header { padding: 24px 0 12px; }
    #toast-container { top: 10px; right: 10px; left: 10px; }
    .toast-msg { min-width: 0; }
}

@media (max-width: 480px) {
    .apk-content { padding: 18px 14px 20px; }
    .code-pill { font-size: 0.78rem; padding: 5px 12px; }
}

/* ===== TV / Telas grandes ===== */
@media (min-width: 1600px) {
    .container { max-width: 1500px; }
    .apk-title { font-size: 1.3rem; }
}
