:root {
  color-scheme: light;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --bg: #ffffff;
  --panel: #f3f7f5;
  --panel-soft: #e8f5e9;
  --text: #202124;
  --muted: #5f6368;
  --accent: #00875f;
  --accent-strong: #005a3e;
  --border: #e0e0e0;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.app-shell {
  width: min(100%, 480px); /* Mobile-first width */
  padding: 16px 16px 32px; /* Add bottom padding */
}

/* Top Bar */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.top-bar .crumb {
    font-size: 1.25rem; /* Google Play logo text */
    font-weight: 500;
    color: var(--text);
    letter-spacing: normal;
    text-transform: none;
}

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ghost-btn {
  background: transparent;
  border: none;
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.avatar-btn {
    background: var(--accent);
    color: white;
    font-weight: 700;
    font-size: 1rem;
}

/* Icons */
.icon-chevron::before { content: '←'; font-size: 1.5rem; }
.icon-search::before { content: '🔍'; font-size: 1.2rem; }
.icon-help::before { content: '?'; font-size: 1.2rem; border: 2px solid; border-radius: 50%; width: 24px; height: 24px; display: grid; place-items: center;}
.icon-share-alt::before { content: '⤿'; font-size: 1.5rem; color: var(--accent); transform: scaleX(-1);}
.icon-wishlist::before { content: '🔖'; font-size: 1.2rem; color: var(--accent);}
.icon-device::before { content: '📱'; font-size: 1rem;}
.icon-arrow-right::before { content: '→'; font-size: 1.5rem;}
.icon-arrow-down::before { content: '↓'; font-size: 1.5rem;}
.icon-flag::before { content: '⚑';}
.icon-globe::before { content: '🌐';}
.icon-info::before { content: 'ⓘ';}
.icon-more-dots::before { content: '…'; font-weight: 700; font-size: 1.5rem;}
.icon-device-phone::before { content: '📱'; }
.icon-device-chromebook::before { content: '💻'; }
.icon-device-tablet::before { content: '⚟'; }


/* Hero Section */
.hero {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
}

.app-cover.cs-logo {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  overflow: hidden;
  background: transparent;
}

.hero-copy h1 {
  margin: 0 0 4px;
  font-size: 1.5rem;
}

.developer-link {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.app-meta {
    font-size: 0.8rem;
    color: var(--muted);
    margin: 4px 0 0;
}

/* Stats Bar */
.stats-bar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 24px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-size: 0.8rem;
    color: var(--muted);
}

.stat-item strong {
    font-size: 1rem;
    color: var(--text);
    font-weight: 600;
}

.pegi-rating {
    border: 2px solid var(--text);
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}

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

/* Actions Section */
.actions-section {
    margin-bottom: 24px;
}

.primary-btn.hero-btn {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 14px 24px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 24px;
}

.secondary-actions {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 24px;
}

.link-btn {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
}

.device-compatibility {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

/* Screenshot Section */
.screenshot-section {
  margin-bottom: 24px;
}

.screenshot-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(150px, 1fr);
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
}

.screenshot-card {
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 9 / 16;
  border: 1px solid var(--border);
  scroll-snap-align: start;
}

/* General Section Styling */
section {
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

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

.section-header h2 {
    font-size: 1.2rem;
    margin: 0;
}

.arrow-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

/* What's New Section */
.whats-new-list {
    padding-left: 20px;
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.6;
}

/* Support Section */
.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.collapsible-content.expanded {
    max-height: 500px; /* Adjust as needed */
}

/* Similar Apps & More by Developer */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); /* Adjust min size */
    gap: 16px;
}

.app-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-size: 0.8rem;
}

.app-item img {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    margin-bottom: 8px;
    border: 1px solid var(--border);
}

.app-item span {
    color: var(--text);
}

.app-item small {
    color: var(--muted);
}

/* Report Flag Section */
.report-flag-section {
    padding: 24px 0;
}

/* Ratings Section */
.ratings-verified-text {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.device-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.device-filters .pill {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.device-filters .pill.active {
    background-color: var(--panel-soft);
    border-color: var(--panel-soft);
    color: var(--accent-strong);
}

.rating-summary-detailed {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 24px;
}

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

.rating-score-large p {
    font-size: 3.5rem;
    font-weight: 600;
    line-height: 1;
    margin: 0;
}

.stars-large {
    font-size: 1rem;
    color: var(--accent);
    letter-spacing: 1px;
    margin: 4px 0;
}

.rating-score-large span {
    font-size: 0.8rem;
    color: var(--muted);
}

.rating-bars-detailed {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 12px;
}

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

.star-label {
    width: 10px;
    text-align: right;
}

.bar-row .bar {
    flex: 1;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.bar-row .bar-fill {
    height: 100%;
    background: var(--accent);
}

/* Review Card */
.review-card {
    padding: 16px 0;
    border-top: 1px solid var(--border);
    margin-top: 24px;
}

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

.review-card .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e67e22;
    color: white;
    display: grid;
    place-items: center;
    font-weight: 500;
}

.review-card .more-btn {
    margin-left: auto;
    background: none; border: none; cursor: pointer;
}

.review-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 8px;
}

.review-meta .stars.small {
    font-size: 0.8rem;
    color: var(--accent);
    letter-spacing: 0.5px;
}

.review-footer {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 16px;
}

.review-footer .feedback-buttons {
    float: right;
}

.pill-btn {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 99px;
    padding: 6px 16px;
    margin-left: 8px;
    cursor: pointer;
}


/* Footer */
.app-footer {
    background: var(--panel);
    width: 100%;
    padding: 32px 16px;
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    flex-direction: column; /* Stack columns vertically on mobile */
    gap: 24px;
    margin-bottom: 24px;
}

.link-column h3 {
    font-size: 1rem;
    margin: 0 0 12px;
}

.link-column a {
    display: block;
    color: var(--muted);
    text-decoration: none;
    margin-bottom: 8px;
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    color: var(--muted);
}

.legal-links a {
    color: var(--muted);
    text-decoration: none;
    margin-right: 16px;
}

.region-info, .language-selector {
    margin-top: 16px;
}
