@import url('https://fonts.googleapis.com/css2?family=Funnel+Display:wght@700;800&family=Figtree:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* Theme: pep-phone.com brand (Funnel Display / Figtree, mint/teal green), light mode. */
:root {
    color-scheme: light;
    --bg-primary: #ffffff;
    --bg-secondary: #ffffff;
    --bg-tertiary: #edf7f5;
    --bg-elevated: #ffffff;
    --border-color: #d7e5e2;
    --border-strong: #b6ccc8;
    --text-primary: #0a1f1c;
    --text-secondary: #3f5a56;
    --text-muted: #6f8a86;
    --primary: #01b2aa;
    --primary-hover: #018f89;
    --primary-rgb: 1, 178, 170;
    --mint: #45f8ca;
    --mint-rgb: 69, 248, 202;
    --teal: #01b2aa;
    --sun: #ffdd00;
    --success: #01b2aa;
    --success-hover: #018f89;
    --warning: #f59e0b;
    --danger: #ff6b6b;
    --purple: #7c3aed;
    --pink: #db2777;
    --info: #0284c7;
    --shadow-sm: 0 1px 2px rgba(6, 13, 15, 0.06);
    --card-shadow: 0 14px 34px rgba(6, 13, 15, 0.08);
    --shadow-lg: 0 22px 54px rgba(6, 13, 15, 0.12);
    --ring: 0 0 0 4px rgba(var(--primary-rgb), 0.16);
    --radius-xs: 6px;
    --border-radius: 10px;
    --radius-lg: 14px;
    --container: 1200px;
    --transition: 180ms cubic-bezier(.2, .7, .2, 1);
    --disp: 'Funnel Display', sans-serif;
    --body: 'Figtree', sans-serif;
    --mono: 'JetBrains Mono', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    min-width: 320px;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at top left, rgba(var(--mint-rgb), 0.12), transparent 34rem),
        linear-gradient(180deg, #f6fbfa 0%, var(--bg-primary) 42%, #f4faf9 100%);
    color: var(--text-primary);
    font-family: var(--body), -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6, .logo {
    font-family: var(--disp), sans-serif;
    letter-spacing: -0.01em;
}

img,
svg,
canvas {
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    appearance: none;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition), background-color var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

main {
    width: 100%;
    max-width: var(--container);
    flex: 1;
    margin: 0 auto;
    padding: 2rem 1.5rem 3.5rem;
}

/* Header and navigation */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(216, 224, 234, 0.85);
    backdrop-filter: blur(18px);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

.nav-container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    display: grid;
    grid-template-columns: auto minmax(260px, 1fr) auto;
    align-items: center;
    gap: 1.25rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--text-primary);
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: 0;
    white-space: nowrap;
}

.logo i {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), #12b981);
    color: #ffffff;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 18px rgba(var(--primary-rgb), 0.22);
}

.logo span {
    color: var(--primary);
}

.search-bar-container {
    width: 100%;
    max-width: 520px;
    justify-self: center;
    position: relative;
}

.search-bar-container form {
    position: relative;
}

.search-input {
    width: 100%;
    min-height: 42px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.7rem 0.95rem 0.7rem 2.55rem;
    color: var(--text-primary);
    font-size: 0.94rem;
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition), box-shadow var(--transition), background-color var(--transition);
}

.search-input::placeholder {
    color: #94a3b8;
}

.search-input:focus {
    outline: none;
    border-color: rgba(var(--primary-rgb), 0.78);
    box-shadow: var(--ring);
}

.search-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: #73839a;
    pointer-events: none;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    list-style: none;
}

.nav-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 38px;
    padding: 0.55rem 0.7rem;
    border-radius: var(--border-radius);
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-weight: 700;
    white-space: nowrap;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--primary);
}

.nav-wallet {
    background: rgba(217, 119, 6, 0.1);
    color: #92400e;
}

.nav-wallet:hover {
    background: rgba(217, 119, 6, 0.16);
    color: #78350f;
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    object-fit: cover;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 1px var(--border-color), var(--shadow-sm);
}

.user-menu {
    position: relative;
    cursor: pointer;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 0.7rem);
    min-width: 220px;
    overflow: hidden;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
}

.dropdown-content a {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 0.9rem;
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-weight: 600;
}

.dropdown-content a:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.dropdown-header {
    padding: 0.95rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.role-badge {
    width: max-content;
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dropdown-divider {
    border: 0;
    height: 1px;
    background: var(--border-color);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 38px;
    padding: 0.56rem 1rem;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.1;
    cursor: pointer;
    transition: transform var(--transition), border-color var(--transition), background-color var(--transition), color var(--transition), box-shadow var(--transition);
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:focus-visible {
    outline: none;
    box-shadow: var(--ring);
}

.btn:disabled {
    opacity: 0.65;
    cursor: wait;
    transform: none;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 12px 22px rgba(var(--primary-rgb), 0.19);
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #ffffff;
}

.btn-secondary {
    background: #ffffff;
    border-color: var(--border-color);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-strong);
    color: var(--text-primary);
}

.btn-success {
    background: var(--success);
    border-color: var(--success);
    color: #ffffff;
    box-shadow: 0 12px 22px rgba(15, 159, 110, 0.18);
}

.btn-success:hover {
    background: var(--success-hover);
    border-color: var(--success-hover);
    color: #ffffff;
}

.btn-sm {
    min-height: 32px;
    padding: 0.43rem 0.72rem;
    font-size: 0.82rem;
}

.btn-lg {
    min-height: 46px;
    padding: 0.75rem 1.15rem;
    font-size: 0.96rem;
}

.btn-block {
    width: 100%;
}

/* Store home */
.hero-banner {
    min-height: 360px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
    align-items: center;
    gap: 2.4rem;
    margin-bottom: 1.8rem;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(185, 198, 214, 0.62);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.96)),
        linear-gradient(135deg, rgba(18, 102, 241, 0.13), rgba(15, 159, 110, 0.1));
    box-shadow: var(--card-shadow);
}

.hero-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(18, 102, 241, 0.08) 1px, transparent 1px),
        linear-gradient(180deg, rgba(18, 102, 241, 0.07) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.28), transparent 70%);
    pointer-events: none;
}

.hero-content,
.hero-showcase {
    position: relative;
    z-index: 1;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.9rem;
    padding: 0.35rem 0.62rem;
    background: rgba(var(--primary-rgb), 0.1);
    color: #0f4fb5;
    border: 1px solid rgba(var(--primary-rgb), 0.16);
    border-radius: var(--border-radius);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.hero-content h1 {
    max-width: 720px;
    margin-bottom: 0.8rem;
    color: #0f172a;
    font-size: clamp(2.35rem, 5vw, 4.45rem);
    line-height: 0.96;
    letter-spacing: 0;
    font-weight: 800;
}

.hero-content p {
    max-width: 620px;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.hero-showcase {
    display: grid;
    gap: 0.9rem;
}

.hero-feature-card {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.hero-feature-top {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.hero-feature-icon {
    width: 74px;
    height: 74px;
    flex: 0 0 74px;
    border-radius: var(--border-radius);
    object-fit: cover;
    background: var(--bg-tertiary);
    box-shadow: var(--shadow-sm);
}

.hero-feature-title {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 800;
}

.hero-feature-meta {
    margin-top: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.84rem;
}

.hero-stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.55rem;
}

.hero-stat {
    padding: 0.65rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.hero-stat strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.hero-stat span {
    color: var(--text-muted);
    font-size: 0.72rem;
}

.hero-mini-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.65rem;
}

.hero-mini-app {
    min-height: 92px;
    padding: 0.7rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.hero-mini-app img {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-xs);
    object-fit: cover;
}

.hero-mini-app span {
    display: block;
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tabs-container {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 2rem;
    padding: 0.35rem;
    width: max-content;
    max-width: 100%;
    overflow-x: auto;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.tab-link {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0.48rem 0.85rem;
    border-radius: var(--radius-xs);
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
}

.tab-link:hover,
.tab-link.active {
    background: rgba(var(--primary-rgb), 0.09);
    color: var(--primary);
}

.store-section {
    margin-bottom: 2.6rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1rem;
}

.section-header h2 {
    color: var(--text-primary);
    font-size: 1.22rem;
    line-height: 1.2;
    font-weight: 800;
}

.section-kicker {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.view-all {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--primary);
    font-size: 0.88rem;
    font-weight: 800;
    white-space: nowrap;
}

.horizontal-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(236px, 1fr);
    gap: 1rem;
    overflow-x: auto;
    padding: 0.15rem 0.15rem 1rem;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.horizontal-scroll::-webkit-scrollbar {
    height: 8px;
}

.horizontal-scroll::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 999px;
}

/* App cards */
.app-card {
    min-width: 0;
    max-width: 280px;
    min-height: 182px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    scroll-snap-align: start;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.app-card:hover {
    transform: translateY(-3px);
    border-color: rgba(var(--primary-rgb), 0.32);
    box-shadow: var(--card-shadow);
}

.app-card > a {
    min-width: 0;
}

.app-card-header {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
}

.app-card-icon {
    width: 62px;
    height: 62px;
    flex: 0 0 62px;
    border-radius: var(--border-radius);
    object-fit: cover;
    background: var(--bg-tertiary);
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.app-card-meta {
    min-width: 0;
    flex: 1;
}

.app-card-title {
    margin-bottom: 0.18rem;
    color: var(--text-primary);
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-card-dev {
    margin-bottom: 0.36rem;
    color: var(--text-secondary);
    font-size: 0.78rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-card-rating {
    display: flex;
    align-items: center;
    gap: 0.28rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 700;
}

.rating-count {
    color: var(--text-muted);
    font-size: 0.74rem;
}

.app-card-btn-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.9rem;
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-color);
}

.app-price {
    color: var(--text-primary);
    font-size: 0.92rem;
    font-weight: 800;
}

/* Earn guide */
.earn-points-banner {
    position: relative;
    overflow: hidden;
    margin-top: 2.8rem;
    padding: 1.45rem;
    background:
        linear-gradient(135deg, rgba(18, 102, 241, 0.08), rgba(15, 159, 110, 0.08)),
        #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.earn-points-banner h3 {
    margin-bottom: 0.4rem;
    font-size: 1.08rem;
    font-weight: 800;
}

.earn-points-banner > p {
    max-width: 780px;
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.earn-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.9rem;
    margin-top: 1.15rem;
}

.earn-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-height: 94px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.earn-card:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--primary-rgb), 0.3);
    box-shadow: var(--card-shadow);
}

.earn-icon-wrapper {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    border-radius: var(--border-radius);
    font-size: 1.08rem;
}

.earn-details h4 {
    margin-bottom: 0.2rem;
    font-size: 0.95rem;
    font-weight: 800;
}

.earn-details p {
    color: var(--text-secondary);
    font-size: 0.82rem;
}

/* Listing, category, and detail pages */
.page-heading {
    margin-bottom: 1.6rem;
}

.page-heading h1,
.page-heading h2 {
    margin-bottom: 0.35rem;
    color: var(--text-primary);
    font-size: clamp(1.7rem, 3vw, 2.35rem);
    line-height: 1.08;
    font-weight: 800;
}

.page-heading p {
    color: var(--text-secondary);
}

.browse-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 1.5rem;
}

.filter-sidebar {
    position: sticky;
    top: 92px;
}

.filter-list {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    margin-top: 0.55rem;
}

.filter-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.56rem 0.64rem;
    border-radius: var(--radius-xs);
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 700;
}

.filter-link:hover,
.filter-link.active {
    background: rgba(var(--primary-rgb), 0.09);
    color: var(--primary);
}

.filter-count {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.result-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.result-card:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--primary-rgb), 0.28);
    box-shadow: var(--card-shadow);
}

.result-icon {
    width: 70px;
    height: 70px;
    border-radius: var(--border-radius);
    object-fit: cover;
    background: var(--bg-tertiary);
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.result-content {
    min-width: 0;
}

.result-title {
    margin-bottom: 0.2rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 800;
}

.result-subtitle,
.result-meta {
    color: var(--text-secondary);
    font-size: 0.82rem;
}

.result-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 0.38rem;
}

.result-action {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 3rem;
}

.category-card {
    min-height: 162px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.category-card:hover {
    transform: translateY(-3px);
    border-color: rgba(var(--primary-rgb), 0.32);
    box-shadow: var(--card-shadow);
}

.category-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
}

.cat-icon-box {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--primary-rgb), 0.08);
    border: 1px solid rgba(var(--primary-rgb), 0.12);
    border-radius: var(--border-radius);
    font-size: 1.35rem;
}

.category-count {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0.24rem 0.55rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xs);
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 800;
    white-space: nowrap;
}

.category-card h3 {
    margin-bottom: 0.2rem;
    color: var(--text-primary);
    font-size: 1.02rem;
    font-weight: 800;
}

.category-card p {
    color: var(--text-secondary);
    font-size: 0.84rem;
}

.app-details-container {
    max-width: 960px;
    margin: 0 auto;
}

.app-detail-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1.5rem;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
}

.app-detail-icon {
    width: 124px;
    height: 124px;
    border-radius: var(--radius-lg);
    object-fit: cover;
    background: var(--bg-tertiary);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: var(--shadow-sm);
}

.app-detail-title {
    margin-bottom: 0.22rem;
    color: var(--text-primary);
    font-size: clamp(1.75rem, 3.4vw, 2.6rem);
    line-height: 1.05;
    font-weight: 800;
}

.developer-link {
    display: inline-flex;
    margin-bottom: 0.8rem;
    color: var(--primary);
    font-weight: 800;
}

.metric-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-bottom: 1.15rem;
}

.metric-item {
    min-width: 92px;
    padding-right: 0.9rem;
    border-right: 1px solid var(--border-color);
}

.metric-item:last-child {
    border-right: 0;
}

.metric-item strong {
    display: block;
    color: var(--text-primary);
    font-size: 1rem;
}

.metric-item span {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.detail-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.screenshots-strip {
    grid-auto-columns: 190px;
    gap: 0.8rem;
    margin-bottom: 2.2rem;
}

.screenshot-img {
    width: 190px;
    height: 330px;
    border-radius: var(--border-radius);
    object-fit: cover;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.app-info-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.6rem;
    margin-top: 1.4rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.ratings-grid {
    display: grid;
    grid-template-columns: minmax(120px, 0.7fr) minmax(0, 2fr);
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
}

.rating-summary {
    text-align: center;
}

.rating-score {
    color: var(--text-primary);
    font-size: 3.4rem;
    line-height: 1;
    font-weight: 800;
}

.rating-bars {
    display: flex;
    flex-direction: column;
    gap: 0.42rem;
}

.rating-bar-row {
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr);
    align-items: center;
    gap: 0.7rem;
    color: var(--text-secondary);
    font-size: 0.84rem;
}

.rating-track {
    height: 8px;
    overflow: hidden;
    background: var(--bg-tertiary);
    border-radius: 999px;
}

.rating-fill {
    height: 100%;
    background: var(--warning);
}

.review-form-card {
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.review-item {
    padding-bottom: 1.1rem;
    border-bottom: 1px solid var(--border-color);
}

.review-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.review-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.55rem;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.review-author img {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    object-fit: cover;
}

.review-author strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.92rem;
}

.review-date,
.review-text {
    color: var(--text-secondary);
    font-size: 0.86rem;
}

.review-text {
    line-height: 1.55;
}

.app-info-grid + .review-text,
.panel-card > .review-text {
    white-space: pre-line;
}

.empty-state {
    padding: 2.5rem 1rem;
    text-align: center;
    color: var(--text-secondary);
}

.empty-state i {
    display: block;
    margin-bottom: 0.8rem;
    color: var(--text-muted);
    font-size: 2.2rem;
}

/* Cards, forms, alerts */
.panel-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.panel-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border-color);
}

.panel-card-title {
    color: var(--text-primary);
    font-size: 1.04rem;
    font-weight: 800;
}

.form-group {
    margin-bottom: 1.15rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 800;
}

.form-control {
    width: 100%;
    min-height: 40px;
    padding: 0.62rem 0.8rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 0.92rem;
    transition: border-color var(--transition), box-shadow var(--transition), background-color var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: rgba(var(--primary-rgb), 0.78);
    box-shadow: var(--ring);
}

textarea.form-control {
    min-height: 112px;
    resize: vertical;
}

.alert-error,
.alert-success {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.75rem 0.9rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.2rem;
    font-size: 0.86rem;
    font-weight: 700;
}

.alert-error {
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.22);
    color: #991b1b;
}

.alert-success {
    background: rgba(15, 159, 110, 0.09);
    border: 1px solid rgba(15, 159, 110, 0.22);
    color: #047857;
}

/* Auth pages */
.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
}

.auth-container {
    width: min(100%, 1020px);
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(12px);
}

.auth-container-reverse {
    grid-template-columns: minmax(360px, 0.92fr) minmax(0, 1.08fr);
}

.auth-promo {
    min-height: 640px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    padding: 2.5rem;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.7)),
        url('/views/assets/img/auth-bg.jpg') center / cover no-repeat,
        #0f172a;
    color: #ffffff;
    position: relative;
}

.auth-logo {
    color: #ffffff;
}

.auth-logo span {
    color: #dff8ff;
}

.auth-promo .hero-eyebrow {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.auth-promo h2 {
    max-width: 440px;
    margin-bottom: 0.8rem;
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.auth-promo p {
    max-width: 440px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.98rem;
    line-height: 1.5;
}

.promo-features {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.promo-feature {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.9rem 1rem;
    background: rgba(255, 255, 255, 0.11);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), background 0.2s;
}

.promo-feature:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.16);
}

.promo-feature i {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-xs);
    font-size: 1.1rem;
}

.promo-feature strong,
.promo-feature span {
    display: block;
}

.promo-feature strong {
    margin-bottom: 0.12rem;
    font-weight: 700;
}

.promo-feature span {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.82rem;
}

.auth-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.auth-stat-pill {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--border-radius);
    padding: 0.7rem 0.9rem;
    backdrop-filter: blur(8px);
}

.auth-stat-pill strong {
    display: block;
    font-size: 1.2rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.auth-stat-pill span {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.82);
    display: block;
}

.auth-form-side {
    width: 100%;
    max-width: none;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #ffffff;
}

.auth-top-nav {
    margin-bottom: 1.5rem;
}

.btn-back-store {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.42rem 0.85rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    transition: all 0.2s ease;
}

.btn-back-store:hover {
    color: var(--primary);
    border-color: rgba(var(--primary-rgb), 0.4);
    background: rgba(var(--primary-rgb), 0.05);
    transform: translateX(-3px);
}

.auth-header {
    margin-bottom: 1.6rem;
}

.auth-header h1 {
    margin-bottom: 0.35rem;
    font-size: 1.95rem;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.auth-header p,
.auth-switch {
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.45rem;
}

.label-row label {
    margin-bottom: 0;
}

.label-row a,
.auth-switch a {
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

.label-row a:hover,
.auth-switch a:hover {
    text-decoration: underline;
}

.auth-switch {
    margin-top: 1.4rem;
    text-align: center;
    padding-top: 1.2rem;
    border-top: 1px dashed var(--border-color);
}

/* Input Icon Wrapper & Password Toggle */
.input-icon-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-group i.input-icon {
    position: absolute;
    left: 1rem;
    color: #94a3b8;
    font-size: 0.95rem;
    pointer-events: none;
    transition: color 0.2s ease;
    z-index: 2;
}

.input-icon-group .form-control {
    padding-left: 2.65rem;
    width: 100%;
}

.input-icon-group:focus-within i.input-icon {
    color: var(--primary);
}

.password-toggle-btn {
    position: absolute;
    right: 0.75rem;
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 0.35rem;
    cursor: pointer;
    font-size: 0.95rem;
    border-radius: var(--radius-xs);
    transition: color 0.2s, background-color 0.2s;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle-btn:hover {
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.08);
}

.input-icon-group .form-control.has-toggle {
    padding-right: 2.85rem;
}

/* Role Selector Cards */
.role-selector {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.role-option {
    min-height: 94px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.95rem;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.role-option-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.role-option-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 800;
    font-size: 0.92rem;
    color: var(--text-primary);
}

.role-option-title i {
    font-size: 1.05rem;
    color: var(--text-muted);
    transition: color 0.2s;
}

.role-option-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.35;
}

.role-option:hover {
    border-color: rgba(var(--primary-rgb), 0.35);
    background: #ffffff;
}

.role-option.selected {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.14);
}

.role-option.selected .role-option-title,
.role-option.selected .role-option-title i {
    color: var(--primary);
}

.role-radio-badge {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.role-option.selected .role-radio-badge {
    border-color: var(--primary);
    background: var(--primary);
}

.role-radio-badge::after {
    content: "";
    width: 6px;
    height: 6px;
    background: #ffffff;
    border-radius: 50%;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s ease;
}

.role-option.selected .role-radio-badge::after {
    opacity: 1;
    transform: scale(1);
}

.role-option input {
    display: none;
}

.role-option:hover,
.role-option.selected {
    background: rgba(var(--primary-rgb), 0.08);
    border-color: rgba(var(--primary-rgb), 0.38);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.badge {
    display: inline-flex;
    align-items: center;
    width: max-content;
    min-height: 24px;
    padding: 0.22rem 0.55rem;
    border-radius: var(--radius-xs);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
}

.badge-success { background: rgba(15, 159, 110, 0.1); color: #047857; }
.badge-pending { background: rgba(217, 119, 6, 0.1); color: #92400e; }
.badge-danger { background: rgba(220, 38, 38, 0.1); color: #991b1b; }
.badge-info { background: rgba(var(--primary-rgb), 0.1); color: #0f4fb5; }

.text-warning { color: var(--warning); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-primary { color: var(--primary); }
.text-info { color: var(--info); }
.text-muted { color: var(--text-muted); }

footer {
    margin-top: auto;
    padding: 2rem 1.5rem;
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    text-align: center;
    font-size: 0.88rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.6rem 1.2rem;
    margin-top: 0.75rem;
    list-style: none;
}

.footer-links a {
    color: var(--text-secondary);
    font-weight: 700;
}

.footer-links a:hover {
    color: var(--primary);
}

@media (max-width: 980px) {
    .nav-container {
        grid-template-columns: 1fr auto;
    }

    .search-bar-container {
        grid-column: 1 / -1;
        max-width: none;
        order: 3;
    }

    .hero-banner {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .browse-layout {
        grid-template-columns: 1fr;
    }

    .filter-sidebar {
        position: static;
    }
}

@media (max-width: 720px) {
    main {
        padding: 1rem 1rem 2.5rem;
    }

    .nav-container {
        padding: 0.8rem 1rem;
        gap: 0.8rem;
    }

    .nav-links {
        width: 100%;
        grid-column: 1 / -1;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.1rem;
    }

    .hero-banner {
        padding: 1.35rem;
    }

    .hero-content h1 {
        font-size: 2.25rem;
    }

    .hero-mini-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .section-header,
    .panel-card-header,
    .review-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .horizontal-scroll {
        grid-auto-columns: minmax(220px, 78vw);
    }

    .result-card {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .result-action {
        grid-column: 1 / -1;
        justify-content: space-between;
    }

    .app-detail-hero {
        grid-template-columns: 1fr;
    }

    .app-detail-icon {
        width: 96px;
        height: 96px;
    }

    .ratings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 840px) {
    .auth-page {
        display: block;
        padding: 1rem;
    }

    .auth-container,
    .auth-container-reverse {
        grid-template-columns: 1fr;
    }

    .auth-promo {
        min-height: auto;
        padding: 1.5rem;
    }

    .promo-features {
        display: none;
    }

    .auth-form-side {
        padding: 1.5rem;
    }
}

/* ── APKPure-style storefront components ─────────────────────────────────── */

/* Storefront banner slider (admin-managed) — auto-rotating crossfade */
.banner-slider {
    position: relative;
    width: 100%;
    aspect-ratio: 24 / 9;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 2rem;
    background: var(--bg-tertiary);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.10);
}

.banner-slider .banner-track { position: absolute; inset: 0; }

.banner-slider .banner-slide {
    position: absolute;
    inset: 0;
    display: block;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.banner-slider .banner-slide.active { opacity: 1; }

.banner-slider .banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.banner-slider .banner-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 12px;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.banner-slider .banner-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    transition: all 0.3s ease;
}

.banner-slider .banner-dots span.active {
    width: 20px;
    border-radius: 5px;
    background: #fff;
}

.section-head {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}

.section-head h2 {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-primary);
}

.section-head a {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1;
    padding: 0.2rem 0.35rem;
    border-radius: 50%;
}

.section-head a:hover { color: var(--primary); }

/* Hot Apps hero cards */
.hot-apps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 3rem;
}

.hot-card {
    position: relative;
    display: block;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #33415c 0%, #16213a 100%);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
    transition: var(--transition);
}

.hot-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18); }

.hot-card img.hot-banner {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hot-card .hot-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hot-card .hot-fallback img {
    width: 84px;
    height: 84px;
    border-radius: 20px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.hot-card .hot-overlay {
    position: absolute;
    inset: auto 0 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1rem;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.55) 100%);
}

.hot-card .hot-title {
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-download {
    background-color: var(--primary);
    color: #fff !important;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.45rem 1.1rem;
    border-radius: 6px;
    flex-shrink: 0;
}

.btn-download:hover { background-color: var(--primary-hover); color: #fff; }

/* "Today's Latest Update Apps" grid */
.update-grid, .applist-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem 2.5rem;
    margin-bottom: 3rem;
}

.update-row, .applist-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0.5rem;
    border-radius: 10px;
    transition: var(--transition);
}

.update-row:hover, .applist-row:hover { background-color: var(--bg-tertiary); }

.update-row img, .applist-row img {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    object-fit: cover;
    flex-shrink: 0;
}

.update-row .u-meta, .applist-row .u-meta { min-width: 0; }

.update-row .u-title, .applist-row .u-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.98rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.update-row .u-sub, .applist-row .u-sub {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 0.15rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.star-rating {
    color: var(--warning);
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

/* Horizontal icon tiles (Communication/Social style rows) */
.icon-row {
    display: flex;
    gap: 1.4rem;
    overflow-x: auto;
    padding-bottom: 0.75rem;
    margin-bottom: 2.5rem;
    scrollbar-width: thin;
}

.icon-tile {
    flex: 0 0 104px;
    text-align: left;
}

.icon-tile img {
    width: 104px;
    height: 104px;
    border-radius: 24px;
    object-fit: cover;
    transition: var(--transition);
}

.icon-tile:hover img { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16); }

.icon-tile .t-name {
    margin-top: 0.5rem;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em;
}

/* Featured carousel (e.g. Entertainment) */
.carousel {
    position: relative;
    margin-bottom: 3rem;
}

.carousel-track {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding-bottom: 0.5rem;
}

.carousel-track::-webkit-scrollbar { display: none; }

.carousel-nav {
    position: absolute;
    top: 38%;
    transform: translateY(-50%);
    z-index: 2;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--text-secondary);
    box-shadow: var(--card-shadow);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.carousel-nav:hover { color: var(--primary); box-shadow: var(--shadow-lg); }
.carousel-nav.prev { left: -12px; }
.carousel-nav.next { right: -12px; }

.feat-card,
.carousel-track > .hot-card {
    flex: 0 0 auto;
    width: 380px;
    max-width: 82%;
}

.feat-banner-link {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #33415c 0%, #16213a 100%);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
    transition: var(--transition);
}

.feat-banner-link:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18); }

.feat-banner {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feat-fallback { display: flex; align-items: center; justify-content: center; }

.feat-fallback img {
    width: 84px;
    height: 84px;
    border-radius: 20px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.feat-meta {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.75rem 0.25rem 0;
}

.feat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.feat-info { min-width: 0; }

.feat-name {
    display: block;
    font-weight: 600;
    color: var(--info);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.feat-name:hover { text-decoration: underline; }

/* Single wide featured banner (e.g. Games) */
.game-banner {
    position: relative;
    display: block;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 24 / 9;
    background: linear-gradient(135deg, #33415c 0%, #16213a 100%);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
    transition: var(--transition);
    margin-bottom: 3rem;
}

.game-banner:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18); }

.game-banner-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-banner-overlay {
    position: absolute;
    inset: auto 0 0 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.75) 100%);
}

.game-banner-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
}

.game-banner-info { min-width: 0; flex: 1; }

.game-banner-title {
    display: block;
    color: #fff;
    font-weight: 700;
    font-size: 1.2rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-banner-dev {
    display: block;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* Review "helpful" vote button */
.helpful-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.75rem;
    padding: 0.3rem 0.75rem;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
}

.helpful-btn:hover { border-color: var(--primary); color: var(--primary); }

.helpful-btn.voted {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.08);
}

@media (max-width: 900px) {
    .hot-apps { grid-template-columns: 1fr; }
    .update-grid, .applist-grid { grid-template-columns: 1fr; }
    .carousel-nav { display: none; }
    .game-banner { aspect-ratio: 16 / 9; }
}
