:root {
    --primary: #6d5efc;
    --secondary: #14b8a6;
    --bg: #06101d;
    --card: rgba(10, 19, 34, 0.78);
    --line: rgba(255, 255, 255, 0.08);
    --text: #edf3ff;
    --muted: #9baccc;
    --danger: #ff6b81;
    --success: #25d0ad;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(109, 94, 252, 0.18), transparent 28%),
        radial-gradient(circle at top right, rgba(20, 184, 166, 0.16), transparent 24%),
        linear-gradient(180deg, #050b14 0%, #091320 100%);
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

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

.page-bg {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.04), transparent 24%),
        radial-gradient(circle at 82% 12%, rgba(255, 255, 255, 0.03), transparent 20%),
        radial-gradient(circle at 50% 100%, rgba(255, 255, 255, 0.03), transparent 26%);
    pointer-events: none;
}

.site-shell {
    position: relative;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 40px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(9, 18, 33, 0.7);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-copy {
    display: grid;
    gap: 6px;
}

.brand-copy strong {
    font-size: 1rem;
}

.site-logo-vertical {
    height: 42px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    display: block;
}

.brand-copy small,
.muted,
.install-note,
.table-app small,
.category-item p,
.field-group small {
    color: var(--muted);
}

.site-logo,
.app-icon,
.table-icon {
    object-fit: cover;
    flex: none;
}

.site-logo {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.25);
}

.app-icon,
.table-icon,
.app-icon.placeholder,
.table-icon.placeholder {
    display: grid;
    place-items: center;
    font-weight: 800;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.25);
}

.app-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
}

.table-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
}

.app-icon.large {
    width: 96px;
    height: 96px;
    border-radius: 24px;
}

.topnav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.topnav-end {
    justify-content: flex-end;
}

.topnav a {
    padding: 10px 14px;
    border-radius: 14px;
    color: var(--muted);
    transition: 0.2s ease;
}

.topnav a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: white;
}

.glass-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.home-banner,
.slider-shell,
.category-buttons-wrap,
.install-guide {
    margin-top: 24px;
}

.hero-section,
.split-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 22px;
    margin-top: 24px;
}

.hero-copy,
.hero-panel,
.detail-hero,
.auth-card,
.form-card,
.category-item,
.stat-card,
.action-tile {
    padding: 24px;
}

.hero-copy h1,
.detail-hero h1,
.auth-card h1 {
    margin: 8px 0 12px;
    line-height: 1.05;
    font-size: clamp(2rem, 5vw, 3.7rem);
}

.hero-copy p,
.auth-card p,
.detail-description,
.banner-overlay p {
    color: #d7e3ff;
    line-height: 1.75;
}

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #d8ddff;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.72rem;
}

.kicker::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.hero-stats,
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 24px;
}

.stat-card {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 18px;
}

.stat-card strong {
    display: block;
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.stat-card span {
    color: var(--muted);
}

.field-group {
    display: grid;
    gap: 10px;
}

.field-group label {
    font-size: 0.92rem;
    color: #d8e3ff;
}

input,
select,
textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    outline: none;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(109, 94, 252, 0.18);
}

input[type="color"] {
    min-height: 54px;
    padding: 8px;
}

textarea {
    resize: vertical;
}

.checkbox-group,
.checkbox-group label,
.checkbox-group span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.checkbox-group input {
    width: auto;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.simple-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.span-2 {
    grid-column: span 2;
}

.form-actions,
.card-actions,
.inline-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 18px;
    border: 0;
    border-radius: 16px;
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

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

.btn-primary {
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 16px 36px rgba(109, 94, 252, 0.28);
}

.btn-light {
    color: white;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-block {
    width: 100%;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin: 28px 0 18px;
}

.section-head.compact {
    margin: 0 0 20px;
}

.section-head h2 {
    margin: 6px 0 0;
    font-size: clamp(1.4rem, 3vw, 2rem);
}

.install-notice,
.empty-state,
.table-wrap,
.auth-wrap,
.detail-hero,
.carousel-shell {
    margin-top: 22px;
}

.auth-wrap {
    display: flex;
    justify-content: center;
}

.auth-wrap.wide .auth-card {
    max-width: 860px;
}

.auth-card {
    width: min(100%, 540px);
}

.install-card {
    width: min(100%, 880px);
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.app-card {
    padding: 22px;
}

.app-card-mini {
    min-width: 280px;
}

.app-card-head,
.detail-header,
.table-app {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.app-card h3,
.category-item strong,
.table-app strong,
.banner-overlay h2,
.banner-overlay h3 {
    margin: 6px 0;
}

.app-desc {
    min-height: 66px;
    color: #d4def8;
    line-height: 1.75;
}

.app-badges,
.meta-row,
.summary-list,
.quick-actions,
.category-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.column-list {
    flex-direction: column;
    gap: 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 11px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
}

.badge-primary {
    background: rgba(109, 94, 252, 0.18);
    color: #e5e1ff;
}

.badge-accent,
.badge-success {
    background: rgba(20, 184, 166, 0.16);
    color: #d4fff5;
}

.badge-muted {
    background: rgba(255, 255, 255, 0.08);
    color: #d7def0;
}

.meta-row {
    justify-content: space-between;
    color: var(--muted);
    font-size: 0.92rem;
    margin: 18px 0;
}

.meta-row.big-gap {
    justify-content: flex-start;
    gap: 20px;
}

.detail-subtitle {
    color: #d7e2ff;
    margin-top: 6px;
}

.detail-url-row code {
    color: #fff;
}

.summary-list {
    list-style: none;
    margin: 0;
    padding: 0;
    flex-direction: column;
}

.summary-list li,
.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}

.summary-list li:last-child,
.category-item:last-child {
    border-bottom: 0;
}

.summary-list span {
    color: var(--muted);
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.action-tile {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    min-height: 120px;
}

.action-tile strong {
    display: block;
    margin-bottom: 8px;
}

.action-tile span {
    color: var(--muted);
    line-height: 1.7;
}

.simple-search-card {
    align-self: start;
}

.search-inline-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    align-items: start;
}

.filter-toggle-card {
    position: relative;
}

.filter-toggle-card summary {
    list-style: none;
}

.filter-toggle-card summary::-webkit-details-marker {
    display: none;
}

.filter-panel-box {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: min(360px, 90vw);
    padding: 16px;
    display: grid;
    gap: 14px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(9, 18, 33, 0.96);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.32);
    z-index: 5;
}

.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.category-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 11px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: #d9e3ff;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.chip-icon,
.badge-icon {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    object-fit: cover;
    flex: none;
}

.category-chip.active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 14px 30px rgba(109, 94, 252, 0.22);
}

.branding-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.branding-card {
    display: grid;
    gap: 14px;
    padding: 16px;
    align-content: start;
}

.preview-vertical {
    height: 54px;
    max-width: 100%;
}

.play-style-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
}

.app-card-copy {
    display: grid;
    gap: 8px;
}

.version-strip {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 10px 0 4px;
}

.version-pill {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #dce5ff;
    font-size: 0.82rem;
    font-weight: 700;
}

.detail-version-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 18px 0 10px;
}

.version-card {
    padding: 18px;
}

.version-card small {
    display: block;
    color: var(--muted);
    margin-bottom: 8px;
}

.version-card strong {
    font-size: 1.2rem;
}

.chart-card,
.playstyle-panel {
    margin-top: 24px;
}

.download-chart-wrap {
    padding: 16px;
}

.download-chart-wrap canvas {
    width: 100%;
    height: 340px;
    display: block;
}

.compact-inline {
    gap: 10px;
    align-items: center;
}

.table-wrap {
    overflow: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 16px 12px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.table th {
    color: #d7e1ff;
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.text-link {
    background: none;
    border: 0;
    color: #d9e3ff;
    padding: 0;
    cursor: pointer;
}

.text-link.danger {
    color: #ff9eb0;
}

.alert {
    margin-top: 20px;
    padding: 14px 18px;
    border-radius: 16px;
    border: 1px solid transparent;
}

.alert.success {
    background: rgba(37, 208, 173, 0.12);
    border-color: rgba(37, 208, 173, 0.24);
    color: #d7fff5;
}

.alert.error {
    background: rgba(255, 107, 129, 0.12);
    border-color: rgba(255, 107, 129, 0.24);
    color: #ffdce3;
}

.footer-bar {
    margin-top: 28px;
    padding: 18px 22px;
    border: 1px solid var(--line);
    border-radius: 20px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    background: rgba(9, 18, 33, 0.6);
}

code {
    padding: 4px 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
}

.current-banner,
.screenshot-card,
.existing-shot {
    overflow: hidden;
    border-radius: 20px;
}

.current-banner img,
.existing-shot img {
    width: 100%;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.04);
}

.screenshot-card img {
    width: auto;
    max-width: 100%;
    max-height: 420px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.04);
    margin: 0 auto;
}

.current-banner img {
    aspect-ratio: 21 / 7;
}

.existing-shot img {
    aspect-ratio: 9 / 16;
}

.existing-screenshots {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.existing-shot {
    display: grid;
    gap: 12px;
    padding: 12px;
}

.existing-shot span {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
}

.slider-shell,
.carousel-shell {
    position: relative;
}

.banner-slider {
    overflow: hidden;
    padding: 0;
}

.banner-track {
    display: flex;
    transition: transform 0.45s ease;
    width: 100%;
}

.banner-slide {
    position: relative;
    min-width: 100%;
    min-height: 360px;
}

.banner-slide img {
    width: 100%;
    height: 100%;
    min-height: 360px;
    object-fit: cover;
}

.compact-banner {
    min-height: 290px;
}

.compact-banner img {
    min-height: 290px;
}

.banner-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 12px;
    padding: 28px;
    background: linear-gradient(180deg, rgba(4, 10, 20, 0.08) 0%, rgba(4, 10, 20, 0.78) 100%);
}

.banner-animate > * {
    opacity: 0;
    transform: translateY(18px);
}

.banner-slide.is-active .banner-animate > * {
    animation: bannerReveal 0.7s ease forwards;
}

.banner-slide.is-active .banner-animate > *:nth-child(1) { animation-delay: 0.08s; }
.banner-slide.is-active .banner-animate > *:nth-child(2) { animation-delay: 0.18s; }
.banner-slide.is-active .banner-animate > *:nth-child(3) { animation-delay: 0.28s; }

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(7, 16, 29, 0.8);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

.slider-prev {
    left: 14px;
}

.slider-next {
    right: 14px;
}

.slider-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 16px;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 3;
}

.slider-dot {
    width: 11px;
    height: 11px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    cursor: pointer;
}

.slider-dot.active {
    background: #fff;
}

.install-guide {
    padding: 24px;
}

.install-steps {
    display: grid;
    gap: 14px;
    margin: 0;
    padding-left: 22px;
    color: #dbe7ff;
}

.install-steps li {
    line-height: 1.8;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.carousel-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding: 4px 52px;
}

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

.carousel-item {
    scroll-snap-align: start;
}

.screenshot-item {
    min-width: 180px;
    max-width: 260px;
}

.small-preview .screenshot-card {
    display: grid;
    place-items: center;
    padding: 12px;
    min-height: 260px;
}

.whatsapp-float {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 62px;
    height: 62px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #1db954, #25d366);
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.28);
    z-index: 90;
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(2, 8, 16, 0.88);
}

.lightbox[hidden] {
    display: none;
}

.lightbox-inner {
    position: relative;
    max-width: 96vw;
    max-height: 92vh;
}

.lightbox-inner img {
    max-width: 96vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 18px;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
}

.lightbox-close {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: rgba(10, 19, 34, 0.9);
    color: #fff;
    cursor: pointer;
}

.btn.is-copied {
    background: rgba(37, 208, 173, 0.18);
    border-color: rgba(37, 208, 173, 0.35);
}

.mini-svg {
    width: 16px;
    height: 16px;
    flex: none;
}

.star-rating {
    position: relative;
    display: inline-block;
    line-height: 1;
    letter-spacing: 0.12em;
    font-size: 0.95rem;
}

.stars-base {
    color: rgba(255,255,255,0.22);
}

.stars-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--rating-percent);
    overflow: hidden;
    white-space: nowrap;
    color: #fbbf24;
}

.rating-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    color: #fff0bf;
}

.detail-rating-row {
    margin-top: 10px;
}

.rating-number {
    color: #d8e3ff;
    font-size: 0.88rem;
}

.download-page-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 18px;
    margin-top: 18px;
}

.qr-card {
    padding: 22px;
}

.qr-image {
    width: 100%;
    max-width: 260px;
    margin: 12px auto 0;
    border-radius: 18px;
    background: #fff;
    padding: 10px;
}

@media (max-width: 1024px) {
    .hero-section,
    .split-layout,
    .app-grid,
    .quick-actions,
    .existing-screenshots,
    .branding-grid,
    .detail-version-grid,
    .download-page-grid {
        grid-template-columns: 1fr;
    }

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

@keyframes bannerReveal {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 720px) {
    .site-shell {
        width: min(100% - 20px, 1240px);
        padding-top: 16px;
    }

    .topbar,
    .footer-bar,
    .section-head,
    .detail-header,
    .app-card-head {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-copy,
    .hero-panel,
    .detail-hero,
    .auth-card,
    .form-card,
    .app-card,
    .stat-card {
        padding: 20px;
    }

    .search-inline-row {
        grid-template-columns: 1fr;
    }

    .filter-panel-box {
        position: static;
        width: 100%;
    }

    .hero-stats,
    .stats-grid,
    .form-grid,
    .simple-grid,
    .app-grid,
    .existing-screenshots {
        grid-template-columns: 1fr;
    }

    .span-2 {
        grid-column: span 1;
    }

    .meta-row,
    .card-actions,
    .form-actions,
    .stack-mobile,
    .inline-actions,
    .category-buttons,
    .version-strip {
        flex-direction: column;
        align-items: stretch;
    }

    .slider-btn {
        width: 38px;
        height: 38px;
    }

    .carousel-track {
        padding-inline: 8px;
    }

    .table {
        min-width: 760px;
    }
}
