/* ========================================================
   RAJALANGIT77 - PWA Google Play Store Theme
   Warna Aksen: Maroon (#8b0000) & Emas (#d4af37)
   Background: Gelap Elegan (#121212 / #1e1e1e)
   ======================================================== */

:root {
    --theme-maroon: #8b0000;
    --theme-maroon-dark: #630000;
    --theme-maroon-hover: #a30000;
    --theme-gold: #d4af37;
    --theme-gold-light: #f3e5ab;
    --gp-bg: #121212;
    --gp-surface: #1e1e1e;
    --gp-surface-light: #282828;
    --gp-border: #333333;
    --gp-text: #ffffff;
    --gp-text-sub: #9aa0a6;
    --gp-text-muted: #70757a;
    --gp-green: #01875f;
    --gp-font: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--gp-bg);
    color: var(--gp-text);
    font-family: var(--gp-font);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    padding-bottom: 90px;
}

/* TOP NAVIGATION */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 16px;
    background-color: var(--gp-bg);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.topbar__left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar__back-btn {
    background: none;
    border: none;
    color: var(--gp-text-sub);
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 6px;
    border-radius: 50%;
}

.topbar__brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: var(--theme-gold);
    letter-spacing: 0.5px;
}

.topbar__right {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--gp-text-sub);
}

.topbar__icon-btn {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
}

/* MAIN CONTAINER */
.container {
    max-width: 680px;
    margin: 0 auto;
    padding: 16px;
}

/* APP HEADER */
.app-header {
    display: flex;
    gap: 18px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.app-header__icon-box {
    position: relative;
    width: 76px;
    height: 76px;
    flex-shrink: 0;
    border-radius: 18px;
    background: var(--gp-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(212, 175, 55, 0.25);
}

.app-header__icon-img {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    object-fit: cover;
    z-index: 1;
}

/* SVG PROGRESS RING */
#iconLoading {
    position: absolute;
    top: 0;
    left: 0;
    width: 76px;
    height: 76px;
    z-index: 2;
    transform: rotate(-90deg);
    display: none;
    pointer-events: none;
}

#iconLoading.show-progress {
    display: block !important;
}

.progress-ring__circle {
    transition: stroke-dashoffset 0.08s linear;
    transform-origin: 50% 50%;
}

.app-header__info {
    flex: 1;
    overflow: hidden;
}

.app-header__title {
    font-size: 22px;
    font-weight: 700;
    color: var(--gp-text);
    margin-bottom: 2px;
    line-height: 1.25;
}

.app-header__developer {
    font-size: 14px;
    font-weight: 500;
    color: var(--theme-gold);
    margin-bottom: 4px;
}

.app-header__verified {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--gp-text-sub);
    margin-bottom: 4px;
}

.app-header__verified svg {
    fill: var(--gp-green);
    width: 14px;
    height: 14px;
}

.app-header__tags {
    font-size: 11px;
    color: var(--gp-text-muted);
}

/* APP STATS ROW */
.stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    margin-bottom: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    text-align: center;
}

.stat-item:not(:last-child) {
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-item__value {
    font-size: 14px;
    font-weight: 700;
    color: var(--gp-text);
    display: flex;
    align-items: center;
    gap: 3px;
}

.stat-item__value svg {
    width: 13px;
    height: 13px;
    fill: var(--theme-gold);
}

.stat-item__label {
    font-size: 11px;
    color: var(--gp-text-sub);
    margin-top: 2px;
}

/* ACTION BUTTONS */
.action-box {
    margin-bottom: 24px;
}

/* SMART COUNTDOWN BUTTON (#smartBtn) */
.btn-smart-install {
    width: 100%;
    height: 52px;
    background: linear-gradient(135deg, var(--theme-maroon) 0%, #a00000 100%);
    border: 1.5px solid var(--theme-gold);
    border-radius: 12px;
    color: #ffffff;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(139, 0, 0, 0.45);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-smart-install:active {
    transform: scale(0.98);
}

.btn-smart-install .btn-title {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.3px;
}

.btn-smart-install .btn-title svg {
    width: 18px;
    height: 18px;
    fill: var(--theme-gold);
}

.btn-smart-install .btn-sub {
    font-size: 11px;
    color: var(--theme-gold-light);
    font-weight: 400;
}

/* State Installing */
.btn-smart-install.state-installing {
    background: #2a2a2a !important;
    border-color: #444444 !important;
    box-shadow: none !important;
    cursor: default;
}

.btn-smart-install.state-installing .btn-title {
    color: var(--theme-gold) !important;
}

.btn-smart-install.state-installing .btn-sub {
    color: var(--gp-text-sub) !important;
}

/* State Play */
.btn-smart-install.state-play {
    background: linear-gradient(135deg, #01875f 0%, #00a86b 100%) !important;
    border-color: #4ade80 !important;
    box-shadow: 0 4px 20px rgba(1, 135, 95, 0.5) !important;
    animation: pulsePlay 2s infinite;
}

.btn-smart-install.state-play .btn-title {
    color: #ffffff !important;
    font-size: 17px !important;
}

@keyframes pulsePlay {
    0% { box-shadow: 0 0 0 0 rgba(1, 135, 95, 0.6); }
    70% { box-shadow: 0 0 0 12px rgba(1, 135, 95, 0); }
    100% { box-shadow: 0 0 0 0 rgba(1, 135, 95, 0); }
}

/* SECONDARY BUTTONS (Download APK & Windows PC) */
.secondary-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-secondary {
    flex: 1;
    height: 40px;
    background: var(--gp-surface);
    border: 1px solid var(--gp-border);
    border-radius: 8px;
    color: var(--gp-text-sub);
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: var(--gp-surface-light);
    color: var(--gp-text);
    border-color: var(--theme-gold);
}

.btn-secondary svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

/* SCREENSHOTS CAROUSEL */
.screenshots-section {
    margin-bottom: 24px;
}

.screenshots-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--theme-maroon) transparent;
}

.screenshots-scroll::-webkit-scrollbar {
    height: 4px;
}

.screenshots-scroll::-webkit-scrollbar-thumb {
    background: var(--theme-maroon);
    border-radius: 4px;
}

.screenshot-item {
    flex-shrink: 0;
    width: 175px;
    height: 310px;
    border-radius: 12px;
    overflow: hidden;
    scroll-snap-align: start;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--gp-surface);
}

.screenshot-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* SECTIONS (ABOUT, DATA SAFETY, REVIEWS) */
.section-block {
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    cursor: pointer;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--gp-text);
}

.section-header svg {
    width: 20px;
    height: 20px;
    fill: var(--gp-text-sub);
}

.section-desc {
    font-size: 13px;
    color: var(--gp-text-sub);
    line-height: 1.6;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.tag-pill {
    padding: 5px 12px;
    background: var(--gp-surface);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 16px;
    font-size: 12px;
    color: var(--theme-gold);
    font-weight: 500;
}

/* DATA SAFETY BOX */
.data-safety-card {
    background: var(--gp-surface);
    border: 1px solid var(--gp-border);
    border-radius: 12px;
    padding: 16px;
}

.data-safety-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 12px;
}

.data-safety-item:last-child {
    margin-bottom: 0;
}

.data-safety-item svg {
    width: 20px;
    height: 20px;
    fill: var(--theme-gold);
    flex-shrink: 0;
    margin-top: 2px;
}

.data-safety-text {
    font-size: 13px;
    color: var(--gp-text-sub);
}

.data-safety-text strong {
    color: var(--gp-text);
    display: block;
    margin-bottom: 2px;
}

/* REVIEWS & RATINGS */
.reviews-summary {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 16px;
}

.reviews-score {
    text-align: center;
}

.reviews-score__num {
    font-size: 44px;
    font-weight: 700;
    color: var(--gp-text);
    line-height: 1;
}

.reviews-score__stars {
    display: flex;
    justify-content: center;
    gap: 2px;
    margin-top: 6px;
}

.reviews-score__stars svg {
    width: 14px;
    height: 14px;
    fill: var(--theme-gold);
}

.reviews-score__count {
    font-size: 11px;
    color: var(--gp-text-muted);
    margin-top: 4px;
}

.reviews-bars {
    flex: 1;
}

.bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 11px;
    color: var(--gp-text-sub);
}

.bar-track {
    flex: 1;
    height: 5px;
    background: #333333;
    border-radius: 3px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--theme-maroon);
    border-radius: 3px;
}

/* USER REVIEW CARD */
.user-review {
    background: var(--gp-surface);
    border-radius: 12px;
    padding: 14px;
    margin-top: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.user-review__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.user-review__user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-review__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--theme-maroon);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}

.user-review__name {
    font-size: 13px;
    font-weight: 500;
    color: var(--gp-text);
}

.user-review__stars {
    display: flex;
    gap: 2px;
}

.user-review__stars svg {
    width: 12px;
    height: 12px;
    fill: var(--theme-gold);
}

.user-review__date {
    font-size: 11px;
    color: var(--gp-text-muted);
    margin-bottom: 6px;
}

.user-review__text {
    font-size: 13px;
    color: var(--gp-text-sub);
    line-height: 1.5;
}

/* BOTTOM STICKY BAR FOR MOBILE */
.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 99;
}

.bottom-bar__left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bottom-bar__icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}

.bottom-bar__name {
    font-size: 14px;
    font-weight: 700;
    color: var(--gp-text);
}

.bottom-bar__meta {
    font-size: 11px;
    color: var(--gp-text-sub);
}

.bottom-bar__btn {
    height: 38px;
    padding: 0 20px;
    background: var(--theme-maroon);
    border: 1px solid var(--theme-gold);
    border-radius: 8px;
    color: #ffffff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(139, 0, 0, 0.4);
    transition: all 0.2s ease;
}

.bottom-bar__btn.state-play {
    background: #01875f !important;
    border-color: #4ade80 !important;
}

/* TOAST NOTIFICATION */
.toast-notice {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #2a2a2a;
    color: #ffffff;
    border: 1px solid var(--theme-gold);
    padding: 12px 20px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    max-width: 90vw;
    text-overflow: ellipsis;
    overflow: hidden;
}

.toast-notice.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}
