@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap');

:root {
    --gp-primary: #01875f;
    --gp-text-main: #202124;
    --gp-text-sub: #5f6368;
    --gp-border: #e8eaed;
    --gp-bg: #ffffff;
    --gp-font: 'Google Sans', Roboto, Arial, sans-serif;
}

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

body {
    font-family: var(--gp-font);
    color: var(--gp-text-main);
    background-color: var(--gp-bg);
    line-height: 1.5;
    overflow-x: hidden;
}

/* ================= HEADER ================= */
.gp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 24px;
    border-bottom: 1px solid var(--gp-border);
    position: sticky;
    top: 0;
    background: var(--gp-bg);
    z-index: 100;
}

.gp-logo-section {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    text-decoration: none;
    color: var(--gp-text-sub);
    font-size: 22px;
    font-weight: 500;
}

.gp-logo-section img {
    height: 40px;
}

.gp-nav-tabs {
    display: flex;
    gap: 32px;
}

.gp-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gp-text-sub);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    padding: 12px 0;
    border-bottom: 3px solid transparent;
}

.gp-nav-item.active {
    color: var(--gp-primary);
    border-bottom-color: var(--gp-primary);
}

.gp-nav-item img {
    height: 24px;
}

.gp-nav-item.active img {
    filter: invert(29%) sepia(91%) saturate(1292%) hue-rotate(137deg) brightness(94%) contrast(101%);
}

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

.gp-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.gp-icon-btn:hover {
    background: rgba(0,0,0,0.04);
}

.gp-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #4285f4;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 16px;
}

/* ================= MAIN WRAPPER ================= */
.gp-main-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 24px;
}

/* ================= APP INFO SECTION ================= */
.gp-app-info {
    display: flex;
    flex-direction: column;
    margin-bottom: 32px;
}

.gp-app-header-top {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.gp-app-icon {
    width: 100px;
    height: 100px;
    border-radius: 20%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    object-fit: cover;
}

.gp-app-title-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.gp-app-title {
    font-size: 28px;
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 4px;
}

.gp-app-developer {
    color: var(--gp-primary);
    font-size: 16px;
    font-weight: 500;
}

.gp-play-protect {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--gp-text-sub);
    margin-top: 4px;
}

.gp-play-protect img {
    width: 12px;
    height: 12px;
}

.gp-app-meta-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 32px;
    margin: 24px 0;
}

.gp-meta-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.gp-meta-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -16px;
    top: 10%;
    height: 80%;
    width: 1px;
    background: var(--gp-border);
}

.gp-meta-value {
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.gp-meta-label {
    font-size: 12px;
    color: var(--gp-text-sub);
}

.gp-meta-icon {
    height: 16px;
}

.gp-install-section {
    margin-bottom: 24px;
}

.gp-btn-primary {
    background: var(--gp-primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 0;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.2s;
}

.gp-btn-primary:hover {
    background: #007652;
}

.gp-secondary-actions {
    display: flex;
    justify-content: center;
    gap: 32px;
}

.gp-action-text-btn {
    background: transparent;
    border: none;
    color: var(--gp-primary);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

/* ================= SCREENSHOTS ================= */
.gp-screenshots-gallery {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 16px;
    margin-bottom: 32px;
    scrollbar-width: thin;
}

.gp-screenshots-gallery::-webkit-scrollbar {
    height: 8px;
}
.gp-screenshots-gallery::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.gp-screenshot {
    height: 300px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* ================= SECTIONS ================= */
.gp-section-container {
    margin-bottom: 40px;
}

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

.gp-section-title {
    font-size: 20px;
    font-weight: 500;
}

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

.gp-tags {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.gp-tag {
    border: 1px solid var(--gp-border);
    border-radius: 16px;
    padding: 4px 16px;
    font-size: 13px;
    color: var(--gp-text-sub);
    font-weight: 500;
}

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

.gp-score-big {
    font-size: 64px;
    font-weight: 400;
    line-height: 1;
}

.gp-stars {
    display: flex;
    flex-direction: column;
}

.gp-star-row {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 12px;
    margin-bottom: 2px;
}

.gp-star-bar-bg {
    flex: 1;
    height: 10px;
    background: var(--gp-border);
    border-radius: 5px;
    min-width: 150px;
}

.gp-star-bar-fill {
    height: 100%;
    background: var(--gp-primary);
    border-radius: 5px;
}

.gp-review-card {
    margin-bottom: 24px;
}

.gp-review-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.gp-review-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.gp-review-author {
    font-weight: 500;
    font-size: 14px;
}

.gp-review-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gp-text-sub);
    font-size: 12px;
    margin-bottom: 8px;
}

.gp-review-content {
    font-size: 14px;
    color: var(--gp-text-sub);
    line-height: 1.5;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
    .gp-nav-tabs, .gp-actions {
        display: none;
    }
    .gp-main-wrapper {
        padding: 16px;
    }
    .gp-app-header-top {
        gap: 16px;
    }
    .gp-app-icon {
        width: 72px;
        height: 72px;
    }
    .gp-app-title {
        font-size: 24px;
    }
    .gp-app-meta-row {
        gap: 16px;
        justify-content: space-between;
    }
    .gp-meta-item:not(:last-child)::after {
        right: -8px;
    }
    .gp-secondary-actions {
        gap: 16px;
    }
}

/* ================= PWA PLAY ROOT (Do not touch) ================= */
#pwa-play-root {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: none;
    pointer-events: none;
}

#pwa-play-root.pwa-play-visible {
    display: block;
    pointer-events: auto;
}

#pwa-play-root .pwa-play-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
}

#pwa-play-root .pwa-play-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: #fff;
    font-family: system-ui, sans-serif;
    font-size: 15px;
    z-index: 2;
}

#pwa-play-root .pwa-play-spinner-img {
    display: block;
}

#pwa-play-root .pwa-play-topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: #202124;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 4;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#pwa-play-root .pwa-play-topbar-title {
    color: #fff;
    font-family: var(--gp-font);
    font-size: 16px;
    font-weight: 500;
}

#pwa-play-root .pwa-play-close {
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

#pwa-play-root .pwa-play-frame {
    position: absolute;
    top: 48px;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: calc(100% - 48px);
    border: 0;
    z-index: 1;
    background: #000;
}

#pwa-play-root .pwa-play-fallback {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    color: #8ab4f8;
    font-size: 14px;
}