:root {
	--turquoise: #367A9B;
	--midnight: #404D5A;
	--midnight-dark: #2E3841;
	--emerald: #4EBA89;
	--emerald-bright: #2ED685;
	--sunflower: #C7AA38;
	--alizarin: #D67B6E;
	--white: #F0F3F3;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	padding: 0;
	font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	background: var(--white);
	color: var(--midnight-dark);
}

a { text-decoration: none; }

.nav {
	background: var(--midnight);
	position: sticky;
	top: 0;
	z-index: 10;
}

.nav-inner {
	max-width: 1000px;
	margin: 0 auto;
	padding: 16px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.brand {
	color: var(--emerald-bright);
	font-size: 24px;
	font-weight: 800;
	letter-spacing: 2px;
}

.nav-links {
	display: flex;
	align-items: center;
	gap: 20px;
}

.nav-links a {
	color: var(--white);
	font-size: 15px;
	font-weight: 600;
}

.nav-cta {
	background: var(--sunflower);
	color: var(--midnight-dark) !important;
	padding: 8px 16px;
	border-radius: 8px;
}

.btn {
	display: inline-block;
	padding: 14px 28px;
	border-radius: 12px;
	font-size: 17px;
	font-weight: 700;
	cursor: pointer;
	border: none;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.btn-primary {
	background: var(--sunflower);
	color: var(--midnight-dark);
}

.btn-secondary {
	background: transparent;
	color: var(--white);
	border: 2px solid var(--white);
}

.btn-secondary-inline {
	display: inline-block;
	margin-top: 12px;
	color: var(--turquoise);
	font-weight: 700;
	font-size: 14px;
}

.how-to-play {
	max-width: 1000px;
	margin: 0 auto;
	padding: 8px 24px 64px;
	text-align: center;
}

.how-to-play h2 {
	color: var(--midnight-dark);
	font-size: 28px;
	margin: 0 0 32px;
}

.rules-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 24px;
	margin-bottom: 32px;
}

.rule-card {
	background: white;
	border-radius: 14px;
	padding: 24px 20px;
	text-align: left;
	box-shadow: 0 4px 16px rgba(64,77,90,0.1);
	position: relative;
}

.rule-number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--turquoise);
	color: white;
	font-weight: 800;
	font-size: 14px;
	margin-bottom: 12px;
}

.rule-card h3 {
	margin: 0 0 8px;
	color: var(--midnight-dark);
	font-size: 17px;
}

.rule-card p {
	margin: 0;
	color: var(--midnight);
	line-height: 1.5;
	font-size: 14px;
}

.rule-card strong {
	color: var(--turquoise);
}

.features {
	max-width: 1000px;
	margin: 0 auto;
	padding: 64px 24px;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 32px;
}

.feature h3 {
	color: var(--turquoise);
	font-size: 20px;
	margin: 0 0 12px;
}

.feature p {
	margin: 0;
	line-height: 1.5;
	color: var(--midnight-dark);
}

.cta {
	background: var(--emerald);
	text-align: center;
	padding: 56px 24px;
}

.cta h2 {
	color: var(--white);
	margin: 0 0 24px;
	font-size: 28px;
}

.footer {
	text-align: center;
	padding: 24px;
	color: var(--midnight);
	font-size: 14px;
}

/* --- Purchase page --- */

.purchase-main {
	max-width: 1000px;
	margin: 0 auto;
	padding: 48px 24px 80px;
}

.purchase-grid {
	display: grid;
	grid-template-columns: minmax(260px, 380px) 1fr;
	gap: 32px;
	align-items: start;
}

@media (max-width: 760px) {
	.purchase-grid {
		grid-template-columns: 1fr;
	}
}

.product-card {
	background: white;
	border-radius: 16px;
	padding: 32px 28px;
	text-align: center;
	box-shadow: 0 4px 20px rgba(64,77,90,0.12);
	position: sticky;
	top: 88px;
}

@media (max-width: 760px) {
	.product-card { position: static; }
}

.product-cards {
	position: relative;
	height: 150px;
	margin-bottom: 24px;
}

.product-card-img {
	position: absolute;
	top: 0;
	width: 96px;
	border-radius: 10px;
	box-shadow: 0 8px 18px rgba(0,0,0,0.3);
	border: 2px solid white;
}

.product-card-img.p1 { left: calc(50% - 110px); top: 10px; transform: rotate(-13deg); }
.product-card-img.p2 { left: calc(50% - 48px); top: 0; transform: rotate(2deg); z-index: 1; }
.product-card-img.p3 { left: calc(50% + 20px); top: 12px; transform: rotate(15deg); }

.product-card h2 {
	margin: 0 0 8px;
	color: var(--midnight-dark);
	font-size: 22px;
}

.product-desc {
	margin: 0 0 20px;
	color: var(--midnight);
	line-height: 1.5;
	font-size: 14px;
}

.price-box {
	border-top: 1px solid #e6e9eb;
	padding-top: 18px;
}

.price-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	flex-wrap: wrap;
}

.promo-badge {
	display: inline-block;
	background: var(--alizarin);
	color: white;
	font-size: 13px;
	font-weight: 700;
	padding: 4px 12px;
	border-radius: 999px;
}

.price {
	font-size: 32px;
	font-weight: 800;
	color: var(--emerald);
	margin: 0;
}

.price .old-price {
	font-size: 17px;
	font-weight: 600;
	color: var(--midnight);
	text-decoration: line-through;
	margin-right: 10px;
	display: inline-block;
}

.stock-bar-wrap {
	margin-top: 18px;
}

.stock-bar-track {
	position: relative;
	width: 100%;
	height: 26px;
	border-radius: 8px;
	background:
		repeating-linear-gradient(135deg, rgba(64,77,90,0.06) 0 6px, transparent 6px 12px),
		#e9edee;
	border: 2px solid var(--midnight-dark);
	overflow: hidden;
	box-shadow: inset 0 2px 4px rgba(0,0,0,0.15);
}

.stock-bar-fill {
	height: 100%;
	background: linear-gradient(180deg, var(--emerald-bright) 0%, var(--emerald) 100%);
	width: 0%;
	transition: width 0.5s ease;
	box-shadow: inset 0 2px 3px rgba(255,255,255,0.35);
}

.stock-bar-fill.low {
	background: linear-gradient(180deg, #e0bf4a 0%, var(--sunflower) 100%);
}

.stock-bar-fill.sold-out {
	background: var(--alizarin);
}

.stock-label {
	font-size: 13px;
	color: var(--midnight);
	margin: 8px 0 0;
	font-weight: 600;
}

.stock-label.low { color: var(--alizarin); font-weight: 700; }
.stock-label.sold-out { color: var(--alizarin); font-weight: 800; }

.order-form {
	background: white;
	border-radius: 16px;
	padding: 32px;
	box-shadow: 0 4px 20px rgba(64,77,90,0.12);
}

.order-form h3 {
	margin-top: 0;
	color: var(--midnight-dark);
}

.field {
	margin-bottom: 18px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.field label {
	font-size: 14px;
	font-weight: 600;
	color: var(--midnight);
}

.field input,
.field textarea {
	padding: 12px 14px;
	border-radius: 10px;
	border: 1.5px solid #d6dbe0;
	font-size: 15px;
	font-family: inherit;
}

.field input:focus,
.field textarea:focus {
	outline: none;
	border-color: var(--turquoise);
}

.field-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

@media (max-width: 480px) {
	.field-row { grid-template-columns: 1fr; }
}

.pay-btn {
	width: 100%;
	background: var(--sunflower);
	color: var(--midnight-dark);
	padding: 16px;
	border-radius: 12px;
	font-size: 18px;
	font-weight: 800;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-top: 8px;
}

.pay-btn:hover { transform: translateY(-2px); }
.pay-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

.pay-note {
	text-align: center;
	font-size: 13px;
	color: var(--midnight);
	margin-top: 12px;
}

.status-msg {
	margin-top: 16px;
	padding: 12px 16px;
	border-radius: 10px;
	font-size: 14px;
	display: none;
}

.status-msg.error {
	display: block;
	background: #fbe3e0;
	color: #a13b2c;
}

.status-msg.info {
	display: block;
	background: #e3f0f5;
	color: var(--turquoise);
}

.back-link {
	display: inline-block;
	margin-bottom: 24px;
	color: var(--turquoise);
	font-weight: 600;
	font-size: 14px;
}
