* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(180deg, #08123f 0%, #0b1b52 100%);
    color: #f4f7ff;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    max-width: 820px;
    margin: 0 auto;
    padding: 0.9rem 1rem;
    background: rgba(9, 18, 50, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.brand-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #4f6cf7, #3bb3ff);
    box-shadow: 0 10px 24px rgba(79, 108, 247, 0.4);
}

.brand-name {
    font-size: 1.1rem;
}

.search-area {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.search-toggle {
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(79, 108, 247, 0.25), rgba(59, 179, 255, 0.18));
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(59, 179, 255, 0.18);
}

.search-panel {
    position: absolute;
    left: 50%;
    top: calc(100% + 0.7rem);
    transform: translateX(-50%) translateY(-10px);
    width: min(92vw, 520px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.25s ease;
}

.search-panel.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.search-panel-inner {
    background: rgba(11, 22, 55, 0.96);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 22px;
    padding: 0.9rem;
    box-shadow: 0 26px 50px rgba(8, 15, 35, 0.45);
}

.search-box {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.8rem 0.9rem;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 999px;
    background: rgba(255,255,255,0.05);
}

/* Ajusta as capturas de tela do app */
.screenshots .screenshot {
    width: 100%;
    max-width: 300px; /* Altere este valor para a largura máxima desejada */
    height: 180px;    /* Altere para a altura fixa desejada */
    object-fit: cover; /* Garante que a imagem preencha o espaço sem distorcer */
    border-radius: 12px; /* Opcional: arredonda os cantos da imagem */
}

/* Ajusta a imagem de preview do APK no cabeçalho */
.apk-preview-image {
    width: 100%;
    height: 100%;
    max-width: 200px; /* Define o limite da largura */
    object-fit: contain; /* Encaixa a imagem sem cortar as bordas */
}

.search-icon {
    opacity: 0.8;
}

.search-box input {
    background: transparent;
    border: none;
    color: #f4f7ff;
    width: 100%;
    outline: none;
    font: inherit;
}

.search-box input::placeholder {
    color: rgba(244, 247, 255, 0.65);
}

.app-shell {
    max-width: 720px;
    margin: 0 auto;
    padding: 1rem;
}

.hero {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 28px;
    padding: 1.5rem;
    overflow: hidden;
}

.hero-badge {
    display: inline-flex;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background: rgba(59, 179, 255, 0.17);
    color: #89cbff;
    font-size: 0.82rem;
    margin-bottom: 1rem;
}

.hero-content {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: center;
}

.app-icon {
    width: 85px;
    height: 85px;
    border-radius: 28px;
    background: rgba(255,255,255,0.08);
    display: grid;
    place-items: center;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04), 0 20px 45px rgba(6, 14, 36, 0.35);
}

h1 {
    margin: 0 0 0.35rem;
    font-size: clamp(2rem, 4vw, 2.6rem);
    line-height: 1.05;
}

.subtitle {
    margin: 0;
    color: #cfd8ff;
    font-size: 1rem;
    max-width: 28rem;
}

.apk-preview-box {
    margin-top: 1.25rem;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    min-height: 180px;
    display: grid;
    place-items: center;
}

.apk-preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.apk-preview-placeholder {
    display: grid;
    place-items: center;
    gap: 0.3rem;
    min-height: 180px;
    text-align: center;
    color: #dfeaff;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(79, 108, 247, 0.22), rgba(59, 179, 255, 0.13));
}

.apk-preview-placeholder span {
    font-size: 1.2rem;
    font-weight: 700;
}

.apk-preview-placeholder small {
    color: rgba(223, 234, 255, 0.76);
}

.download-panel {
    margin-top: 1.5rem;
    display: grid;
    gap: 1rem;
}

.download-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 22px;
    padding: 1rem 1.25rem;
}

.download-label {
    display: block;
    color: #95a6ff;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.download-card strong {
    display: block;
    font-size: 1.65rem;
}

.rating {
    text-align: right;
}

.rating span:first-child {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
}

.stars {
    color: #ffcd3c;
    letter-spacing: 0.05em;
    display: block;
    font-size: 0.94rem;
}

.download-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    background: linear-gradient(135deg, #4f6cf7, #3bb3ff);
    color: white;
    text-decoration: none;
    padding: 1rem 1.25rem;
    border-radius: 22px;
    font-weight: 700;
    box-shadow: 0 18px 40px rgba(59, 179, 255, 0.25);
}

.warning {
    margin: 0;
    color: #ffd7d6;
    font-size: 0.95rem;
}

section {
    margin-top: 1.75rem;
}

section h2 {
    margin: 0 0 1rem;
    font-size: 1.4rem;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.section-head span {
    color: #8fa5ff;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.screenshot-section .screenshots,
.reviews,
.apps-grid {
    display: grid;
    gap: 1rem;
}

.screenshots {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.screenshot {
    min-height: 140px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.06));
    border: 1px solid rgba(255,255,255,0.08);
    object-fit: cover;
}

.description-section p {
    margin: 0;
    line-height: 1.8;
    color: #dce3ff;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.tags span {
    display: inline-flex;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.08);
    font-size: 0.95rem;
    color: #c5d1ff;
}

.apps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.app-card {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 22px;
    padding: 1rem;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.app-card:hover {
    transform: translateY(-2px);
    border-color: rgba(135, 168, 255, 0.5);
}

.app-card[hidden] {
    display: none;
}

.app-thumb {
    width: 100%;
    min-height: 108px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(79, 108, 247, 0.8), rgba(59, 179, 255, 0.5));
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.9rem;
}

.app-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.app-tag,
.app-category {
    font-size: 0.72rem;
    padding: 0.35rem 0.55rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    color: #dfe9ff;
}

.app-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
}

.app-card p {
    margin: 0;
    color: #d3dcff;
    line-height: 1.7;
}

.reviews {
    grid-template-columns: 1fr;
}

.review-form-section {
    margin-top: 1.75rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 24px;
    padding: 1rem;
}

.review-form {
    display: grid;
    gap: 1rem;
}

.stars-selector {
    display: flex;
    gap: 0.35rem;
    font-size: 1.8rem;
    color: rgba(255,255,255,0.35);
}

.star-button {
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s ease, color 0.2s ease;
}

.star-button.active,
.star-button:hover,
.star-button:hover ~ .star-button {
    color: #ffd966;
    transform: scale(1.08);
}

.review-form-grid {
    display: grid;
    gap: 0.75rem;
}

.review-form input,
.review-form textarea {
    width: 100%;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    background: rgba(255,255,255,0.04);
    color: #f4f7ff;
    padding: 0.85rem 1rem;
    font: inherit;
    resize: vertical;
}

.review-form input::placeholder,
.review-form textarea::placeholder {
    color: rgba(244, 247, 255, 0.6);
}

.submit-review {
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #4f6cf7, #3bb3ff);
    color: white;
    padding: 0.9rem 1rem;
    font-weight: 700;
    cursor: pointer;
}

.review-card {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 22px;
    padding: 1rem;
}

.review-card strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #e5f0ff;
}

.review-card p {
    margin: 0;
    color: #d3dcff;
    line-height: 1.7;
}

.pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1.2rem;
}

.pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.4rem;
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    text-decoration: none;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    color: #eef3ff;
}

.pagination a.active {
    background: linear-gradient(135deg, #4f6cf7, #3bb3ff);
    border-color: transparent;
    font-weight: 700;
}

.footer {
    margin: 2rem 0 1rem;
    text-align: center;
    color: #8b9cff;
    font-size: 0.95rem;
}

@media (max-width: 620px) {
    .topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .download-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .screenshots,
    .apps-grid {
        grid-template-columns: 1fr;
    }
}
