/* =========================================
   BASE & RESET
   ========================================= */
:root {
    --bg-dark: #f8fafc;
    --bg-panel: #ffffff;
    --panel-border: rgba(0, 0, 0, 0.06);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --primary-gold: #f59e0b;
    --primary-gold-dark: #d97706;
    --accent-green: #10b981;
    --accent-green-dark: #059669;
    --radius-lg: 20px;
    --radius-md: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Background Effects */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: drift 10s infinite alternate ease-in-out;
}

.glow-1 {
    width: 300px;
    height: 300px;
    background: rgba(251, 191, 36, 0.2);
    top: -100px;
    right: -100px;
}

.glow-2 {
    width: 400px;
    height: 400px;
    background: rgba(16, 185, 129, 0.15);
    bottom: 20%;
    left: -150px;
    animation-delay: -5s;
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 50px) scale(1.1); }
}

/* App Container */
.app-container {
    max-width: 600px; /* Mobile-first column approach */
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Elements */
.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
}

/* =========================================
   HEADER SECTION
   ========================================= */
.app-info {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.app-icon {
    width: 90px;
    height: 90px;
    background-image: url('logo.webp');
    background-size: cover;
    background-position: center;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--panel-border);
}

.app-titles h1 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.app-titles .developer {
    font-size: 1rem;
    color: var(--primary-gold);
    font-weight: 600;
    margin-bottom: 6px;
}

.verified-badge {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Stats */
.stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 0 10px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
}

.stat-value .star { font-size: 1rem; color: var(--text-muted); }

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
}

.age-rating {
    border: 1px solid var(--panel-border);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 1rem;
}

.stat-divider {
    width: 1px;
    height: 30px;
    background-color: var(--panel-border);
}

/* CTA */
.cta-container {
    text-align: center;
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-green), var(--accent-green-dark));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
    transition: all 0.3s ease;
    text-align: left;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.5);
    background: linear-gradient(135deg, #12d494, var(--accent-green-dark));
}

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

.pulse-anim {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
    70% { box-shadow: 0 0 0 15px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.btn-icon {
    font-size: 1.8rem;
}

.btn-text strong {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
}

.btn-text small {
    font-size: 0.85rem;
    opacity: 0.9;
    font-weight: 300;
}

.secure-notice {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 12px;
}

/* =========================================
   GALLERY SECTION
   ========================================= */
.gallery-section {
    width: 100%;
    overflow: hidden;
}

.gallery-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 20px; /* scrollbar space */
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Firefox */
}

.gallery-scroll::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.screenshot-card {
    min-width: 160px;
    height: 280px;
    border-radius: var(--radius-md);
    scroll-snap-align: center;
    display: flex;
    align-items: flex-end;
    padding: 16px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    position: relative;
    border: 1px solid var(--panel-border);
}

/* Custom Images */
.style-1 { background: url('convide.jpg') center/cover; }
.style-2 { background: url('granhe.png') center/cover; }
.style-3 { background: url('vip.png') center/cover; }

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

.card-content h3 {
    font-size: 1rem;
    color: white;
    font-weight: 800;
    text-transform: uppercase;
}

.card-content p {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.8);
    font-weight: 600;
}

/* =========================================
   TYPICAL SECTIONS (ABOUT, PRIVACY)
   ========================================= */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    cursor: pointer;
}

.section-header h2 {
    font-size: 1.3rem;
    font-weight: 600;
}

.section-header .arrow {
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.section-header:hover .arrow {
    transform: translateX(5px);
}

.description {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.6;
}

.update-info {
    margin-top: 24px;
}

.update-info .label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
}

.update-info .date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Privacy */
.privacy-list {
    list-style: none;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.privacy-list li {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.privacy-list .icon {
    font-size: 1.2rem;
}

.privacy-list p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* =========================================
   REVIEWS SECTION
   ========================================= */
.rating-overview {
    display: flex;
    gap: 24px;
    align-items: center;
    margin-bottom: 24px;
}

.rating-score {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.big-score {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
}

.stars {
    color: var(--accent-green);
    letter-spacing: 2px;
    margin-top: 4px;
}

.total-reviews {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.rating-bars {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.bar-track {
    flex: 1;
    height: 6px;
    background: var(--panel-border);
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--accent-green);
    border-radius: 4px;
}

/* Review Cards */
.review-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.review-card {
    padding-top: 16px;
    border-top: 1px solid var(--panel-border);
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.avatar {
    width: 36px;
    height: 36px;
    background: #4f46e5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.avatar-2 { background: #db2777; }

.name {
    font-weight: 600;
    font-size: 0.95rem;
}

.review-stars {
    color: var(--accent-green);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.review-date {
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 8px;
}

.review-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* =========================================
   SIMILAR GAMES SECTION
   ========================================= */
.similar-games-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 10px;
    margin-bottom: 24px;
}

.similar-game-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.sg-icon {
    width: 55px;
    height: 55px;
    border-radius: 12px;
    background-color: var(--panel-border);
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* Actual and Fallback gradient colors for the icons until real images are provided */
.sg-icon-1 { background: url('https://play-lh.googleusercontent.com/yZ_nzWpg_cj6GYJv15YdsfWBKS6JzXGt69R8fCCj3AsapCSs5MGdr6haxPCk-Ae91g=s64-rw') center/cover; }
.sg-icon-2 { background: url('https://play-lh.googleusercontent.com/vHA867MF5a-0zJfHgxgKUKs4GJb8mWMLNjGpTpufUpw1IN_EuqWGY9d-qrY4keq4hw8=s64-rw') center/cover; }
.sg-icon-3 { background: url('https://play-lh.googleusercontent.com/Bi-dBVeyh-XZZ8ypCuklaHct8ClSitAAEOy3rCS3KOE50GBVsZ4ucseDKrLZExrAkfY=s64-rw') center/cover; }
.sg-icon-4 { background: url('https://play-lh.googleusercontent.com/3C9ipO88Z92NJuohq_u6Ce6sTKHAADCfrpyVaEWz3vDO4XBscTJwAiRM9WhzS__WOybZ=s64-rw') center/cover; }
.sg-icon-5 { background: url('https://play-lh.googleusercontent.com/ESO0hEf9irZ4_SDA9KruU4irxTkjSyRCeUhWEPOROs1x2TlMqOrqB4i34M-ZPIE5XQ7W=s64-rw') center/cover; }
.sg-icon-6 { background: url('https://play-lh.googleusercontent.com/CSkRZuIZLOJZ8q0krA3qvnciiRTXZBU5Nx6nmTXM31ZUEilUf6Plz_va-IV_-pjWDgE=s64-rw') center/cover; }

.sg-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sg-info h4 {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-main);
}

.sg-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.sg-rating {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.flag-inappropriate {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #475569;
    font-size: 0.95rem;
    padding-top: 24px;
    border-top: 1px solid var(--panel-border);
    cursor: pointer;
}

.flag-icon {
    width: 18px;
    height: 18px;
}

/* =========================================
   FOOTER
   ========================================= */
footer {
    text-align: center;
    padding: 30px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-links {
    margin-top: 12px;
    display: flex;
    justify-content: center;
    gap: 16px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text-main);
}

/* =========================================
   ANIMATIONS
   ========================================= */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* =========================================
   BOTTOM NAVIGATION
   ========================================= */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    border-top: 1px solid var(--panel-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 0;
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

@media (min-width: 600px) {
    .bottom-nav {
        max-width: 600px;
        left: 50%;
        transform: translateX(-50%);
        border-left: 1px solid var(--panel-border);
        border-right: 1px solid var(--panel-border);
    }
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    transition: color 0.2s;
    flex: 1;
}

.nav-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
}

/* Specific styling for the active "Apps" state */
.nav-item.active {
    color: #01875f; /* Specific brand green from the store */
}
