:root {
    --green: #25d366;
    --green-dark: #1e9e52;
    --install: #01875f;
    --text: #333;
    --muted: #777;
    --border: #eee;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--text);
    background: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--green-dark); }

.site-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 10px 20px;
    background: #0a0a0a;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 200;
}

.logo-link { text-decoration: none; color: inherit; }

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 44px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
    display: block;
    border-radius: 0;
}

.logo span {
    font-weight: 700;
    font-size: 13px;
    color: #fff;
    letter-spacing: 0.04em;
}

.main-nav {
    display: flex;
    gap: 18px;
    flex: 1;
}

.main-nav a {
    text-decoration: none;
    color: #b0b0b0;
    font-size: 15px;
}

.main-nav a:hover {
    color: #fff;
}

.main-nav a.active,
.main-nav a.nav-apps.active {
    color: #5ec8f2;
    font-weight: 700;
    text-decoration: underline;
}

.search-empty {
    padding: 12px;
    margin: 0;
    color: #888;
    font-size: 13px;
}

.top-section {
    margin-bottom: 28px;
}

.app-card {
    position: relative;
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #1a73e8;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    z-index: 1;
}

.creator-page h1 {
    margin: 0 0 4px;
}

.creator-sub {
    color: #777;
    margin: 0 0 24px;
}

.install-modal .hidden {
    display: none !important;
}

.install-modal-content .manual-hint {
    font-size: 14px;
    line-height: 1.55;
    color: #444;
    background: #f0f7ff;
    padding: 12px 14px;
    border-radius: 8px;
    margin: 0 0 12px;
}

/* Banner promocional — página inicial da loja */
.page-home main {
    padding-top: 0;
    max-width: none;
    width: 100%;
}

.page-home .store-hero,
.page-home .top-section,
.page-home .apps-section {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
}

.store-promo {
    position: relative;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    background: #0a0a0a;
    overflow: hidden;
}

.store-promo__track {
    position: relative;
    width: 100%;
    min-height: clamp(180px, 36vw, 460px);
    max-height: 460px;
}

.store-promo__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.45s ease;
    pointer-events: none;
}

.store-promo__slide.is-active {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}

.store-promo__link {
    display: block;
    width: 100%;
    height: 100%;
}

.store-promo__slide img {
    width: 100%;
    height: clamp(180px, 36vw, 460px);
    max-height: 460px;
    object-fit: cover;
    object-position: center;
    display: block;
}

.store-promo__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.store-promo__nav--prev { left: 12px; }
.store-promo__nav--next { right: 12px; }

.store-promo__dots {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    z-index: 5;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.store-promo__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    padding: 0;
}

.store-promo__dot.is-active {
    background: #fff;
    transform: scale(1.15);
}

.header-search {
    position: relative;
    min-width: 220px;
}

.header-search input {
    width: 100%;
    padding: 8px 36px 8px 12px;
    border: 1px solid #333;
    border-radius: 24px;
    font-size: 14px;
    background: #1a1a1a;
    color: #fff;
}

.header-search input::placeholder {
    color: #888;
}

.header-search i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-top: 4px;
    max-height: 280px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: var(--shadow);
}

.search-results a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

.search-results a:hover { background: #f9f9f9; }
.search-results img { width: 36px; height: 36px; border-radius: 8px; }
.hidden { display: none !important; }

main { flex: 1; padding: 20px; max-width: 1100px; margin: 0 auto; width: 100%; }

.store-hero { margin-bottom: 28px; }

.hero-card {
    display: flex;
    gap: 24px;
    align-items: center;
    background: #fff;
    padding: 28px;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.hero-icon {
    width: auto;
    height: 140px;
    max-width: 280px;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: var(--shadow);
    background: #0a0a0a;
    padding: 12px 20px;
}

.hero-info h1 {
    margin: 0 0 8px;
    font-size: clamp(24px, 5vw, 42px);
}

.hero-tagline { color: var(--muted); margin: 0 0 4px; }
.hero-category { color: var(--muted); font-size: 14px; margin: 0 0 16px; }

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.hero-stats .stat { text-align: center; }
.hero-stats .stat-value { display: block; font-weight: 700; font-size: 18px; }
.hero-stats .stat-label { font-size: 12px; color: var(--muted); }
.hero-stats .sep { color: #ccc; }
.star { color: #f5a623; }
.badge-l {
    display: inline-block;
    background: var(--green);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 14px;
}

.section-title { margin: 0 0 16px; font-size: 22px; }

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.app-card {
    display: flex;
    gap: 14px;
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow);
    transition: transform 0.15s;
}

.app-card:hover { transform: translateY(-2px); }

.app-card-icon {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    object-fit: cover;
    flex-shrink: 0;
}

.app-card h3 {
    margin: 0 0 4px;
    font-size: 17px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.verified-badge, .verified-inline {
    width: 18px;
    height: 18px;
}

.app-card-creator { color: var(--green); font-weight: 600; font-size: 13px; margin: 0; }
.app-card-category { color: var(--muted); font-size: 12px; margin: 4px 0; }
.app-card-meta { font-size: 12px; color: var(--muted); display: flex; gap: 12px; }

.empty-state {
    text-align: center;
    padding: 40px;
    background: #fff;
    border-radius: 12px;
}

.site-footer {
    text-align: center;
    padding: 20px;
    color: var(--muted);
    font-size: 13px;
}

/* Modal instalar */
.install-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
}

.install-modal-content {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    max-width: 400px;
    width: 100%;
    position: relative;
    text-align: center;
}

.modal-close {
    position: absolute;
    top: 8px;
    right: 12px;
    border: none;
    background: none;
    font-size: 24px;
    cursor: pointer;
}

.modal-safe {
    color: var(--install);
    font-weight: 600;
    margin-bottom: 12px;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.btn-install,
.btn-modal-primary {
    background: var(--install);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
}

.btn-modal-primary:hover,
.btn-install:hover {
    filter: brightness(0.95);
}

.btn-secondary {
    background: #eee;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .main-nav { display: none; }
    .hero-card { flex-direction: column; text-align: center; }
    .hero-stats { justify-content: center; }
}
