/* ============================
   RESET & BASE
   ============================ */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

:root {
	--bg: #000000;
	--bg-card: #1c1c1e;
	--bg-card2: #2c2c2e;
	--text-primary: #ffffff;
	--text-secondary: #c3c3c3;
	--text-tertiary: #636366;
	--accent: #007aff;
	--separator: #38383a;
	--font:
		-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text',
		'Helvetica Neue', sans-serif;
	--star-size: 16px;
	--star-color: #48484a;
	--star-filled: #ffcc00;
}

body {
	background: var(--bg);
	color: var(--text-primary);
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.4;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

/* Limit to phone width for demo */
body {
	margin: 0 auto;
	position: relative;
	min-height: 100vh;
	padding-bottom: 100px;
}

img {
	display: block;
	max-width: 100%;
}

a {
	color: var(--accent);
	text-decoration: none;
}

button {
	background: none;
	border: none;
	cursor: pointer;
	font-family: var(--font);
}

/* ============================
								 TOP NAV
								 ============================ */
.top-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 4px 16px 10px;
	position: sticky;
	top: 0px;
	z-index: 100;
	background: var(--bg);
}

.btn-back,
.btn-share {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #2c2c2e;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

/* ============================
								 PAGE CONTENT
								 ============================ */
.page-content {
	padding-bottom: 20px;
}

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

.app-icon-wrap {
	flex-shrink: 0;
	background: gray;
	border-radius: 25px;
	position: relative;
}

.app-icon-wrap::before {
	content: 'LOGO';
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	color: #ffffff;
	font-size: 20px;
}

.app-icon {
	width: 110px;
	height: 110px;
	border-radius: 26px;
	object-fit: cover;
	position: relative;
	z-index: 1;
}

.app-info {
	flex: 1;
	padding-top: 4px;
}

.app-title {
	font-size: 20px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.4px;
	margin-bottom: 4px;
}

.app-subtitle {
	font-size: 14px;
	color: var(--text-secondary);
	margin-bottom: 14px;
}

.app-action {
	display: flex;
	align-items: center;
	gap: 10px;
}

.btn-download {
	background: var(--accent);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	padding: 8px 16px;
	border-radius: 20px;
	letter-spacing: -0.1px;
}

.in-app-label {
	font-size: 10px;
	color: var(--text-secondary);
	line-height: 1.3;
}

/* ============================
								 STATS BAR
								 ============================ */
.stats-bar {
	display: flex;
	align-items: center;
	padding: 12px 16px;
	margin: 0 0 4px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.stats-bar::-webkit-scrollbar {
	display: none;
}

.stats-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	min-width: 80px;
	gap: 2px;
}

.stats-label {
	font-size: 9.5px;
	font-weight: 600;
	color: var(--text-secondary);
	letter-spacing: 0.2px;
	white-space: nowrap;
}

.stats-value {
	font-size: 20px;
	font-weight: 700;
	letter-spacing: -0.5px;
	line-height: 1.1;
}

.stats-sub {
	font-size: 11px;
	color: var(--text-secondary);
}

.stats-divider {
	width: 0.5px;
	height: 36px;
	background: var(--separator);
	margin: 0 10px;
	flex-shrink: 0;
}

.stars-box .stars {
	--star-size: 11px;
}

.stars {
	--percent: calc((var(--rating, 0) / 5) * 100%);
	display: inline-block;
	font-size: var(--star-size);
	font-family: Times, Georgia, serif;
	line-height: 1;
	width: max-content;
}

.stars::before {
	content: '★★★★★';
	letter-spacing: 0.05em;
	background: linear-gradient(
		90deg,
		var(--star-filled) var(--percent),
		var(--star-color) var(--percent)
	);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

/* .stars {
							display: flex;
							gap: 1px;
						} */

/* .star {
							font-size: 11px;
							color: var(--text-secondary);
						}
						
						.star.filled {
							color: var(--text-primary);
						}
						
						.star.half {
							position: relative;
							color: var(--text-secondary);
						}
						
						.star.half::before {
							content: '★';
							position: absolute;
							left: 0;
							color: var(--text-primary);
							width: 50%;
							overflow: hidden;
						} */

.dev-avatar img {
	width: 28px;
	height: 28px;
	border-radius: 6px;
	object-fit: cover;
}

/* ============================
								 SCREENSHOTS
								 ============================ */
.screenshots-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	padding: 16px 20px;
}

.empty-slide {
	background: gray;
	height: 150px;
	width: 100px;
	display: flex;
	justify-content: center;
	align-items: center;
	border-radius: 10px;
}

.screenshots-scroll::-webkit-scrollbar {
	display: none;
}

.screenshots-track {
	display: flex;
	gap: 10px;
	width: max-content;
	height: 450px;
}

.screenshot-item {
	flex-shrink: 0;
	width: max-content;
	display: flex;
	height: 100%;
	border-radius: 8px;
	overflow: hidden;
}

.screenshot-item img {
	width: auto;
	height: 100%;
	min-width: 100px;
}

/* ============================
								 DEVICE COMPAT
								 ============================ */
.device-compat {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 20px;
	padding-top: 0;
	border-bottom: 0.5px solid var(--separator);
}

.device-icons {
	display: flex;
	align-items: center;
	gap: 8px;
}

.device-label {
	font-size: 13px;
	color: var(--text-secondary);
	flex: 1;
}

.chevron-down {
	flex-shrink: 0;
}

/* ============================
								 SECTION SHARED
								 ============================ */
.section {
	padding: 16px 20px;
}

.section-title {
	font-size: 20px;
	font-weight: 700;
	letter-spacing: -0.4px;
	margin-bottom: 6px;
}

.section-divider {
	height: 1px;
	background: var(--separator);
	width: 90%;
	margin: 0 auto;
}

/* ============================
								 DESCRIPTION (сворачивание без JS)
								 ============================ */
.description-details {
	font-size: 14.5px;
	line-height: 1.5;
	color: var(--text-primary);
}

.description-summary {
	list-style: none;
	cursor: pointer;
	display: block;
}

.description-summary::-webkit-details-marker,
.description-summary::marker {
	display: none;
}

.description-text {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.description-details[open] .description-text {
	-webkit-line-clamp: unset;
	overflow: visible;
}

.description-toggle {
	color: var(--accent);
	font-size: 14.5px;
}

.description-toggle.open {
	display: flex;
}
.description-toggle.close {
	display: none;
}

.description-details[open] .description-toggle.open {
	display: none;
}
.description-details[open] .description-toggle.close {
	display: flex;
}

/* ============================
								 DEVELOPER
								 ============================ */
.developer-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.developer-name {
	font-size: 16px;
	color: var(--accent);
	font-weight: 400;
}

.developer-right {
	display: flex;
	align-items: center;
	gap: 8px;
}

.developer-label {
	font-size: 13px;
	color: var(--text-secondary);
}

/* ============================
								 EVENTS
								 ============================ */
.events-section {
	padding-bottom: 20px;
}

.section-badge {
	font-size: 11px;
	font-weight: 700;
	color: var(--accent);
	letter-spacing: 0.4px;
	margin-bottom: 10px;
}

.event-card {
	border-radius: 14px;
	overflow: hidden;
	position: relative;
	background: #1c1c1e;
}

.event-card::before {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 40%;
	width: 100%;
	background: linear-gradient(
		0deg,
		rgba(71, 71, 71, 1) 0%,
		rgba(71, 71, 71, 0.68) 60%,
		rgba(255, 255, 255, 0) 100%
	);
}

.event-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.event-info {
	padding: 12px 14px 14px;
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
}

.event-type {
	font-size: 10px;
	font-weight: 700;
	color: var(--text-secondary);
	letter-spacing: 0.3px;
	margin-bottom: 4px;
}

.event-title {
	font-size: 17px;
	font-weight: 700;
	margin-bottom: 2px;
}

.event-subtitle {
	font-size: 13px;
	color: var(--text-secondary);
}

.event-type,
.event-title,
.event-subtitle {
	position: relative;
	z-index: 1;
}

/* ============================
								 RATINGS
								 ============================ */
.ratings-header {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 14px;
}

.ratings-header .section-title {
	margin-bottom: 0;
}

.ratings-summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
}

.big-score {
	font-size: 72px;
	font-weight: 700;
	letter-spacing: -4px;
	line-height: 1;
}

.ratings-right {
	text-align: right;
}

.stars-large {
	display: flex;
	justify-content: flex-end;
	margin-bottom: 4px;
}

.stars-large .stars {
	--star-size: 22px;
}

.ratings-count {
	font-size: 13px;
	color: var(--text-secondary);
}

.ratings-sub {
	font-size: 15px;
	font-weight: 600;
	margin-bottom: 12px;
}

.reviews-list {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	min-width: 100%;
	max-width: 414px;
}

/* REVIEW CARD */
.review-card {
	background: var(--bg-card);
	border-radius: 14px;
	padding: 16px;
	min-width: 90%;
}

.review-header {
	margin-bottom: 8px;
}

.review-title {
	font-size: 15px;
	font-weight: 600;
	margin-bottom: 4px;
}

.review-meta {
	display: flex;
	align-items: center;
	gap: 8px;
}

.stars-small .stars {
	--star-size: 12px;
}

.review-date {
	font-size: 12px;
	color: var(--text-secondary);
}

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

/* ============================
								 ACHIEVEMENTS
								 ============================ */
.game-center-label {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 6px;
}

.game-center-label span {
	font-size: 13px;
	color: var(--text-secondary);
}

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

.achievements-card {
	background: var(--bg-card);
	border-radius: 14px;
	padding: 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 10px;
}

.achievement-item {
	display: flex;
	align-items: center;
	gap: 10px;
}

.achievement-icon {
	position: relative;
	width: 60px;
	height: 60px;
	background: var(--bg-card2);
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.achievement-lock {
	position: absolute;
	bottom: 4px;
	right: 4px;
}

.achievement-text {
	flex-direction: column;
}

.achievement-name {
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 2px;
}

.achievement-desc {
	font-size: 12px;
	color: var(--text-secondary);
}

.achievement-progress {
	text-align: right;
	flex-shrink: 0;
}

.progress-num {
	font-size: 38px;
	font-weight: 700;
	letter-spacing: -2px;
}

.progress-slash {
	font-size: 20px;
	color: var(--text-secondary);
	font-weight: 500;
}

.progress-label {
	font-size: 13px;
	color: var(--text-secondary);
	margin-top: 2px;
}

/* ============================
								 APPLE GAMES BANNER
								 ============================ */
.apple-games-banner {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 20px;
}

.apple-games-banner span {
	font-size: 14px;
	color: var(--accent);
	flex: 1;
}

/* ============================
								 WHAT'S NEW
								 ============================ */
.whatsnew-header {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 8px;
}

.whatsnew-header .section-title {
	margin-bottom: 0;
}

.whatsnew-meta {
	display: flex;
	justify-content: space-between;
	font-size: 13px;
	color: var(--text-secondary);
	margin-bottom: 10px;
}

.whatsnew-text {
	font-size: 14.5px;
	line-height: 1.5;
	color: var(--text-primary);
}

/* ============================
								 PRIVACY
								 ============================ */
.privacy-header {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 10px;
}

.privacy-header .section-title {
	margin-bottom: 0;
}

.privacy-desc {
	font-size: 14px;
	line-height: 1.5;
	color: var(--text-primary);
	margin-bottom: 16px;
}

.privacy-card {
	background: var(--bg-card);
	border-radius: 14px;
	padding: 20px 16px;
	text-align: center;
	margin-bottom: 14px;
}

.privacy-card-icon {
	display: flex;
	justify-content: center;
	margin-bottom: 10px;
}

.privacy-card-title {
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	margin-bottom: 8px;
}

.privacy-card-desc {
	font-size: 13px;
	color: var(--text-secondary);
	line-height: 1.4;
	margin-bottom: 16px;
}

.privacy-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px 10px;
	text-align: left;
}

.privacy-item {
	display: flex;
	align-items: flex-start;
	gap: 8px;
}

.privacy-item svg {
	flex-shrink: 0;
	margin-top: 1px;
}

.privacy-item span {
	font-size: 11px;
	line-height: 1.3;
}

.privacy-note {
	font-size: 13px;
	color: var(--text-secondary);
	line-height: 1.4;
	margin-top: 6px;
}

/* ============================
								 ACCESSIBILITY
								 ============================ */
.access-text {
	font-size: 14px;
	line-height: 1.5;
	color: var(--text-secondary);
}

/* ============================
								 INFORMATION
								 ============================ */
.info-list {
	margin-top: 8px;
}

.info-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 0;
}

.info-key {
	font-size: 15px;
	color: var(--text-primary);
	flex-shrink: 0;
	margin-right: 12px;
}

.info-val {
	font-size: 15px;
	color: var(--text-secondary);
	text-align: right;
}

.info-val-chevron {
	display: flex;
	align-items: center;
	gap: 6px;
}

.info-divider {
	height: 0.5px;
	background: var(--separator);
}

.info-link-row {
	padding: 13px 0;
}

.info-link {
	font-size: 15px;
	color: var(--accent);
}

/* ============================
								 BOTTOM SPACER
								 ============================ */
.bottom-spacer {
	height: 40px;
}

/* ============================
								 TAB BAR
								 ============================ */
.tab-bar {
	position: fixed;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 100%;
	background: rgba(28, 28, 30, 0.92);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border-top: 0.5px solid var(--separator);
	display: flex;
	align-items: center;
	justify-content: space-around;
	padding: 8px 0 28px;
	z-index: 200;
}

.tab-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3px;
	min-width: 60px;
}

.tab-item span {
	font-size: 10px;
	color: var(--text-secondary);
	font-weight: 500;
}

.tab-item.active span {
	color: var(--accent);
}

/* ============================
								 HOME INDICATOR
								 ============================ */
.home-indicator {
	position: fixed;
	bottom: 8px;
	left: 50%;
	transform: translateX(-50%);
	width: 134px;
	height: 5px;
	background: rgba(255, 255, 255, 0.35);
	border-radius: 3px;
	z-index: 300;
}

/* ============================
								 LINK
								 ============================ */
.link {
	color: var(--accent);
}

/* ============================
								 SCROLLBAR (global hide)
								 ============================ */
::-webkit-scrollbar {
	display: none;
}

* {
	scrollbar-width: none;
}
