/* APKLand — shared variables, layout, content typography, utilities */

:root {
	--primary: #2563eb;
	--primary-dark: #1d4ed8;
	--primary-light: #60a5fa;
	--primary-glow: rgba(37, 99, 235, 0.35);
	--primary-subtle: rgba(37, 99, 235, 0.1);
	--primary-rgb: 37, 99, 235;
	--apkland-radius: 8px;
	--apkland-font-body: system-ui, sans-serif;
	--apkland-font-heading: system-ui, sans-serif;
	--feat-bg: #fff;
	--feat-border: rgba(0, 0, 0, 0.1);
	--feat-text: #1a1a1a;
	--feat-subtext: #555;
}

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

body.apkland-theme {
	overflow-x: hidden;
}

body.apkland-theme img {
	max-width: 100%;
	height: auto;
}

.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	width: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	word-wrap: normal !important;
}

.skip-link:focus {
	clip: auto !important;
	clip-path: none;
	display: block;
	height: auto;
	width: auto;
	padding: 0.5rem 1rem;
	background: var(--primary);
	color: #fff;
	z-index: 100000;
}

/* --- Content area (all styles) --- */
.apkland-content-wrap {
	padding: 48px 0;
}

.apkland-content {
	font-family: var(--apkland-font-body);
	line-height: 1.65;
	font-size: clamp(1rem, 3.5vw, 1.125rem);
	max-width: 860px;
	margin: 0 auto;
	padding: 0 20px;
}

@media (min-width: 1024px) {
	.apkland-content {
		padding: 0 40px;
	}
}

.apkland-content p {
	margin: 0 0 1rem;
}

.apkland-content a {
	color: var(--primary);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.apkland-content strong {
	color: var(--primary);
	font-weight: 600;
}

.apkland-content ul {
	list-style: none;
	padding: 0;
	margin: 1rem 0 1.5rem;
}

.apkland-content ul li {
	position: relative;
	padding-left: 32px;
	margin-bottom: 10px;
	line-height: 1.6;
}

.apkland-content ul li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 4px;
	width: 20px;
	height: 20px;
	background-color: var(--primary);
	border-radius: 50%;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
	background-size: 12px;
	background-repeat: no-repeat;
	background-position: center;
}

.apkland-content ol {
	counter-reset: apkland-ol;
	list-style: none;
	padding-left: 0;
	margin: 1rem 0;
}

.apkland-content ol li {
	counter-increment: apkland-ol;
	position: relative;
	padding-left: 2.25rem;
	margin-bottom: 0.5rem;
}

.apkland-content ol li::before {
	content: counter(apkland-ol);
	position: absolute;
	left: 0;
	top: 0.1em;
	min-width: 1.5rem;
	height: 1.5rem;
	line-height: 1.5rem;
	text-align: center;
	font-size: 0.85rem;
	font-weight: 700;
	border-radius: 4px;
	background: var(--primary-subtle);
	color: var(--primary);
}

.apkland-content h3 {
	font-family: var(--apkland-font-heading);
	font-size: clamp(1.1rem, 3vw, 1.35rem);
	margin: 1.75rem 0 0.75rem;
}

/* Developer + typewriter + rating (heroes) */
.app-developer-line {
	font-size: 0.8rem;
	color: var(--primary);
	opacity: 0.85;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	width: 100%;
	gap: 5px;
	margin: 4px 0 0;
}

.app-developer-line svg {
	stroke: currentColor;
	flex-shrink: 0;
}

.app-developer-line strong {
	font-weight: 600;
}

.hero-typewriter-wrap {
	font-size: clamp(1rem, 3vw, 1.2rem);
	font-weight: 500;
	margin: 12px 0 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	flex-wrap: wrap;
	text-align: center;
	width: 100%;
}

.typewriter-rotating {
	color: var(--primary);
	font-weight: 700;
	border-right: 2px solid var(--primary);
	white-space: nowrap;
	overflow: hidden;
	display: inline-block;
	min-height: 1.2em;
	animation: blink-cursor 0.7s step-end infinite;
}

@keyframes blink-cursor {
	0%,
	100% {
		border-color: var(--primary);
	}
	50% {
		border-color: transparent;
	}
}

.hero-rating-row {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
	margin: 8px 0 12px;
	width: 100%;
}

.star-icons {
	display: inline-flex;
	gap: 2px;
	font-size: 1.15rem;
	line-height: 1;
}

.star-icon {
	position: relative;
	display: inline-block;
	width: 1em;
	color: #d1d5db;
}

.star-icon.star-full {
	color: #fbbf24;
}

.star-icon.star-half {
	color: #d1d5db;
}

.star-icon.star-half::after {
	content: '\2605';
	position: absolute;
	left: 0;
	top: 0;
	width: 50%;
	overflow: hidden;
	color: #fbbf24;
}

.rating-num {
	font-weight: 800;
	font-size: 1rem;
}

.rating-label {
	font-size: 0.85rem;
	opacity: 0.8;
}

.style-modern .star-icon.star-full,
.style-modern .star-icon.star-half::after {
	color: #fbbf24;
}

.style-modern .star-icon,
.style-modern .star-icon.star-half {
	color: rgba(255, 255, 255, 0.25);
}

.btn-hero-download {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.btn-hero-download svg {
	flex-shrink: 0;
}

/* Hero stats row — grid avoids overlap on narrow screens */
.app-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
	gap: 14px 12px;
	margin: 16px 0;
	background: var(--stats-bg, rgba(0, 0, 0, 0.08));
	border-radius: 14px;
	padding: 16px 14px;
}

.stat-item {
	min-width: 0;
	text-align: center;
	padding: 6px 4px;
}

.stat-value {
	display: block;
	font-size: clamp(0.85rem, 2vw, 1rem);
	font-weight: 700;
	color: var(--primary);
	line-height: 1.25;
	word-break: break-word;
}

.stat-label {
	display: block;
	font-size: 0.65rem;
	color: var(--stat-label-color, #888);
	margin-top: 4px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* ── Mobile: Replace Rating cell with No Ads ── */
@media (max-width: 767px) {
	.stat-item--rating .stat-value,
	.stat-item--rating .stat-label {
		display: none !important;
	}

	.stat-item--rating::after {
		content: "\1F6AB No Ads";
		display: block;
		font-size: 0.95rem;
		font-weight: 700;
		color: var(--primary, #e87c23);
		line-height: 1.2;
		text-align: center;
	}
}

.badge-updated-capsule {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 600;
	padding: 0.35rem 0.85rem;
	border-radius: 999px;
	background: var(--primary-subtle, rgba(0, 0, 0, 0.06));
	color: var(--primary-dark, var(--primary));
	border: 1px solid rgba(0, 0, 0, 0.08);
	line-height: 1.3;
}

/* Feature grid — reference cards */
.apkland-features.apkland-features-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 32px 24px;
	margin: 2rem 0;
}

.apkland-features-cols-1 {
	grid-template-columns: 1fr;
}

@media (max-width: 767px) {
	.apkland-features.apkland-features-grid {
		grid-template-columns: 1fr;
		gap: 40px 0;
	}
}

@media (min-width: 768px) and (max-width: 1023px) {
	.apkland-features-cols-2,
	.apkland-features-cols-3,
	.apkland-features-cols-4 {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.apkland-features-cols-3 {
		grid-template-columns: repeat(3, 1fr);
	}
	.apkland-features-cols-4 {
		grid-template-columns: repeat(4, 1fr);
	}
}

.apkland-feature-box {
	position: relative;
	background: var(--feat-bg, #fff);
	border: 1.5px solid var(--feat-border, rgba(0, 0, 0, 0.1));
	border-radius: 16px;
	padding: 52px 24px 28px;
	text-align: center;
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
	margin-top: 28px;
	touch-action: manipulation;
}

.apkland-feature-box:hover {
	transform: translateY(-5px);
	box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
	border-color: var(--primary);
}

.apkland-feature-icon {
	position: absolute;
	top: -28px;
	left: 50%;
	transform: translateX(-50%);
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid var(--primary);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--primary);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
	margin-bottom: 0;
}

.apkland-feature-icon svg {
	width: 26px;
	height: 26px;
	stroke: var(--primary);
}

.apkland-feature-title {
	font-size: 1rem;
	font-weight: 700;
	margin: 0 0 10px;
	color: var(--feat-text, #1a1a1a);
	font-family: var(--apkland-font-heading);
}

.apkland-feature-desc {
	font-size: 0.875rem;
	line-height: 1.65;
	color: var(--feat-subtext, #555);
	margin: 0;
	opacity: 1;
}

.style-modern .apkland-feature-box {
	--feat-bg: rgba(255, 255, 255, 0.05);
	--feat-border: rgba(255, 255, 255, 0.1);
	--feat-text: #fff;
	--feat-subtext: rgba(255, 255, 255, 0.65);
}

.style-modern .apkland-feature-icon {
	background: rgba(255, 255, 255, 0.08);
	border-color: var(--primary);
}

.style-glass .apkland-feature-box {
	--feat-bg: rgba(255, 255, 255, 0.06);
	--feat-border: rgba(255, 255, 255, 0.1);
	--feat-text: #fff;
	--feat-subtext: rgba(255, 255, 255, 0.6);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.style-glass .apkland-feature-icon {
	background: rgba(255, 255, 255, 0.08);
	border-color: var(--primary);
	box-shadow: 0 0 20px var(--primary-glow);
}

/* Download section */
.download-section-wrap {
	margin: 2rem 0;
	text-align: center;
}

.btn-main-download {
	min-height: 52px;
	min-width: 200px;
	padding: 0.85rem 1.5rem;
	font-size: 1rem;
	font-weight: 600;
	border: none;
	border-radius: var(--apkland-radius);
	cursor: pointer;
	touch-action: manipulation;
	font-family: inherit;
}

.countdown-wrap {
	flex-direction: column;
	align-items: center;
	gap: 1rem;
	padding: 1rem;
}

.countdown-ring {
	position: relative;
	width: 80px;
	height: 80px;
}

.countdown-ring svg {
	width: 80px;
	height: 80px;
	transform: rotate(-90deg);
}

.countdown-ring .ring-bg {
	fill: none;
	stroke: rgba(0, 0, 0, 0.08);
	stroke-width: 6;
}

.countdown-ring .ring-fill {
	fill: none;
	stroke: var(--primary);
	stroke-width: 6;
	stroke-linecap: round;
	transition: stroke-dashoffset 0.3s linear;
}

.countdown-num {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	font-size: 1.25rem;
}

.countdown-progress {
	width: 100%;
	max-width: 280px;
	height: 6px;
	background: rgba(0, 0, 0, 0.1);
	border-radius: 3px;
	overflow: hidden;
}

.countdown-bar {
	height: 100%;
	width: 0;
	background: var(--primary);
	border-radius: 3px;
	transition: width 0.3s linear;
}

/* Pros / cons */
.pros-cons-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	margin: 1.5rem 0;
}

@media (max-width: 600px) {
	.pros-cons-grid {
		grid-template-columns: 1fr;
	}
}

.pros-box,
.cons-box {
	border-radius: 14px;
	padding: 20px 22px;
}

.pros-box {
	background: rgba(22, 163, 74, 0.08);
	border: 1.5px solid rgba(22, 163, 74, 0.25);
}

.cons-box {
	background: rgba(220, 38, 38, 0.08);
	border: 1.5px solid rgba(220, 38, 38, 0.25);
}

.pros-box h3 {
	color: #16a34a;
	font-size: 1rem;
	margin: 0 0 12px;
}

.cons-box h3 {
	color: #dc2626;
	font-size: 1rem;
	margin: 0 0 12px;
}

.pros-box ul,
.cons-box ul {
	list-style: none;
	padding: 0;
	margin: 0.5rem 0 0;
}

.pros-box ul li,
.cons-box ul li {
	position: relative;
	padding-left: 28px;
	margin-bottom: 8px;
}

.pros-box ul li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 4px;
	width: 18px;
	height: 18px;
	background-color: #16a34a;
	border-radius: 50%;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
	background-size: 10px;
	background-repeat: no-repeat;
	background-position: center;
}

.cons-box ul li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 4px;
	width: 18px;
	height: 18px;
	background-color: #dc2626;
	border-radius: 50%;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E");
	background-size: 10px;
	background-repeat: no-repeat;
	background-position: center;
}

.style-modern .pros-box,
.style-glass .pros-box {
	background: rgba(22, 163, 74, 0.1);
}

.style-modern .cons-box,
.style-glass .cons-box {
	background: rgba(220, 38, 38, 0.1);
}

/* FAQ */
.faq-wrap {
	margin: 2rem 0;
	border-radius: var(--apkland-radius);
	overflow: hidden;
}

.faq-item {
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.faq-item:last-child {
	border-bottom: none;
}

.faq-question {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem 1.1rem;
	background: transparent;
	border: none;
	font: inherit;
	text-align: left;
	cursor: pointer;
	touch-action: manipulation;
	min-height: 48px;
}

.faq-icon {
	flex-shrink: 0;
	transition: transform 0.3s ease;
}

.faq-question[aria-expanded='true'] .faq-icon {
	transform: rotate(180deg);
}

.faq-answer {
	overflow: hidden;
	max-height: 0;
	transition: max-height 0.3s ease;
}

.faq-question[aria-expanded='true'] + .faq-answer,
.faq-answer:not([hidden]) {
	max-height: 500px;
}

.faq-answer p {
	margin: 0 1.1rem 1rem;
}

/* Ads */
.apkland-ad-wrap {
	margin: 1.5rem auto;
	text-align: center;
	max-width: 100%;
	overflow: hidden;
}

/* Scroll reveal — opacity stays 1 so blocks are never unreadable if IO/sync misses (anchors, restore, etc.). */
.apkland-reveal {
	opacity: 1;
	transform: translateY(20px);
	transition: transform 0.4s ease-out;
}

.apkland-reveal-visible,
.apkland-content h2.apkland-reveal-visible,
.apkland-content h3.apkland-reveal-visible {
	transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
	.apkland-reveal {
		transform: none;
		transition: none;
	}
}

/* Mobile audit */
@media (max-width: 767px) {
	.apkland-hero .hero-inner {
		flex-direction: column !important;
		padding: 24px 16px !important;
		gap: 24px !important;
	}

	.hero-info {
		width: 100% !important;
	}

	.btn-hero-download {
		width: 100% !important;
		justify-content: center !important;
	}

	.app-stats {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 12px 10px !important;
		padding: 14px 12px !important;
	}

	.glass-hero-card {
		padding: 32px 20px !important;
	}

	.apkland-features.apkland-features-grid {
		grid-template-columns: 1fr !important;
	}

	.pros-cons-grid {
		grid-template-columns: 1fr !important;
	}

	.faq-wrap {
		padding: 0 !important;
	}

	.modern-hero-visual {
		display: flex !important;
		flex-direction: column !important;
		align-items: center !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		transition-duration: 0.001ms !important;
	}
}
