/* ========================================================
   GRAFIKJITU - Google Play Store PWA Theme
   Aksen: Perpaduan Biru Elektrik / Neon (#00c2ff, #00b0ff)
   Latar Belakang: Biru Dongker Gelap (#080f1e, #0d1b32)
   ======================================================== */

:root {
    --theme-blue-deep: #0a2540;
    --theme-blue-navy: #0d3b66;
    --theme-blue-royal: #0066cc;
    --theme-blue-neon: #00c2ff;
    --theme-blue-glow: rgba(0, 194, 255, 0.45);
    --theme-blue-ambient: rgba(0, 102, 204, 0.35);

    --gp-bg: #080f1e;
    --gp-surface: #0d1b32;
    --gp-surface-light: #15294a;
    --gp-border: #1a3356;
    --gp-border-accent: rgba(0, 194, 255, 0.4);
    --gp-text: #ffffff;
    --gp-text-sub: #94a3b8;
    --gp-text-muted: #64748b;
    --gp-star: #ffb300;
    --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 BAR
   ======================================================== */
.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 var(--gp-border);
}

.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%;
    transition: background-color 0.2s, color 0.2s;
}

.topbar__back-btn:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

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

.topbar__brand svg {
    width: 22px;
    height: 22px;
}

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

.topbar__icon-btn {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 6px;
    border-radius: 50%;
    transition: background-color 0.2s, color 0.2s;
}

.topbar__icon-btn:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

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

/* ========================================================
   FEATURE BANNER HEADER
   ======================================================== */
.feature-banner {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid var(--gp-border);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 16px var(--theme-blue-glow);
    background: var(--gp-surface);
}

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

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

.app-header__icon-box {
    position: relative;
    width: 82px;
    height: 82px;
    flex-shrink: 0;
    border-radius: 20px;
    background: var(--gp-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6), 0 0 16px var(--theme-blue-glow);
    border: 1.5px solid var(--theme-blue-neon);
}

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

/* SVG PROGRESS RING */
#iconLoading {
    position: absolute;
    top: 0;
    left: 0;
    width: 82px;
    height: 82px;
    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: 24px;
    font-weight: 800;
    color: var(--gp-text);
    margin-bottom: 3px;
    line-height: 1.25;
    letter-spacing: 0.3px;
}

.app-header__developer {
    font-size: 14px;
    font-weight: 600;
    color: var(--theme-blue-neon);
    margin-bottom: 4px;
    letter-spacing: 0.2px;
}

.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: #00e676;
    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: 20px;
    border-top: 1px solid var(--gp-border);
    border-bottom: 1px solid var(--gp-border);
}

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

.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, #0a2540 0%, #0052cc 45%, #00c2ff 100%);
    border: 1.5px solid rgba(0, 194, 255, 0.6);
    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 var(--theme-blue-glow), 0 0 12px var(--theme-blue-ambient);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-smart-install:hover {
    background: linear-gradient(135deg, #0d3258 0%, #0066ee 45%, #33d1ff 100%);
    box-shadow: 0 6px 24px rgba(0, 194, 255, 0.65);
    transform: translateY(-1px);
}

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

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

.btn-smart-install .btn-title svg {
    width: 18px;
    height: 18px;
    fill: #ffffff;
}

.btn-smart-install .btn-sub {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.88);
    font-weight: 500;
}

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

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

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

/* State: Play (Mainkan) */
.btn-smart-install.state-play {
    background: linear-gradient(135deg, #0052cc 0%, #0080ff 45%, #00e5ff 100%) !important;
    border-color: #38bdf8 !important;
    color: #041226 !important;
    box-shadow: 0 4px 22px rgba(0, 194, 255, 0.75) !important;
    animation: pulsePlayBlue 2s infinite;
}

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

.btn-smart-install.state-play .btn-title svg {
    fill: #ffffff !important;
}

.btn-smart-install.state-play .btn-sub {
    color: rgba(255, 255, 255, 0.95) !important;
}

@keyframes pulsePlayBlue {
    0% { box-shadow: 0 0 0 0 rgba(0, 194, 255, 0.7); }
    70% { box-shadow: 0 0 0 16px rgba(0, 194, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 194, 255, 0); }
}

/* SECONDARY BUTTONS */
.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: #ffffff;
    border-color: var(--theme-blue-neon);
}

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

/* Fallback Guide Hint Link */
.guide-hint {
    text-align: center;
    margin-top: 10px;
}

.guide-hint-link {
    color: var(--theme-blue-neon);
    font-size: 12px;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.guide-hint-link:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ========================================================
   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-blue-neon) transparent;
}

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

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

.screenshot-item {
    flex-shrink: 0;
    width: 185px;
    height: 330px;
    border-radius: 12px;
    overflow: hidden;
    scroll-snap-align: start;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7);
    border: 1.5px solid var(--gp-border);
    background: var(--gp-surface);
    position: relative;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.screenshot-item:hover {
    transform: translateY(-2px);
    border-color: var(--theme-blue-neon);
}

.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 var(--gp-border-accent);
    border-radius: 16px;
    font-size: 12px;
    color: var(--theme-blue-neon);
    font-weight: 600;
}

/* 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-blue-neon);
    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(--gp-star);
}

.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: #15253b;
    border-radius: 3px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--theme-blue-royal) 0%, var(--theme-blue-neon) 100%);
    border-radius: 3px;
}

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

.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: linear-gradient(135deg, var(--theme-blue-navy) 0%, var(--theme-blue-neon) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #ffffff;
    font-size: 13px;
}

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

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

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

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

.user-review__content {
    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(8, 15, 30, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--gp-border);
    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: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid var(--gp-border-accent);
}

.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: 40px;
    padding: 0 22px;
    background: linear-gradient(135deg, #0052cc 0%, #00c2ff 100%);
    border: 1px solid rgba(0, 194, 255, 0.6);
    border-radius: 8px;
    color: #ffffff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0, 194, 255, 0.4);
    transition: all 0.2s ease;
}

.bottom-bar__btn:hover {
    background: linear-gradient(135deg, #0066ee 0%, #33d1ff 100%);
}

.bottom-bar__btn.state-play {
    background: linear-gradient(135deg, #0066ee 0%, #00e5ff 100%) !important;
}

/* ========================================================
   TOAST NOTIFICATION
   ======================================================== */
.toast-notice {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #0f1e36;
    color: #ffffff;
    border: 1px solid var(--theme-blue-neon);
    padding: 12px 20px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7), 0 0 12px var(--theme-blue-glow);
    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;
}

/* ========================================================
   INSTALL GUIDE MODAL (FALLBACK / MANUAL GUIDE)
   ======================================================== */
.guide-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.guide-modal.active {
    display: flex !important;
}

.guide-modal__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(4, 9, 20, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.guide-modal__card {
    position: relative;
    background: #0d1b32;
    border: 1.5px solid var(--theme-blue-neon);
    border-radius: 18px;
    padding: 24px 20px;
    width: 100%;
    max-width: 390px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9), 0 0 30px var(--theme-blue-glow);
    text-align: center;
    animation: modalPop 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalPop {
    0% { transform: scale(0.92); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.guide-modal__icon img {
    width: 68px;
    height: 68px;
    border-radius: 16px;
    margin-bottom: 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    border: 1.5px solid var(--theme-blue-neon);
}

.guide-modal__title {
    font-size: 19px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 8px;
}

.guide-modal__desc {
    font-size: 12px;
    color: var(--gp-text-sub);
    margin-bottom: 16px;
    line-height: 1.5;
}

.guide-modal__steps {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.guide-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #13243f;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--gp-border);
}

.step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--theme-blue-neon);
    color: #041226;
    font-weight: 800;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-text {
    font-size: 13px;
    color: #e2e8f0;
    line-height: 1.4;
}

.guide-modal__btn {
    width: 100%;
    height: 46px;
    background: linear-gradient(135deg, #0052cc 0%, #00c2ff 100%);
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 16px var(--theme-blue-glow);
    transition: all 0.2s ease;
}

.guide-modal__btn:hover {
    background: linear-gradient(135deg, #0066ee 0%, #33d1ff 100%);
}
