@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;
    /* Deep end of the brand teal — the only shades that carry white text at AA. */
    --primary-deep: #016b64;
    --primary-deep-2: #01847a;
    --primary-deep-rgb: 1, 107, 100;
    --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-img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    flex-shrink: 0;
}

.logo-text { color: var(--text-primary); }
.logo-text b { color: var(--primary); font-weight: inherit; }

.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);
}

/* Initials placeholder when the profile has no photo. Deep teal both ends:
   the initials are white, and --primary is only 2.64:1 against white. */
.avatar-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-deep) 0%, var(--primary-deep-2) 100%);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
    border-radius: 50%;
    overflow: hidden;
}

/* Profile-page avatar sizing (image or initials) */
.avatar-profile {
    width: 100px !important;
    height: 100px !important;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-color);
    margin-bottom: 1rem;
}
.avatar-profile.avatar-initials { font-size: 2.2rem; border-color: transparent; }

.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::-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-banner {
    position: relative;
    width: 100%;
    margin-top: 2.8rem;
    aspect-ratio: 24 / 9;
    border-radius: 14px;
    overflow: hidden;
    background: #0c1b1f;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.10);
    display: flex;
    align-items: center;
}

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

/* Left-anchored scrim: solid through the copy column, then fades to reveal
   the art on the right (mirrors the mobile BannerScrim). */
.earn-banner-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(8, 18, 22, 0.62) 0%,
        rgba(8, 18, 22, 0.62) 60%,
        rgba(8, 18, 22, 0) 100%
    );
}

.earn-banner-copy {
    position: relative;
    padding: 1.4rem clamp(1.25rem, 34%, 12rem) 1.4rem clamp(1.25rem, 4vw, 2.5rem);
    max-width: 66%;
}

.earn-banner-title {
    font-size: clamp(1.2rem, 2.4vw, 1.9rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.2px;
    color: #ffffff;
    margin-bottom: 0.6rem;
    text-shadow: 0 1px 6px rgba(6, 42, 40, 0.35);
}

.earn-banner-sub {
    font-size: clamp(0.85rem, 1.3vw, 1.05rem);
    font-weight: 500;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.86);
    text-shadow: 0 1px 6px rgba(6, 42, 40, 0.35);
}

/* 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;
}

/* Promo background video (login/register). Sits behind the gradient overlay and
   the text; auth-bg.jpg is the poster/fallback and the CSS background above still
   shows if the video never loads. */
.auth-promo-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    border: 0;
    pointer-events: none;
}

/* Move the darkening gradient above the video so overlaid copy stays legible. */
.auth-promo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.7));
    z-index: 1;
    pointer-events: none;
}

.auth-promo-content {
    position: relative;
    z-index: 2;
}

/* Respect reduced-motion: drop the video, fall back to the still poster/background. */
@media (prefers-reduced-motion: reduce) {
    .auth-promo-video { display: none; }
}

.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;
}

/* Inline rather than a flex item: a flex row centres the mark against the whole
   heading, which strands it mid-block once the text wraps to two or three lines.
   Height is locked and width left auto because the mark is portrait (274x336). */
.auth-header h1 .auth-header-logo {
    height: 1.25em;
    width: auto;
    vertical-align: -0.24em;
    margin-right: 0.45rem;
}

.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);
}

.phone-row {
    display: flex;
    gap: 0.5rem;
}

.phone-row .dial-select {
    flex: 0 0 7.75rem;
    width: auto;
    padding-right: 0.5rem;
}

.phone-row .input-icon-group {
    flex: 1;
    min-width: 0;
}

.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;
}

/* Hero overlay on the home banner slider */
.banner-slider.has-hero { aspect-ratio: auto; min-height: 300px; }

.banner-slider .hero-fallback {
    background:
        radial-gradient(ellipse at 80% 20%, rgba(18, 185, 129, 0.35), transparent 55%),
        linear-gradient(135deg, #04231e 0%, #063f3b 55%, #01b2aa 140%);
}

.banner-slider.has-hero .banner-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(4, 24, 21, 0.82) 0%, rgba(4, 24, 21, 0.55) 45%, rgba(4, 24, 21, 0.15) 100%);
}

/* Overlays stack in one grid cell (tallest message sizes the box) and
   cross-fade in sync with the banner slides. */
.hero-overlays {
    position: relative;
    z-index: 2;
    display: grid;
}

.hero-overlay {
    grid-area: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
    padding: 3rem 3rem 3.4rem;
    max-width: 620px;
    min-height: 300px;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none; /* keep the banner-slide link clickable behind the copy */
}

.hero-overlay.active { opacity: 1; }
.hero-overlay.active .hero-cta { pointer-events: auto; }

.hero-title {
    font-size: clamp(1.6rem, 3.4vw, 2.5rem);
    font-weight: 800;
    line-height: 1.15;
    color: #fff;
    text-wrap: balance;
}

/* Second statement of each hero title, in the brand green */
.hero-title .hero-accent {
    color: var(--mint);
    display: block; /* the accent statement gets its own line */
}

.hero-sub {
    font-size: clamp(0.9rem, 1.4vw, 1.05rem);
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.85);
}

.hero-cta {
    margin-top: 0.4rem;
    padding: 0.7rem 1.8rem;
    font-size: 0.95rem;
}

@media (max-width: 640px) {
    .hero-overlay { padding: 2rem 1.4rem 2.6rem; min-height: 260px; }
    .banner-slider.has-hero { min-height: 260px; }
    .banner-slider.has-hero .banner-slide::after {
        background: linear-gradient(180deg, rgba(4, 24, 21, 0.35) 0%, rgba(4, 24, 21, 0.78) 100%);
    }
}

.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); }



.btn-download {
    background-color: var(--primary);
    color: #fff !important;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.45rem 1.1rem;
    border-radius: 50px;
    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;
}

/* App size line under the rating in category cells (mobile gameCardSize) */
.app-size {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.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 ride inside the shared carousel (arrows, no scrollbar) */
.carousel-track.icon-track { gap: 1.4rem; }

.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-track > img { flex: 0 0 auto; }
.shots-track { padding-bottom: 0.5rem; }

.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 {
    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 { flex: 1; min-width: 0; }

/* Hot Apps only — size · category under the rating (mobile featFileMeta) */
.feat-file-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.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; }
}

/* ─── Wallet page (mirrors the mobile wallet design) ───────────────────────── */
.wallet-page { max-width: 720px; margin: 0 auto; }

.wallet-balance-card {
    background: linear-gradient(135deg, var(--primary-deep) 0%, var(--primary-deep-2) 100%);
    border-radius: 20px;
    padding: 1.6rem 1.5rem;
    margin-bottom: 1.6rem;
    box-shadow: 0 12px 28px rgba(var(--primary-deep-rgb), 0.28);
    color: #fff;
}
.wallet-balance-label { font-size: 0.7rem; font-weight: 800; letter-spacing: 1px; color: rgba(255,255,255,0.85); }
.wallet-balance-value { display: block; font-size: 2.6rem; font-weight: 900; margin: 0.4rem 0 1.1rem; line-height: 1; }
/* Inline Material star used in place of pts/points labels */
.star-icon { width: 1em; height: 1em; vertical-align: -0.08em; }
.wallet-star { width: 0.92em; height: 0.92em; vertical-align: -0.08em; }
.wallet-stats-row { display: flex; align-items: center; gap: 1.25rem; }
.wallet-stat-value { font-size: 1.15rem; font-weight: 800; }
.wallet-stat-label { font-size: 0.72rem; font-weight: 600; color: rgba(255,255,255,0.8); margin-top: 2px; }
.wallet-stat-divider { width: 1px; height: 32px; background: rgba(255,255,255,0.25); }
.wallet-rate-note { font-size: 0.72rem; font-weight: 600; color: rgba(255,255,255,0.75); margin-top: 0.9rem; }
.wallet-cta-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.1rem; }
.wallet-cta {
    flex: 1 1 auto;
    min-width: 150px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #fff;
    color: var(--primary-deep) !important;
    font-weight: 800;
    font-size: 0.92rem;
    padding: 0.7rem 1.2rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
}
.wallet-cta:hover { filter: brightness(0.97); }
.wallet-cta[disabled] { opacity: 0.7; cursor: default; }
.wallet-cta-ghost {
    background: rgba(255,255,255,0.14);
    color: #fff !important;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.4);
}

.wallet-section-title { font-size: 1.05rem; font-weight: 800; margin: 0.25rem 0 0.75rem; }

.wallet-filter-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.8rem; }
.wallet-pill {
    padding: 0.4rem 1rem;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}
.wallet-pill.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.wallet-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 1.6rem;
}
.wallet-row { display: flex; align-items: center; gap: 0.8rem; padding: 0.8rem 0.9rem; }
.wallet-row.row-border { border-top: 1px solid var(--border-color); }
.wallet-row-icon {
    width: 40px; height: 40px; flex: 0 0 40px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
}
.wallet-row-icon.earn { border-radius: 10px; background: rgba(var(--primary-rgb), 0.12); color: var(--primary-deep); }
.wallet-row-meta { flex: 1; min-width: 0; }
.wallet-row-title { font-size: 0.9rem; font-weight: 700; color: var(--text-primary); }
.wallet-row-sub {
    font-size: 0.76rem; color: var(--text-secondary); margin-top: 2px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wallet-row-points { font-size: 0.95rem; font-weight: 800; flex-shrink: 0; }
.wallet-row-points.pos { color: var(--primary); }
.wallet-row-points.neg { color: var(--danger); }
.wallet-empty { padding: 1.5rem; text-align: center; color: var(--text-secondary); font-size: 0.85rem; }

/* Games page: responsive grid of app cards */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 3rem;
}
.games-grid .app-card { max-width: none; }

/* ─── Modal (profile edit, etc.) ───────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(6, 13, 15, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    backdrop-filter: blur(3px);
}
.modal-box {
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 1.6rem;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.modal-head h3 { font-size: 1.25rem; font-weight: 800; }
.modal-close {
    background: none; border: none; cursor: pointer;
    font-size: 1.6rem; line-height: 1; color: var(--text-muted);
}
.modal-close:hover { color: var(--text-primary); }
.modal-error { margin-bottom: 1rem; }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 0.6rem; margin-top: 1.25rem; }
@media (max-width: 520px) { .modal-grid { grid-template-columns: 1fr; } }

/* Edit-profile modal avatar row */
.modal-avatar { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.modal-avatar .avatar-profile { margin-bottom: 0; width: 72px !important; height: 72px !important; }

/* Per-row action buttons in the developer app table */
.row-actions { display: flex; gap: 0.35rem; }
.row-actions .btn { padding: 0.25rem 0.5rem; }
.row-actions .btn-pill {
    padding: 0.25rem 0.8rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

/* SDK credentials (PEP Ads modal) */
.cred-intro { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 1.25rem; line-height: 1.6; }
.cred-intro code { font-family: var(--mono); font-size: 0.8rem; color: var(--primary-deep); }
.cred-field { margin-bottom: 1rem; }
.cred-field label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.cred-value {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.5rem 0.5rem 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}
.cred-value code {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    white-space: nowrap;
    font-family: var(--mono);
    font-size: 0.82rem;
    color: var(--text-primary);
}
.cred-btn {
    flex: none;
    width: 30px;
    height: 30px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xs);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}
.cred-btn:hover { color: var(--primary-deep); border-color: var(--primary); }
.cred-placements { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.cred-placements span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary-deep);
    font-family: var(--mono);
    font-size: 0.78rem;
}
.cred-placements em { font-style: normal; font-weight: 700; text-transform: capitalize; }

.field-note {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
}

.field-note-good { color: var(--success); }
.field-note-bad { color: var(--danger); }
.field-note-muted { color: var(--text-muted); font-weight: 500; }

.form-control.is-taken {
    border-color: var(--danger);
}

.form-control.is-taken:focus {
    border-color: var(--danger);
    box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.16);
}

.wallet-dev-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.1rem 1.25rem;
}

.wallet-dev-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.wallet-dev-head i {
    color: var(--primary);
}

/* wallet-stat-* are coloured for the dark gradient balance card; this card is
   on a light surface, so the label and divider need repainting. */
.wallet-dev-card .wallet-stat-label {
    color: var(--text-muted);
}

.wallet-dev-card .wallet-stat-divider {
    background: var(--border-color);
}

.nav-wallet {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    font-weight: 600;
    color: var(--primary);
    background-color: rgba(var(--primary-rgb), 0.1);
}

.nav-wallet:hover {
    background-color: rgba(var(--primary-rgb), 0.18);
}
