/* ══════════════════════════════════════════════════════════════════════════════
   Vapt Log — style.css  (versão limpa e responsiva)
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --green-primary : #21C17A;
    --green-dark    : #1fac56;
    --green-light   : #25cf6d;
    --blue-primary  : #0856d1;
    --blue-hover    : #074bba;
    --blue-active   : #053e9c;
    --dev-green     : #01875f;
    --text-black    : #111827;
    --text-gray-800 : #1f2937;
    --text-gray-700 : #374151;
    --text-gray-600 : #4b5563;
    --text-gray-500 : #6b7280;
    --text-gray-400 : #9ca3af;
    --border-gray   : #e5e7eb;
    --bg-gray-50    : #f9fafb;
    --bg-gray-100   : #f3f4f6;
    --bg-gray-200   : #e5e7eb;
    --font          : 'Inter', system-ui, -apple-system, sans-serif;
    --radius-card   : 32px;
    --px-mobile     : 16px;   /* margem lateral padrão mobile */
    --px-desktop    : 32px;   /* margem lateral padrão desktop */
}

html, body {
    font-family             : var(--font);
    background              : #f1f3f4;
    color                   : var(--text-black);
    min-height              : 100vh;
    -webkit-font-smoothing  : antialiased;
    -moz-osx-font-smoothing : grayscale;
    overflow-x              : hidden;   /* evita scroll horizontal no mobile */
}

::selection { background: #dcfce7; }

a       { text-decoration: none; }
button  { cursor: pointer; border: none; background: transparent; font-family: inherit; }
img     { display: block; max-width: 100%; }

/* ══════════════════════════════════════════════════════════════════════════════
   CARD WRAPPER
   ══════════════════════════════════════════════════════════════════════════════ */
.card {
    max-width   : 1024px;
    margin      : 0 auto;
    background  : #fff;
    min-height  : 100vh;
    width       : 100%;
    overflow-x  : hidden;   /* impede overflow de screenshots estourar a página */
}

@media (min-width: 768px) {
    .card {
        margin         : 40px auto;
        border         : 1px solid var(--border-gray);
        border-radius  : var(--radius-card);
        box-shadow     : 0 25px 50px -12px rgba(0,0,0,.15);
        min-height     : auto;
        padding-bottom : 40px;
        overflow       : hidden; /* ok no desktop — não tem overflow problema */
    }
}

/* ══════════════════════════════════════════════════════════════════════════════
   HEADER / LOGO
   ══════════════════════════════════════════════════════════════════════════════ */
.app-header {
    display     : flex;
    align-items : flex-start;
    gap         : 16px;
    padding     : 28px var(--px-mobile) 0;
}
@media (min-width: 768px) { .app-header { padding: 32px var(--px-desktop) 0; gap: 20px; } }

/* Ícone padrão "V" */
.app-logo {
    width            : 64px;
    height           : 64px;
    min-width        : 64px;
    background       : var(--green-primary);
    background-image : radial-gradient(circle at 35% 30%, rgba(255,255,255,.25) 0%, transparent 60%);
    color            : #fff;
    border-radius    : 16px;
    display          : flex;
    align-items      : center;
    justify-content  : center;
    font-size        : 32px;
    font-weight      : 700;
    flex-shrink      : 0;
    box-shadow       : 0 1px 3px rgba(0,0,0,.12);
    overflow         : hidden;
}

/* Quando usa imagem personalizada */
.app-logo--img {
    background       : #ffffff;
    background-image : none;
    padding          : 10px;         /* respiro interno generoso */
    border           : 1px solid var(--border-gray);
}

.app-logo-img {
    display          : block;
    width            : 100%;
    height           : 100%;
    object-fit       : contain;      /* sem zoom, sem corte — sempre mostra a logo inteira */
    object-position  : center center;
}

.app-info {
    display         : flex;
    flex-direction  : column;
    justify-content : center;
    min-width       : 0;
}

.app-name {
    font-size    : 22px;
    font-weight  : 700;
    color        : var(--text-black);
    line-height  : 1.2;
    margin-bottom: 4px;
}

.app-dev { color: var(--dev-green); font-weight: 500; font-size: 13px; }
.app-dev:hover { text-decoration: underline; }

/* ══════════════════════════════════════════════════════════════════════════════
   STATS ROW
   ══════════════════════════════════════════════════════════════════════════════ */
.stats-row {
    display         : flex;
    align-items     : center;
    justify-content : space-between;
    margin          : 20px var(--px-mobile) 0;
    padding-bottom  : 20px;
    border-bottom   : 1px solid var(--bg-gray-100);
    overflow-x      : auto;
    scrollbar-width : none;
}
.stats-row::-webkit-scrollbar { display: none; }
@media (min-width: 768px) { .stats-row { margin: 24px var(--px-desktop) 0; } }

.stat-item {
    display        : flex;
    flex-direction : column;
    align-items    : center;
    flex           : 1;
    padding        : 0 8px;
    min-width      : max-content;
}
@media (min-width: 768px) {
    .stat-item { padding: 0 24px; border-right: 1px solid var(--bg-gray-200); }
    .stat-item:last-child { border-right: none; }
}

.stat-value {
    display     : flex;
    align-items : center;
    gap         : 3px;
    font-weight : 600;
    color       : var(--text-gray-800);
    font-size   : 15px;
}

.stat-label {
    display     : flex;
    align-items : center;
    font-size   : 11px;
    color       : var(--text-gray-500);
    white-space : nowrap;
    margin-top  : 2px;
    gap         : 3px;
}

.stat-badge-l {
    width           : 20px;
    height          : 20px;
    background      : var(--green-primary);
    color           : #fff;
    border-radius   : 4px;
    display         : flex;
    align-items     : center;
    justify-content : center;
    font-weight     : 700;
    font-size       : 10px;
    margin-bottom   : 6px;
}

.info-circle {
    display         : inline-flex;
    align-items     : center;
    justify-content : center;
    width           : 13px;
    height          : 13px;
    border          : 1px solid var(--text-gray-400);
    border-radius   : 50%;
    font-size       : 9px;
    line-height     : 1;
    margin-left     : 2px;
}

.stat-divider { width: 1px; height: 24px; background: var(--bg-gray-200); }
@media (min-width: 768px) { .stat-divider { display: none; } }

/* ══════════════════════════════════════════════════════════════════════════════
   ACTION AREA (botão instalar)
   ══════════════════════════════════════════════════════════════════════════════ */
.action-area { padding: 20px var(--px-mobile) 0; }
@media (min-width: 768px) { .action-area { padding: 24px var(--px-desktop) 0; } }

.btn-install {
    display         : flex;
    align-items     : center;
    justify-content : center;
    width           : 100%;
    height          : 44px;
    background      : var(--blue-primary);
    color           : #fff;
    border-radius   : 999px;
    font-weight     : 500;
    font-size       : 14px;
    font-family     : var(--font);
    text-decoration : none;
    border          : none;
    cursor          : pointer;
    transition      : background .15s ease;
}
.btn-install:hover  { background: var(--blue-hover); }
.btn-install:active { background: var(--blue-active); }

.install-note {
    text-align  : center;
    font-size   : 11px;
    color       : var(--text-gray-500);
    font-weight : 500;
    margin-top  : 10px;
}

/* ══════════════════════════════════════════════════════════════════════════════
   CONTENT GRID
   ══════════════════════════════════════════════════════════════════════════════ */
.content-grid {
    display        : flex;
    flex-direction : column;
    gap            : 28px;
    margin-top     : 28px;
    padding        : 0 var(--px-mobile) 48px;
}

@media (min-width: 768px) {
    .content-grid {
        flex-direction : row;
        align-items    : flex-start;
        padding        : 0 var(--px-desktop) 0;
        gap            : 40px;
    }
}

.col-left, .col-right {
    display        : flex;
    flex-direction : column;
    gap            : 24px;
    min-width      : 0;   /* impede overflow em flex */
    max-width      : 100%; /* garante que nunca ultrapasse o container */
    overflow-x     : hidden; /* cada coluna contém seu próprio overflow */
}

@media (min-width: 768px) {
    .col-left  { flex: 1; }
    .col-right { flex: 1; }
}

/* ══════════════════════════════════════════════════════════════════════════════
   SCREENSHOTS
   ══════════════════════════════════════════════════════════════════════════════ */
.screenshots-scroll {
    display         : flex;
    gap             : 12px;
    overflow-x      : auto;
    overflow-y      : visible;
    padding-bottom  : 8px;
    scrollbar-width : none;
    /* Estica até a borda da tela para rolar melhor no mobile */
    margin-left  : calc(-1 * var(--px-mobile));
    padding-left : var(--px-mobile);
    padding-right: var(--px-mobile);
    width        : calc(100% + 2 * var(--px-mobile));
}
.screenshots-scroll::-webkit-scrollbar { display: none; }
@media (min-width: 768px) {
    .screenshots-scroll {
        margin-left  : 0;
        padding-left : 0;
        padding-right: 0;
        width        : 100%;
    }
}

.screenshot-img {
    width         : 145px;
    height        : 260px;
    border-radius : 14px;
    flex-shrink   : 0;
    object-fit    : cover;
    box-shadow    : 0 2px 10px rgba(0,0,0,.12);
    transition    : transform .2s ease, box-shadow .2s ease;
}
.screenshot-img:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,.16); }

/* ══════════════════════════════════════════════════════════════════════════════
   SECTION HEADINGS
   ══════════════════════════════════════════════════════════════════════════════ */
.section-heading {
    display         : flex;
    align-items     : center;
    justify-content : space-between;
    margin-bottom   : 8px;
}
.section-heading h2 { font-size: 18px; font-weight: 700; color: var(--text-black); }

/* ══════════════════════════════════════════════════════════════════════════════
   ABOUT
   ══════════════════════════════════════════════════════════════════════════════ */
.about-text { font-size: 13px; color: var(--text-gray-600); line-height: 1.65; }

/* ══════════════════════════════════════════════════════════════════════════════
   RATINGS
   ══════════════════════════════════════════════════════════════════════════════ */
.ratings-note {
    font-size    : 11px;
    color        : var(--text-gray-500);
    margin-bottom: 20px;
    display      : flex;
    align-items  : flex-start;
    gap          : 4px;
    line-height  : 1.4;
}

.ratings-summary { display: flex; align-items: center; gap: 28px; }

.big-score { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.score-number { font-size: 48px; font-weight: 400; color: var(--text-black); line-height: 1; }
.score-stars  { display: flex; gap: 1px; margin: 4px 0; }
.score-count  { font-size: 10px; color: var(--text-gray-500); }

.rating-bars { display: flex; flex-direction: column; flex: 1; gap: 5px; }
.rating-bar-row { display: flex; align-items: center; gap: 10px; }
.bar-label { font-size: 10px; font-weight: 500; color: var(--text-gray-700); width: 8px; text-align: center; }
.bar-track { flex: 1; height: 8px; background: var(--bg-gray-200); border-radius: 999px; overflow: hidden; }
.bar-fill  { height: 100%; background: var(--blue-primary); border-radius: 999px; transition: width .4s ease; }

/* ══════════════════════════════════════════════════════════════════════════════
   REVIEWS — RESPONSIVAS
   ══════════════════════════════════════════════════════════════════════════════ */
.reviews-list {
    display        : flex;
    flex-direction : column;
    gap            : 12px;
    padding-top    : 4px;
}

/* Cada card de avaliação */
.review-card {
    display        : flex;
    flex-direction : column;
    gap            : 10px;
    /* Mobile: card visual com fundo e borda */
    padding        : 16px;
    background     : var(--bg-gray-50);
    border         : 1px solid var(--border-gray);
    border-radius  : 14px;
}

/* Desktop: remove o card, vira lista com separador */
@media (min-width: 768px) {
    .reviews-list { gap: 0; }

    .review-card {
        padding       : 0 0 22px;
        background    : transparent;
        border        : none;
        border-radius : 0;
        border-bottom : 1px solid var(--bg-gray-100);
        margin-bottom : 0;
    }
    .review-card:last-child { border-bottom: none; padding-bottom: 0; }
}

.review-header {
    display         : flex;
    align-items     : center;
    justify-content : space-between;
    gap             : 8px;
}

.review-user {
    display   : flex;
    align-items: center;
    gap       : 10px;
    min-width : 0;
    flex      : 1;
}

.review-avatar {
    width         : 32px;
    height        : 32px;
    border-radius : 50%;
    background    : var(--bg-gray-200);
    object-fit    : cover;
    flex-shrink   : 0;
}

.review-name {
    font-size     : 13px;
    font-weight   : 500;
    color         : var(--text-black);
    white-space   : nowrap;
    overflow      : hidden;
    text-overflow : ellipsis;
}

.review-more {
    padding         : 4px;
    border-radius   : 50%;
    transition      : background .15s;
    flex-shrink     : 0;
    display         : flex;
    align-items     : center;
    justify-content : center;
}
.review-more:hover { background: var(--bg-gray-100); }

.review-meta {
    display     : flex;
    align-items : center;
    gap         : 8px;
    flex-wrap   : wrap;
    font-size   : 11px;
    color       : var(--text-gray-500);
}

.review-stars { display: flex; gap: 1px; line-height: 1; }
.review-date  { font-size: 11px; }

.review-text {
    font-size     : 13px;
    color         : var(--text-gray-600);
    line-height   : 1.65;
    word-break    : break-word;
    overflow-wrap : break-word;
}

.review-helpful { font-size: 11px; color: var(--text-gray-500); }

.review-actions { display: flex; gap: 10px; }

.review-btn {
    padding       : 6px 18px;
    border        : 1px solid var(--bg-gray-200);
    border-radius : 999px;
    font-size     : 12px;
    font-weight   : 500;
    color         : var(--text-gray-700);
    font-family   : var(--font);
    background    : #fff;
    transition    : background .15s;
    cursor        : pointer;
}
.review-btn:hover { background: var(--bg-gray-50); }

/* ══════════════════════════════════════════════════════════════════════════════
   SCREENSHOT / LIGHT / GREEN CARD (usados somente se não tiver imagens)
   ══════════════════════════════════════════════════════════════════════════════ */
.screenshot {
    width         : 145px;
    height        : 260px;
    border-radius : 14px;
    flex-shrink   : 0;
    display       : flex;
    flex-direction: column;
    padding       : 16px;
    font-weight   : 500;
    box-shadow    : 0 1px 4px rgba(0,0,0,.08);
}
.screenshot-title { font-size: 14px; font-weight: 600; line-height: 1.3; margin-top: 8px; }
.green-card { background: linear-gradient(to bottom, var(--green-light), var(--green-dark)); color: #fff; }
.light-card { background: var(--bg-gray-50); color: var(--text-gray-800); border: 1px solid var(--bg-gray-200); }
