/*
   PGRI Demo
*/

/* -BSL-- Brightstar Lottery font --- */
@font-face {
	font-family: "Brightstar Sans";
	src: url(BrightstarSans-Regular.woff2) format("woff2"), url(BrightstarSans-Regular.woff) format("woff");
	font-weight: 400;
	font-style: normal;
}

/* --- Custom Properties (Light Theme Default) --- */
:root {
	--bg-primary: #ffffff;
	--bg-secondary: #ffffff;
	--bg-surface: #ecedf2;
	--bg-surface-hover: #e0e1e8;
	--bg-overlay: rgba(0, 0, 0, 0.4);

	--text-primary: #111827;
	--text-secondary: #4b5563;
	--text-muted: #9ca3af;

	--gold-primary: #002ee4;
	--gold-light: #3358ea;
	--gold-dark: #0024b8;
	--gold-glow: rgba(0, 46, 228, 0.2);
	--gold-gradient: linear-gradient(135deg, #002ee4 0%, #3358ea 50%, #002ee4 100%);

	--accent-secondary: #fa7c03;
	--accent-secondary-light: #fb9a3e;
	--accent-secondary-dark: #e06e00;

	--error: #dc2626;
	--success: #16a34a;
	--info: #2563eb;

	--border-subtle: rgba(0, 0, 0, 0.08);
	--border-gold: rgba(0, 46, 228, 0.25);

	--radius-sm: 6px;
	--radius-md: 10px;
	--radius-lg: 16px;
	--radius-xl: 24px;

	--shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
	--shadow-md: 0 4px 12px rgba(0,0,0,0.1);
	--shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
	--shadow-gold: 0 0 20px rgba(0, 46, 228, 0.15);

	--space-xs: 4px;
	--space-sm: 8px;
	--space-md: 16px;
	--space-lg: 24px;
	--space-xl: 32px;
	--space-2xl: 48px;
	/* -BSL-- Brightstar Lottery font --- */
	--font-stack: "Brightstar Sans", Helvetica, Arial, sans-serif;
	--transition-fast: 150ms ease;
	--transition-normal: 250ms ease;
	--transition-slow: 400ms ease;
}

/* --- Dark Theme --- */
[data-theme="dark"] {
	--bg-primary: #0a0a14;
	--bg-secondary: #12121e;
	--bg-surface: #1a1a2e;
	--bg-surface-hover: #22223a;
	--bg-overlay: rgba(0, 0, 0, 0.7);

	--text-primary: #f0ece4;
	--text-secondary: #9a96a6;
	--text-muted: #5e5a6e;

	--gold-primary: #d4a843;
	--gold-light: #e8c96a;
	--gold-dark: #b08a2e;
	--gold-glow: rgba(212, 168, 67, 0.25);
	--gold-gradient: linear-gradient(135deg, #d4a843 0%, #e8c96a 50%, #d4a843 100%);

	--accent-secondary: #d4a843;
	--accent-secondary-light: #e8c96a;
	--accent-secondary-dark: #b08a2e;

	--error: #e05252;
	--success: #4caf50;
	--info: #5ca0d3;

	--border-subtle: rgba(255, 255, 255, 0.06);
	--border-gold: rgba(212, 168, 67, 0.3);

	--shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
	--shadow-md: 0 4px 12px rgba(0,0,0,0.5);
	--shadow-lg: 0 8px 30px rgba(0,0,0,0.6);
	--shadow-gold: 0 0 20px rgba(212,168,67,0.2);
}

/* Theme toggle button */
.theme-toggle {
	background: none;
	border: 1px solid rgba(255,255,255,0.4);
	border-radius: var(--radius-sm);
	color: #fff;
	cursor: pointer;
	padding: 6px 12px;
	font-family: var(--font-stack);
	font-size: 13px;
	font-weight: 500;
	transition: all var(--transition-fast);
}
.theme-toggle:hover {
	border-color: rgba(255,255,255,0.7);
	background: rgba(255,255,255,0.1);
}
[data-theme="dark"] .theme-toggle {
	border-color: var(--border-subtle);
	color: var(--text-secondary);
}
[data-theme="dark"] .theme-toggle:hover {
	color: var(--text-primary);
	border-color: var(--gold-primary);
	background: none;
}

/* --- Reset & Base --- */
*, *::before, *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	height: 100dvh;
	-webkit-text-size-adjust: 100%;
}

body {
	font-family: var(--font-stack);
	font-size: 15px;
	line-height: 1.5;
	color: var(--text-primary);
	background: var(--bg-primary);
	min-height: 100dvh;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

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

/* --- Scrollbar --- */
::-webkit-scrollbar {
	width: 6px;
}
::-webkit-scrollbar-track {
	background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
	background: var(--bg-surface-hover);
	border-radius: 3px;
}

::selection {
	background: var(--gold-primary);
	color: #fff;
}
[data-theme="dark"] ::selection {
	color: var(--bg-primary);
}

/* --- Typography --- */
.heading-gold {
	font-size: 28px;
	font-weight: 700;
	background: var(--gold-gradient);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	letter-spacing: -0.5px;
}

/* --- Button System --- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 20px;
	border: none;
	font-family: var(--font-stack);
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: all var(--transition-fast);
	white-space: nowrap;
	gap: 8px;
	-webkit-tap-highlight-color: transparent;
	user-select: none;
	/* -BSL-- Brightstar Lottery font --- */
	border-radius: var(--radius-xl);
}

.btn:active {
	transform: scale(0.97);
}

.btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
	transform: none;
}

.btn-primary {
	color: #fff;
	box-shadow: 0 0 20px rgba(250, 124, 3, 0.2);
	/* -BSL-- Brightstar Lottery font --- */
	background: var(--gold-primary);
}
.btn-primary:hover:not(:disabled) {
	box-shadow: 0 0 30px rgba(250, 124, 3, 0.35);
	filter: brightness(1.05);
}
[data-theme="dark"] .btn-primary {
	background: var(--gold-gradient);
	color: #1a1a2e;
	box-shadow: var(--shadow-gold);
}
[data-theme="dark"] .btn-primary:hover:not(:disabled) {
	box-shadow: 0 0 30px rgba(212,168,67,0.35);
}

.btn-secondary {
	background: var(--bg-surface);
	color: var(--text-primary);
	border: 1px solid var(--border-subtle);
}
.btn-secondary:hover:not(:disabled) {
	background: var(--bg-surface-hover);
	border-color: var(--border-gold);
}

.btn-icon {
	min-height: 44px;
	min-width: 44px;
	padding: 0;
	font-size: 20px;
	background: var(--bg-surface);
	color: var(--text-primary);
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-md);
}
.btn-icon:hover:not(:disabled) {
	background: var(--bg-surface-hover);
	border-color: var(--border-gold);
	color: var(--gold-primary);
}

.btn-sm {
	min-height: 36px;
	padding: 6px 14px;
	font-size: 13px;
	/* -BSL-- Brightstar Lottery font --- */
	border-radius: var(--radius-xl);
}

.btn-lg {
	min-height: 52px;
	padding: 14px 28px;
	font-size: 17px;
	/* -BSL-- Brightstar Lottery font --- */
	border-radius: var(--radius-xl);
}

.btn-ghost {
	background: transparent;
	color: var(--text-secondary);
	border: none;
	padding: 10px 16px;
}
.btn-ghost:hover:not(:disabled) {
	color: var(--text-primary);
	background: rgba(255,255,255,0.05);
}

/* --- Form Inputs --- */
.form-group {
	margin-bottom: var(--space-md);
}

.form-label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--text-secondary);
	margin-bottom: var(--space-xs);
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.form-input {
	width: 100%;
	min-height: 44px;
	padding: 10px 14px;
	background: var(--bg-surface);
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-md);
	color: var(--text-primary);
	font-family: var(--font-stack);
	font-size: 15px;
	transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
	outline: none;
}
.form-input::placeholder {
	color: var(--text-muted);
}
.form-input:focus {
	border-color: var(--gold-primary);
	box-shadow: 0 0 0 3px var(--gold-glow);
}

.checkbox-label {
	display: flex;
	align-items: flex-start;
	gap: var(--space-sm);
	cursor: pointer;
	font-size: 14px;
	color: var(--text-secondary);
	line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	width: 22px;
	height: 22px;
	min-width: 22px;
	border: 2px solid var(--text-muted);
	border-radius: var(--radius-sm);
	background: var(--bg-surface);
	cursor: pointer;
	transition: all var(--transition-fast);
	position: relative;
	margin-top: 1px;
}
.checkbox-label input[type="checkbox"]:checked {
	background: var(--gold-primary);
	border-color: var(--gold-primary);
}
.checkbox-label input[type="checkbox"]:checked::after {
	content: "";
	position: absolute;
	left: 6px;
	top: 2px;
	width: 6px;
	height: 11px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}
[data-theme="dark"] .checkbox-label input[type="checkbox"]:checked::after {
	border-color: #1a1a2e;
}
.checkbox-label input[type="checkbox"]:focus {
	box-shadow: 0 0 0 3px var(--gold-glow);
}

/* --- Card --- */
.card {
	background: var(--bg-secondary);
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-lg);
	padding: var(--space-lg);
	box-shadow: var(--shadow-md);
	transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.card-hover:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-lg);
}

/* --- Toast Notifications --- */
.toast-container {
	position: fixed;
	top: var(--space-md);
	left: 50%;
	transform: translateX(-50%);
	z-index: 10000;
	display: flex;
	flex-direction: column;
	gap: var(--space-sm);
	pointer-events: none;
	width: calc(100% - var(--space-xl));
	max-width: 420px;
}

.toast {
	padding: 12px 20px;
	border-radius: var(--radius-md);
	font-size: 14px;
	font-weight: 500;
	color: #fff;
	box-shadow: var(--shadow-lg);
	pointer-events: auto;
	opacity: 0;
	transform: translateY(-16px);
	transition: opacity var(--transition-normal), transform var(--transition-normal);
}

.toast-visible {
	opacity: 1;
	transform: translateY(0);
}

.toast-error {
	background: var(--error);
}
.toast-success {
	background: var(--success);
}
.toast-info {
	background: var(--info);
}

/* --- Modal / Overlay --- */
.modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.75);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 5000;
	opacity: 0;
	transition: opacity var(--transition-normal);
	padding: var(--space-md);
}

.modal-overlay.modal-visible {
	opacity: 1;
}

.modal-content {
	background: var(--bg-secondary);
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-lg);
	padding: var(--space-lg);
	max-width: 400px;
	width: 100%;
	box-shadow: var(--shadow-lg);
	transform: scale(0.92);
	transition: transform var(--transition-normal);
}

.modal-visible .modal-content {
	transform: scale(1);
}

.modal-title {
	font-size: 18px;
	font-weight: 700;
	margin-bottom: var(--space-sm);
}

.modal-message {
	color: var(--text-secondary);
	margin-bottom: var(--space-lg);
	font-size: 15px;
	line-height: 1.5;
}

.modal-actions {
	display: flex;
	gap: var(--space-sm);
	justify-content: flex-end;
}

/* --- Page Transitions --- */
.page {
	display: none;
	opacity: 0;
	transition: opacity var(--transition-slow);
}

.page.active {
	display: block;
	padding-bottom: 64px;
}

.page.visible {
	opacity: 1;
}

/* --- App Header --- */
.app-header {
	position: sticky;
	top: 0;
	z-index: 300;
	background: #002ee4;
	color: #fff;
	padding: var(--space-sm) var(--space-lg);
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
}

.header-logo {
	grid-column: 2;
	height: 36px;
	width: auto;
}

.header-nav {
	grid-column: 3;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: var(--space-sm);
}
[data-theme="dark"] .app-header {
	background: var(--bg-secondary);
	border-bottom: 1px solid var(--border-subtle);
	color: var(--text-primary);
}

.app-header .heading-gold {
	font-size: 20px;
}



.app-header.hidden {
	display: none;
}

/* --- Balance Bar --- */
.balance-bar {
	position: sticky;
	/* top: 52px; sits flush under the header */
	z-index: 299;
	background: var(--bg-secondary);
	border-bottom: 1px solid var(--border-subtle);
	padding: var(--space-xs) var(--space-lg);
	display: flex;
	align-items: center;
	gap: var(--space-sm);
	min-height: 0;
	/* -BSL-- Brightstar Lottery font --- */
	justify-content: space-between;
}

.balance-bar.hidden {
	display: none;
}

#balance:empty {
	display: none;
}

#balance {
	display: inline-flex;
	align-items: center;
	gap: var(--space-sm);
	/* -BSL-- Brightstar Lottery font --- */
	/*background: var(--bg-surface);*/
	/*padding: 4px 14px;*/
	/*border: 1px solid var(--border-gold);*/
	/*border-radius: var(--radius-xl);*/
}

.balance-label {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	/* -BSL-- Brightstar Lottery font --- */
	color: var(--gold-primary);
}

.balance-amount {
	font-size: 11px;
	font-weight: 700;
	color: var(--accent-secondary);
}

[data-theme="dark"] .balance-amount {
	color: var(--gold-primary);
}

/* --- Catalog Page --- */
.catalog-section-header {
	padding: var(--space-md) var(--space-lg);
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.catalog-section-header h2 {
	font-size: 18px;
	font-weight: 600;
}

.cart-badge {
	font-size: 13px;
	font-weight: 500;
	color: var(--text-muted);
	margin-left: 2px;
}

.catalog-carousel {
	padding-bottom: 180px;
}

.catalog-section {
	margin-bottom: var(--space-lg);
}

.catalog-section-label {
	display: inline-flex;
	align-items: center;
	margin: 0 0 var(--space-sm) var(--space-lg);
	border-radius: 4px;
	overflow: hidden;
	font-weight: 700;
	line-height: 1;
}
.price-tag-amount {
	font-size: 15px;
	letter-spacing: 0.02em;
	/* -BSL-- Brightstar Lottery font --- */
	background: #fff;
	color: #050533;
	padding: 6px 0px;
}
.price-tag-text {
	padding: 6px 10px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	/* -BSL-- Brightstar Lottery font --- */
	background: #fff;
	color: #050533;
	font-size: 15px;
}

.catalog-row {
	display: flex;
	gap: var(--space-md);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	padding: 0;
	scrollbar-width: none;
}
.catalog-row .game-card:first-child {
	margin-left: var(--space-lg);
}
.catalog-row .game-card:last-child {
	margin-right: var(--space-lg);
}
.catalog-row::-webkit-scrollbar {
	display: none;
}

.catalog-row .game-card {
	flex: 0 0 45%;
	scroll-snap-align: start;
	scroll-margin-left: var(--space-lg);
}

@media (min-width: 600px) {
	.catalog-row .game-card {
		flex: 0 0 30%;
	}
}
@media (min-width: 900px) {
	.catalog-row .game-card {
		flex: 0 0 22%;
	}
}

/* --- Game Cards --- */
.game-card {
	background: var(--bg-secondary);
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-lg);
	overflow: hidden;
	transition: all var(--transition-normal);
}

.game-card.in-cart {
	border-color: var(--accent-secondary);
	box-shadow: 0 0 16px rgba(250, 124, 3, 0.2);
}
[data-theme="dark"] .game-card.in-cart {
	border-color: var(--gold-primary);
	box-shadow: 0 0 16px var(--gold-glow);
}

.game-card-image {
	width: 100%;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	object-position: top;
	cursor: pointer;
	background: var(--bg-surface);
}

.game-card-body {
	padding: var(--space-sm) var(--space-md) var(--space-md);
}

.game-card-title {
	font-size: 13px;
	color: var(--text-secondary);
	margin-bottom: var(--space-xs);
}

.game-card-price {
	font-size: 16px;
	font-weight: 700;
	color: var(--accent-secondary);
	margin-bottom: var(--space-sm);
}

.game-card-actions {
	display: flex;
	align-items: center;
	gap: var(--space-sm);
}

.game-card-qty {
	font-size: 15px;
	font-weight: 600;
	min-width: 20px;
	text-align: center;
}

/* --- Sticky Purchase Footer --- */
.purchase-footer {
	position: fixed;
	bottom: 56px;
	left: 0;
	right: 0;
	background: var(--bg-secondary);
	border-top: 1px solid var(--border-subtle);
	padding: var(--space-md) var(--space-lg);
	display: flex;
	align-items: center;
	justify-content: space-between;
	z-index: 95;
	box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
	transform: translateY(100%);
	transition: transform var(--transition-normal);
}
.purchase-footer.footer-visible {
	transform: translateY(0);
}
[data-theme="dark"] .purchase-footer {
	box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
}

.footer-total {
	font-size: 14px;
	color: var(--text-secondary);
}

.footer-total-amount {
	font-size: 22px;
	font-weight: 700;
	color: var(--accent-secondary);
}

/* --- Welcome bar --- */
.welcome-bar {
	padding: var(--space-sm) var(--space-lg);
	color: var(--text-secondary);
	font-size: 14px;
}

/* --- Interstitial Page --- */
.interstitial-wrapper {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 80vh;
	padding: var(--space-lg);
}

.interstitial-wrapper video {
	width: 100%;
	max-width: 600px;
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-lg);
}

.progress-bar-track {
	width: 100%;
	max-width: 600px;
	height: 4px;
	background: var(--bg-surface);
	border-radius: 2px;
	margin-top: var(--space-lg);
	overflow: hidden;
}

.progress-bar-fill {
	height: 100%;
	background: var(--gold-gradient);
	border-radius: 2px;
	width: 0%;
	animation: progressFill 18s linear forwards;
}

@keyframes progressFill {
	to { width: 100%; }
}

/* --- Purchases Page --- */
.purchases-header {
	padding: var(--space-md) var(--space-lg);
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: var(--space-sm);
}

.purchases-header h2 {
	font-size: 18px;
	font-weight: 600;
}

.order-group {
	margin: 0 var(--space-md) var(--space-lg);
	background: var(--bg-secondary);
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-lg);
	overflow: hidden;
}

.order-group:last-child {
	margin-bottom: 80px;
}

.order-header {
	padding: var(--space-md) var(--space-lg);
	background: var(--bg-surface);
	border-bottom: 1px solid var(--border-subtle);
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: var(--space-sm);
}

.order-number {
	font-weight: 700;
	font-size: 14px;
}

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

.ticket-grid {
	display: flex;
	gap: var(--space-md);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding-left: var(--space-lg);
	-webkit-overflow-scrolling: touch;
	padding: var(--space-md) 0;
	margin: 0 var(--space-lg);
	scrollbar-width: none;
}
.ticket-grid::-webkit-scrollbar {
	display: none;
}

.ticket-grid .ticket-card {
	flex: 0 0 40%;
	min-width: 0;
	scroll-snap-align: start;
}

@media (min-width: 600px) {
	.ticket-grid .ticket-card {
		flex: 0 0 28%;
	}
}
@media (min-width: 900px) {
	.ticket-grid .ticket-card {
		flex: 0 0 20%;
	}
}

.ticket-card {
	position: relative;
	border-radius: var(--radius-md);
	overflow: hidden;
	cursor: pointer;
	background: var(--bg-surface);
	border: 1px solid var(--border-subtle);
	transition: all var(--transition-normal);
}

.ticket-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-md);
}

.ticket-card img {
	width: 100%;
	aspect-ratio: 3 / 4;
	object-fit: cover;
}

.ticket-card.unrevealed {
	border-color: var(--gold-dark);
}


.ticket-shimmer {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		110deg,
		transparent 30%,
		rgba(0, 46, 228, 0.05) 45%,
		rgba(0, 46, 228, 0.1) 50%,
		rgba(0, 46, 228, 0.05) 55%,
		transparent 70%
	);
	background-size: 250% 100%;
	animation: shimmer 2.5s infinite;
	pointer-events: none;
}
[data-theme="dark"] .ticket-shimmer {
	background: linear-gradient(
		110deg,
		transparent 30%,
		rgba(212, 168, 67, 0.08) 45%,
		rgba(212, 168, 67, 0.15) 50%,
		rgba(212, 168, 67, 0.08) 55%,
		transparent 70%
	);
	background-size: 250% 100%;
}

@keyframes shimmer {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

.ticket-win {
	padding: 6px;
	text-align: center;
	font-size: 13px;
	font-weight: 700;
}

.ticket-win.win-zero {
	color: var(--text-muted);
}

.ticket-win.win-normal {
	color: var(--success);
}

.ticket-win.ticket-unscratched {
	background: #002ee4;
	color: #fff;
}

.ticket-win.win-normal,
.ticket-win.win-big {
	background: #fa7c03;
	color: #fff;
	text-shadow: none;
}
[data-theme="dark"] .ticket-win.win-normal,
[data-theme="dark"] .ticket-win.win-big {
	background: #fa7c03;
	color: #fff;
	text-shadow: none;
}

/* --- Reveal Page --- */
.reveal-page {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: var(--bg-primary);
	z-index: 200;
	padding-top: 68px;
	display: flex;
	flex-direction: column;
}

.reveal-top-bar {
	padding: var(--space-md) var(--space-lg);
	background: var(--bg-secondary);
	border-bottom: 1px solid var(--border-subtle);
	display: flex;
	align-items: center;
	justify-content: space-between;
	z-index: 1;
}

.reveal-instruction {
	font-size: 14px;
	color: var(--text-secondary);
}

.reveal-canvas-area {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.reveal-canvas-area canvas {
	box-shadow: var(--shadow-lg);
	border-radius: var(--radius-sm);
}

.reveal-bottom-bar {
	padding: var(--space-md) var(--space-lg);
	background: var(--bg-secondary);
	border-top: 1px solid var(--border-subtle);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-sm);
	flex-wrap: wrap;
	z-index: 1;
}
[data-theme="dark"] .reveal-top-bar,
[data-theme="dark"] .reveal-bottom-bar {
	background: rgba(0,0,0,0.6);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border: none;
}

.reveal-winnings {
	font-size: 20px;
	font-weight: 700;
}

.reveal-winnings.win-celebration {
	color: var(--gold-primary);
	animation: pulse 1s ease-in-out infinite;
}

.reveal-winnings.win-big-celebration {
	color: var(--gold-light);
	animation: bounce 0.6s ease-in-out infinite;
	text-shadow: 0 0 20px var(--gold-glow);
}

@keyframes pulse {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.08); }
}

@keyframes bounce {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-6px); }
}

.reveal-actions {
	display: flex;
	gap: var(--space-sm);
	align-items: center;
}

/* --- Video Modal (for Watch Scratch) --- */
.video-modal-content {
	max-width: 90vw;
	max-height: 80vh;
	background: #000;
	border-radius: var(--radius-lg);
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.video-modal-content video {
	width: 100%;
	max-height: 70vh;
	border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.video-modal-actions {
	padding: var(--space-md);
	display: flex;
	justify-content: center;
	background: var(--bg-secondary);
}

/* --- Bottom Tab Bar --- */
.tab-bar {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 100;
	display: flex;
	background: var(--bg-secondary);
	border-top: 1px solid var(--border-subtle);
	padding: var(--space-xs) 0;
	padding-bottom: max(var(--space-xs), env(safe-area-inset-bottom));
}

.tab-bar.hidden {
	display: none;
}

.tab-item {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	padding: var(--space-xs) 0;
	background: none;
	border: none;
	color: var(--text-muted);
	font-family: var(--font-stack);
	font-size: 11px;
	font-weight: 600;
	cursor: pointer;
	transition: color var(--transition-fast);
	-webkit-tap-highlight-color: transparent;
}

.tab-item:hover {
	color: var(--text-secondary);
}

.tab-item.active {
	color: var(--gold-primary);
}

[data-theme="dark"] .tab-item.active {
	color: var(--gold-primary);
}

/* --- Confirm Dialog --- */
#confirmDialog {
	display: none;
}

#confirmDialog.modal-overlay {
	display: flex;
}

/* --- Fund Dialog --- */
#fundDialog {
	display: none;
}

#fundDialog.modal-overlay {
	display: flex;
}

.fund-presets {
	display: flex;
	gap: 8px;
	margin-bottom: 12px;
}

.fund-presets .btn {
	flex: 1;
}

.fund-preset.active {
	background: var(--accent-secondary);
	color: #fff;
	border-color: var(--accent-secondary);
}

[data-theme="dark"] .fund-preset.active {
	background: var(--gold-primary);
	color: var(--bg-primary);
	border-color: var(--gold-primary);
}

.fund-custom input {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--border-subtle);
	border-radius: 8px;
	font-size: 16px;
	background: var(--bg-surface);
	color: var(--text-primary);
	box-sizing: border-box;
	margin-bottom: 12px;
	font-family: var(--font-stack);
	outline: none;
	transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.fund-custom input:focus {
	border-color: var(--gold-primary);
	box-shadow: 0 0 0 3px var(--gold-glow);
}

.fund-pill {
	display: inline-flex;
	align-items: center;
	gap: var(--space-sm);
	border-radius: var(--radius-xl);
	padding: 4px 14px;
	cursor: pointer;
	transition: background var(--transition-fast), border-color var(--transition-fast);
	/* -BSL-- Brightstar Lottery font --- */
	background: white;
	border: 1px solid var(--gold-primary);
}

.fund-pill:hover {
	background: var(--bg-surface-hover);
}

/* --- Loading Overlay --- */
.loading-overlay {
	position: absolute;
	inset: 0;
	background: rgba(245, 245, 248, 0.6);
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: inherit;
	z-index: 10;
}

.spinner {
	width: 32px;
	height: 32px;
	border: 3px solid var(--border-subtle);
	border-top-color: var(--gold-primary);
	border-radius: 50%;
	animation: spin 0.7s linear infinite;
}

@keyframes spin {
	to { transform: rotate(360deg); }
}

/* --- Register Page --- */
.register-page {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: calc(100dvh - 52px);
	padding: var(--space-lg);
	overflow: hidden;
}

.register-card {
	width: 100%;
	max-width: 440px;
}

.register-card .heading-gold {
	text-align: center;
	margin-bottom: var(--space-xs);
}

.register-subtitle {
	text-align: center;
	color: var(--text-secondary);
	font-size: 14px;
	margin-bottom: var(--space-xl);
}

.register-card .form-group:last-of-type {
	margin-bottom: var(--space-lg);
}

.register-cta {
	width: 100%;
	margin-top: var(--space-md);
}

/* --- Image Zoom Modal --- */
.zoom-image {
	max-width: 90vw;
	max-height: 85vh;
	object-fit: contain;
	border-radius: var(--radius-md);
	cursor: pointer;
}

/* --- Flip Card --- */
.flip-card-container {
	perspective: 1000px;
	cursor: pointer;
}

.flip-card-inner {
	position: relative;
	transform-style: preserve-3d;
	transition: transform 0.6s;
}

.flip-card-inner.flipped {
	transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
	backface-visibility: hidden;
}

.flip-card-back {
	position: absolute;
	top: 0;
	left: 0;
	transform: rotateY(180deg);
}

.flip-hint {
	text-align: center;
	color: rgba(255, 255, 255, 0.7);
	font-size: 0.85rem;
	margin-top: var(--space-sm);
	pointer-events: none;
}
