/* Rummy Diwa Game — mobile-first theme */

:root {
	--ink: #1c2636;
	--muted: #667181;
	--header: #20233c;
	--hero: #242450;
	--page: #eef0fa;
	--accent: #2f9e6e;
	--accent-dark: #238559;
	--card: #fff;
	--warn: #f4b23f;
	--line: rgba(28, 38, 54, 0.12);
	--shadow: 0 12px 40px rgba(32, 35, 60, 0.08);
	--radius: 16px;
	--radius-sm: 10px;
	--wrap: min(1120px, calc(100% - 2rem));
	--font: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: var(--font);
	font-size: 1rem;
	line-height: 1.55;
	color: var(--ink);
	background: var(--page);
	-webkit-font-smoothing: antialiased;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--accent-dark);
	text-decoration-thickness: 1px;
}

a:hover {
	text-decoration: underline;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 1000;
	background: var(--card);
	padding: 0.5rem 1rem;
}

.skip-link:focus {
	left: 1rem;
	top: 1rem;
}

.wrap {
	width: var(--wrap);
	margin-inline: auto;
}

.eyebrow {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--muted);
	margin: 0 0 0.5rem;
}

.muted {
	color: var(--muted);
}

.panel {
	background: var(--card);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 1.25rem;
	border: 1px solid var(--line);
}

.prose h2,
.prose h3 {
	margin-top: 1.25rem;
}

/* Buttons */
.button,
button.button {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.65rem 1.15rem;
	border-radius: 999px;
	border: none;
	background: var(--accent);
	color: #fff;
	font-weight: 600;
	font-size: 0.95rem;
	cursor: pointer;
	text-decoration: none;
	transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
	box-shadow: 0 4px 14px rgba(47, 158, 110, 0.35);
}

.button:hover {
	background: var(--accent-dark);
	text-decoration: none;
	transform: translateY(-1px);
}

.button.secondary {
	background: transparent;
	color: var(--ink);
	border: 1px solid var(--line);
	box-shadow: none;
}

.button.small {
	font-size: 0.85rem;
	padding: 0.5rem 0.9rem;
}

.button svg {
	width: 1.1em;
	height: 1.1em;
}

.text-link {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-weight: 600;
}

/* Header */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--header);
	color: #fff;
	box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.header-inner {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 0.75rem 0;
	flex-wrap: wrap;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 0.65rem;
	color: inherit;
	text-decoration: none;
	font-weight: 700;
	line-height: 1.2;
}

.brand small {
	display: block;
	font-size: 0.65rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	opacity: 0.75;
}

.brand-mark svg {
	width: 2.25rem;
	height: 2.25rem;
	color: var(--warn);
}

.menu-toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin-left: auto;
	padding: 0.45rem 0.75rem;
	border-radius: var(--radius-sm);
	border: 1px solid rgba(255, 255, 255, 0.25);
	background: rgba(255, 255, 255, 0.06);
	color: #fff;
	cursor: pointer;
	font-weight: 600;
}

.primary-nav {
	display: none;
	width: 100%;
	order: 4;
}

.site-header.nav-open .primary-nav {
	display: block;
}

.nav-links {
	list-style: none;
	margin: 0;
	padding: 0.5rem 0 0;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.nav-links a {
	display: block;
	padding: 0.55rem 0.25rem;
	color: rgba(255, 255, 255, 0.92);
	text-decoration: none;
	border-radius: 6px;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
	background: rgba(255, 255, 255, 0.1);
	text-decoration: none;
}

.header-action {
	display: none;
	align-items: center;
	gap: 0.4rem;
	padding: 0.55rem 1rem;
	border-radius: 999px;
	background: var(--accent);
	color: #fff;
	font-weight: 600;
	text-decoration: none;
	font-size: 0.9rem;
}

.header-action svg {
	width: 1em;
	height: 1em;
}

/* Hero */
.hero {
	display: grid;
	gap: 1.5rem;
	margin: 1.25rem 0 0;
	padding: 1.5rem;
	border-radius: calc(var(--radius) + 4px);
	background: linear-gradient(145deg, var(--hero) 0%, #2e2d6b 55%, #1a3f4a 100%);
	color: #fff;
	animation: fadeUp 0.6s ease both;
}

.hero h1 {
	margin: 0 0 0.75rem;
	font-size: clamp(1.85rem, 5vw, 2.65rem);
	line-height: 1.15;
}

.hero h1 em {
	font-style: normal;
	color: #a8f0c8;
}

.hero-copy > p {
	color: rgba(255, 255, 255, 0.88);
	max-width: 38ch;
}

.live-dot {
	display: inline-block;
	width: 0.45rem;
	height: 0.45rem;
	border-radius: 50%;
	background: #5dffb0;
	box-shadow: 0 0 0 4px rgba(93, 255, 176, 0.25);
	vertical-align: middle;
	margin-right: 0.35rem;
}

.game-search {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	margin: 1rem 0;
	padding: 0.5rem;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.18);
}

.game-search svg {
	width: 1.25rem;
	height: 1.25rem;
	margin-left: 0.5rem;
	flex-shrink: 0;
	opacity: 0.85;
}

.game-search input[type="search"] {
	flex: 1;
	min-width: 120px;
	border: none;
	background: transparent;
	color: #fff;
	font-size: 1rem;
	padding: 0.5rem;
	outline: none;
}

.game-search input::placeholder {
	color: rgba(255, 255, 255, 0.55);
}

.hero-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1rem;
	font-size: 0.9rem;
}

.hero-links a {
	color: #c8fff0;
	font-weight: 600;
	text-decoration: none;
}

.hero-links a:hover {
	text-decoration: underline;
}

.hero-art {
	text-align: center;
}

.hero-art img {
	margin-inline: auto;
	max-width: 280px;
	animation: fadeUp 0.7s ease 0.1s both;
}

.art-caption {
	display: block;
	margin-top: 0.75rem;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	opacity: 0.75;
}

.trust-strip {
	display: grid;
	gap: 0.75rem;
	margin: 1rem 0 2rem;
}

.trust-strip > span {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	padding: 0.85rem 1rem;
	background: var(--card);
	border-radius: var(--radius-sm);
	border: 1px solid var(--line);
	box-shadow: var(--shadow);
}

.trust-strip svg {
	width: 1rem;
	height: 1rem;
	color: var(--accent);
	margin-bottom: 0.25rem;
}

.trust-strip strong {
	font-size: 0.95rem;
}

.trust-strip small {
	color: var(--muted);
	font-size: 0.82rem;
}

@keyframes fadeUp {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Collection */
.collection {
	margin: 2rem auto 2.5rem;
}

.collection-layout {
	display: grid;
	gap: 1.5rem;
}

.collection-sidebar h2,
.collection-sidebar h3 {
	margin: 0 0 0.65rem;
	font-size: 1rem;
}

.filter-list {
	list-style: none;
	margin: 0 0 1.25rem;
	padding: 0;
}

.filter-list a {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.55rem 0.85rem;
	border-radius: 12px;
	color: #1a2740;
	text-decoration: none;
	font-weight: 600;
	font-size: 0.98rem;
	line-height: 1.35;
}

.editorial-filters a {
	margin-bottom: 0.15rem;
}

.filter-list a:hover {
	background: rgba(47, 158, 110, 0.08);
	color: var(--accent-dark);
}

.filter-list a.is-active {
	background: #d8f0e4;
	color: #1f7a55;
	font-weight: 700;
}

.filter-list .count {
	font-size: 0.8rem;
	color: var(--muted);
	background: var(--page);
	padding: 0.1rem 0.45rem;
	border-radius: 999px;
}

.catalog-intro {
	padding: 1.25rem 0 0.25rem;
}

.catalog-intro h1 {
	margin: 0.35rem 0 0.65rem;
	font-size: clamp(1.6rem, 4vw, 2.2rem);
}

.catalog-lead {
	color: var(--muted);
	max-width: 42rem;
	margin: 0 0 1rem;
}

.catalog-search {
	margin-bottom: 0.5rem;
}

.collection-note {
	margin: 0.35rem 0 0;
	font-size: 0.92rem;
}

.collection-header-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.65rem;
}

.collection-header {
	display: block;
	margin-bottom: 1rem;
}

.collection-header h2 {
	margin: 0;
	font-size: 1.35rem;
}

.count-badge {
	font-size: 0.8rem;
	font-weight: 700;
	padding: 0.25rem 0.65rem;
	border-radius: 999px;
	background: var(--page);
	color: var(--muted);
}

.game-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
}

.game-card {
	background: var(--card);
	border-radius: var(--radius);
	border: 1px solid var(--line);
	box-shadow: var(--shadow);
	padding: 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.game-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 16px 48px rgba(32, 35, 60, 0.12);
}

.card-top {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.card-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
}

.app-badge {
	font-size: 0.68rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	padding: 0.2rem 0.5rem;
	border-radius: 6px;
	background: var(--page);
	color: var(--muted);
}

.badge-category.badge-rummy,
.badge-rummy {
	background: rgba(47, 158, 110, 0.15);
	color: #1d7a52;
}

.badge-category.badge-diwa-game,
.badge-diwa-game {
	background: rgba(36, 99, 180, 0.14);
	color: #1d4f9c;
}

.badge-category.badge-yono-games,
.badge-yono-games {
	background: rgba(168, 85, 247, 0.14);
	color: #7c3aed;
}

.badge-category.badge-teen-patti,
.badge-teen-patti {
	background: rgba(220, 70, 70, 0.14);
	color: #b42318;
}

.badge-featured {
	background: rgba(120, 87, 255, 0.15);
	color: #5b3fd4;
}

.badge-latest {
	background: rgba(52, 128, 255, 0.15);
	color: #2563c9;
}

.badge-popular {
	background: rgba(244, 178, 63, 0.2);
	color: #b06d00;
}

.game-icon,
.placeholder-icon {
	width: 88px;
	height: 88px;
	border-radius: 18px;
	object-fit: cover;
	border: 1px solid var(--line);
}

.placeholder-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--page);
	color: var(--muted);
}

.placeholder-icon svg {
	width: 48px;
	height: 48px;
}

.game-card h3 {
	margin: 0;
	font-size: 1.05rem;
}

.game-card h3 a {
	color: var(--ink);
	text-decoration: none;
}

.game-card h3 a:hover {
	color: var(--accent-dark);
}

.card-offer strong {
	display: block;
	font-size: 0.9rem;
}

.card-offer span {
	font-size: 0.82rem;
	color: var(--muted);
}

.card-platform {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	margin: 0;
	font-size: 0.85rem;
	color: var(--muted);
}

.card-platform svg {
	width: 1rem;
	height: 1rem;
}

.card-actions {
	margin-top: auto;
}

/* Important */
.important {
	margin: 2rem auto;
	border-left: 4px solid var(--warn);
}

.important-lead {
	color: var(--ink);
}

/* Adult notice */
.adult-notice {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 0.75rem;
	margin: 1.5rem auto;
	max-width: var(--wrap);
	padding: 1rem 1.25rem;
	background: rgba(244, 178, 63, 0.15);
	border: 1px solid rgba(244, 178, 63, 0.4);
	border-radius: var(--radius-sm);
}

.adult-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	padding: 0.35rem 0.5rem;
	border-radius: 8px;
	background: var(--warn);
	font-weight: 800;
	font-size: 0.85rem;
}

.adult-notice p {
	margin: 0;
	flex: 1;
	font-size: 0.9rem;
}

/* How */
.how-section {
	margin: 2rem auto;
}

.how-section h2,
.how-section h3 {
	margin-top: 0;
}

.how-steps {
	list-style: none;
	margin: 1rem 0 0;
	padding: 0;
	display: grid;
	gap: 1rem;
}

.how-steps li {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
	padding: 1rem;
	background: var(--card);
	border-radius: var(--radius-sm);
	border: 1px solid var(--line);
}

.step-num {
	font-size: 1.25rem;
	font-weight: 800;
	color: var(--accent);
	min-width: 2.5rem;
}

.how-compact {
	margin-top: 1.25rem;
	padding-top: 1rem;
	border-top: 1px solid var(--line);
}

.how-compact .how-steps {
	grid-template-columns: 1fr;
}

/* Editorial */
.editorial-banner {
	margin: 2rem auto;
	display: grid;
	gap: 1rem;
}

.editorial-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
}

/* FAQ */
.faq-section {
	margin: 2rem auto 3rem;
}

.faq-item {
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	margin-bottom: 0.5rem;
	background: var(--page);
}

.faq-item summary {
	list-style: none;
	cursor: pointer;
	padding: 0.85rem 1rem;
	font-weight: 600;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.5rem;
}

.faq-item summary::-webkit-details-marker {
	display: none;
}

.faq-answer,
.faq-item > p {
	padding: 0 1rem 1rem;
	margin: 0;
	color: var(--muted);
	font-size: 0.95rem;
}

/* Footer */
.site-footer {
	background: var(--header);
	color: rgba(255, 255, 255, 0.9);
	margin-top: 2rem;
	padding: 2.5rem 0 1.5rem;
}

.footer-grid {
	display: grid;
	gap: 2rem;
	margin-bottom: 2rem;
}

.site-footer .brand {
	margin-bottom: 0.75rem;
}

.site-footer h2 {
	font-size: 1rem;
	margin: 0 0 0.75rem;
}

.site-footer .nav-links a {
	color: rgba(255, 255, 255, 0.85);
	padding: 0.25rem 0;
}

.footer-bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 1rem;
	padding-top: 1.25rem;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	font-size: 0.85rem;
}

.footer-bottom a {
	color: rgba(255, 255, 255, 0.8);
	margin-left: 1rem;
}

.policy-link {
	color: var(--warn) !important;
	font-weight: 600;
}

.friend-links {
	background: rgba(0, 0, 0, 0.2);
	padding: 1rem 0;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.friend-links ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.25rem;
}

.friend-links a {
	color: rgba(255, 255, 255, 0.7);
	font-size: 0.82rem;
	text-decoration: none;
}

.friend-links a:hover {
	color: #fff;
	text-decoration: underline;
}

/* Pagination */
.pagination ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	list-style: none;
	margin: 1.5rem 0 0;
	padding: 0;
}

.pagination a,
.pagination span {
	display: inline-block;
	padding: 0.4rem 0.75rem;
	border-radius: 8px;
	border: 1px solid var(--line);
	background: var(--card);
	text-decoration: none;
	color: var(--ink);
}

.pagination .current {
	background: var(--accent);
	color: #fff;
	border-color: var(--accent);
}

/* Detail page */
.detail-page {
	padding: 1.25rem 0 3rem;
}

.breadcrumb ol {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	list-style: none;
	margin: 0 0 1rem;
	padding: 0;
	font-size: 0.85rem;
	color: var(--muted);
}

.breadcrumb li + li::before {
	content: "›";
	margin-right: 0.35rem;
	opacity: 0.5;
}

.detail-layout {
	display: grid;
	gap: 1.5rem;
}

.app-heading {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: flex-start;
}

.app-heading .game-icon {
	width: 96px;
	height: 96px;
}

.app-labels {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin-bottom: 0.5rem;
}

.genre-tag {
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--muted);
}

.app-rating {
	color: var(--muted);
	font-size: 0.9rem;
	margin: 0;
	line-height: 1.35;
}

.game-card .card-rating {
	font-size: 0.82rem;
	margin-top: -0.15rem;
}

.game-card .card-rating span {
	color: var(--muted);
}

.recorded-terms {
	padding: 0.75rem;
	border-radius: var(--radius-sm);
	background: var(--page);
	margin: 0.75rem 0;
}

.notice {
	padding: 0.75rem;
	border-radius: var(--radius-sm);
	background: rgba(244, 178, 63, 0.12);
	border: 1px solid rgba(244, 178, 63, 0.35);
}

.overview-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
	margin-top: 1rem;
}

.app-section-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 1rem 0;
	padding: 0.5rem;
	background: var(--card);
	border-radius: var(--radius-sm);
	border: 1px solid var(--line);
	position: sticky;
	top: 4.5rem;
	z-index: 10;
}

.app-section-nav a {
	font-size: 0.82rem;
	font-weight: 600;
	padding: 0.35rem 0.65rem;
	border-radius: 999px;
	background: var(--page);
	text-decoration: none;
	color: var(--ink);
}

.app-facts {
	display: grid;
	gap: 0.75rem;
}

.app-facts > div {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0.15rem;
	padding-bottom: 0.65rem;
	border-bottom: 1px solid var(--line);
}

.app-facts dt {
	font-size: 0.78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--muted);
}

.app-facts dd {
	margin: 0;
	font-weight: 500;
}

.download-panel .app-download-button[disabled] {
	opacity: 0.65;
	cursor: not-allowed;
}

.detail-sidebar .recommendations {
	margin-bottom: 1rem;
}

.recommendation {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	padding: 0.65rem 0;
	border-bottom: 1px solid var(--line);
	text-decoration: none;
	color: inherit;
}

.recommendation:hover {
	background: var(--page);
	text-decoration: none;
}

.recommendation .game-icon {
	width: 48px;
	height: 48px;
	border-radius: 12px;
}

.recommendation strong {
	display: block;
	font-size: 0.9rem;
}

.recommendation small {
	color: var(--muted);
	font-size: 0.78rem;
}

.recommendation svg {
	margin-left: auto;
	width: 1rem;
	height: 1rem;
	color: var(--accent);
}

.sidebar-note {
	text-align: center;
	padding: 1.25rem;
	background: linear-gradient(160deg, var(--hero), #1d3f55);
	color: #fff;
	border-radius: var(--radius);
}

.sidebar-note a {
	color: #a8f0c8;
	font-weight: 700;
}

.not-found-page {
	padding: 2rem 0 4rem;
}

.not-found-page h1 {
	margin-top: 0;
}

/* 768px */
@media (min-width: 768px) {
	.game-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.trust-strip {
		grid-template-columns: repeat(3, 1fr);
	}

	.collection-layout {
		grid-template-columns: 220px 1fr;
		align-items: start;
	}

	.app-facts {
		grid-template-columns: repeat(2, 1fr);
	}

	.footer-grid {
		grid-template-columns: repeat(3, 1fr);
	}

	.detail-layout {
		grid-template-columns: minmax(0, 1fr) 300px;
		align-items: start;
	}

	.how-steps {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* 1100px */
@media (min-width: 1100px) {
	.menu-toggle {
		display: none;
	}

	.primary-nav {
		display: block !important;
		width: auto;
		order: 0;
		flex: 1;
	}

	.nav-links {
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: center;
		padding: 0;
		gap: 0.15rem 0.5rem;
	}

	.header-action {
		display: inline-flex;
		margin-left: auto;
	}

	.header-inner {
		flex-wrap: nowrap;
	}

	.hero {
		grid-template-columns: 1.05fr 0.95fr;
		align-items: center;
		padding: 2.25rem 2.5rem;
	}

	.hero-art img {
		max-width: 100%;
	}

	.game-grid {
		grid-template-columns: repeat(3, 1fr);
	}

	.editorial-banner {
		grid-template-columns: 1fr auto;
		align-items: center;
	}
}