:root {
	--bg-dark: #050e0a;
	--bg-surface: #0b1b14;
	--bg-card: #10271d;
	--bg-card-hover: #163427;
	--border: #1a4231;
	--border-light: #245c44;
	--border-gold: rgba(245, 158, 11, 0.4);
	
	--emerald-glow: #10b981;
	--emerald-bright: #34d399;
	--emerald-dark: #064e3b;
	--gold: #f59e0b;
	--gold-light: #fde047;
	--gold-gradient: linear-gradient(135deg, #fde68a 0%, #f59e0b 50%, #b45309 100%);
	--emerald-gradient: linear-gradient(135deg, #34d399 0%, #059669 50%, #064e3b 100%);
	--sphere-gradient: radial-gradient(circle at 35% 30%, #4ade80, #059669 45%, #022c22 85%);
	--sphere-gold: radial-gradient(circle at 35% 30%, #fef08a, #eab308 45%, #78350f 85%);
	
	--fg: #ecfdf5;
	--fg-muted: #93a89e;
	--fg-subtle: #5f7a6f;
	--danger: #f87171;
	--danger-bg: rgba(239, 68, 68, 0.15);
	
	--font-title: 'Cinzel', serif;
	--font-body: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
	--font-mono: 'Space Mono', monospace;
	--radius: 12px;
	--radius-lg: 18px;
	--radius-full: 9999px;
	--shadow-glow: 0 0 25px rgba(16, 185, 129, 0.25);
	--shadow-gold: 0 0 25px rgba(245, 158, 11, 0.3);
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	background-color: var(--bg-dark);
	background-image: 
		radial-gradient(ellipse 80% 50% at 50% -20%, rgba(16, 185, 129, 0.18), transparent),
		radial-gradient(circle at 90% 80%, rgba(245, 158, 11, 0.08), transparent),
		radial-gradient(circle at 10% 40%, rgba(5, 150, 105, 0.1), transparent);
	background-attachment: fixed;
	color: var(--fg);
	font-family: var(--font-body);
	line-height: 1.5;
	min-height: 100vh;
	-webkit-font-smoothing: antialiased;
}

.shell {
	max-width: 1080px;
	margin: 0 auto;
	padding: 1.5rem 1rem 4rem;
}

/* Header */
.app-header {
	text-align: center;
	margin-bottom: 2rem;
	position: relative;
}

.brand-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	background: rgba(245, 158, 11, 0.12);
	border: 1px solid var(--border-gold);
	color: var(--gold-light);
	font-size: 0.78rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	padding: 0.3rem 0.85rem;
	border-radius: var(--radius-full);
	margin-bottom: 0.75rem;
}

.app-title {
	font-family: var(--font-title);
	font-size: clamp(2rem, 5.5vw, 3.4rem);
	font-weight: 900;
	letter-spacing: -0.01em;
	background: var(--gold-gradient);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	margin-bottom: 0.4rem;
	text-shadow: 0 4px 20px rgba(245, 158, 11, 0.3);
}

.app-subtitle {
	color: var(--fg-muted);
	font-size: clamp(0.95rem, 2.5vw, 1.15rem);
	max-width: 650px;
	margin: 0 auto;
	font-weight: 400;
}

.top-bar-actions {
	display: flex;
	justify-content: center;
	gap: 0.75rem;
	margin-top: 1rem;
	flex-wrap: wrap;
}

/* Navigation Tabs */
.ritual-tabs {
	display: flex;
	overflow-x: auto;
	gap: 0.5rem;
	padding: 0.4rem;
	background: var(--bg-surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	margin-bottom: 1.75rem;
	scrollbar-width: none;
}
.ritual-tabs::-webkit-scrollbar {
	display: none;
}

.tab-btn {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	white-space: nowrap;
	padding: 0.65rem 1.1rem;
	border: 1px solid transparent;
	border-radius: var(--radius);
	background: transparent;
	color: var(--fg-muted);
	font-family: var(--font-body);
	font-size: 0.9rem;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
}

.tab-btn:hover {
	color: var(--fg);
	background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
	background: var(--emerald-dark);
	border-color: var(--emerald-glow);
	color: #fff;
	font-weight: 600;
	box-shadow: 0 2px 12px rgba(16, 185, 129, 0.25);
}

.tab-btn .tab-icon {
	font-size: 1.1rem;
}

/* Main Grid Layout */
.workspace-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
}

@media (min-width: 860px) {
	.workspace-grid {
		grid-template-columns: 1.1fr 1fr;
		align-items: start;
	}
}

/* Cards & Containers */
.card {
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 1.5rem;
	position: relative;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.card-highlight {
	border-color: var(--border-light);
	background: linear-gradient(180deg, var(--bg-card) 0%, rgba(11, 27, 20, 0.9) 100%);
}

.card-gold {
	border-color: var(--border-gold);
	box-shadow: var(--shadow-gold);
}

.card-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1.25rem;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.card-title {
	font-family: var(--font-title);
	font-size: 1.25rem;
	color: var(--fg);
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.card-desc {
	color: var(--fg-muted);
	font-size: 0.875rem;
	margin-top: -0.75rem;
	margin-bottom: 1.25rem;
}

/* Mega-Sena Balls Display */
.balls-container {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	justify-content: center;
	padding: 1.25rem 0.5rem;
}

.mega-ball {
	width: 54px;
	height: 54px;
	border-radius: 50%;
	background: var(--sphere-gradient);
	color: #ffffff;
	font-family: var(--font-mono);
	font-weight: 700;
	font-size: 1.25rem;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 
		inset 0 2px 4px rgba(255, 255, 255, 0.7),
		inset 0 -3px 6px rgba(0, 0, 0, 0.8),
		0 6px 14px rgba(0, 0, 0, 0.5),
		0 0 16px rgba(16, 185, 129, 0.4);
	position: relative;
	transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
	user-select: none;
	animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) backwards;
}

.mega-ball.gold {
	background: var(--sphere-gold);
	color: #2b1100;
	box-shadow: 
		inset 0 2px 4px rgba(255, 255, 255, 0.9),
		inset 0 -3px 6px rgba(0, 0, 0, 0.8),
		0 6px 14px rgba(0, 0, 0, 0.5),
		0 0 16px rgba(245, 158, 11, 0.6);
}

.mega-ball:hover {
	transform: translateY(-4px) scale(1.08);
}

@keyframes popIn {
	0% {
		opacity: 0;
		transform: scale(0.3) rotate(-30deg);
	}
	100% {
		opacity: 1;
		transform: scale(1) rotate(0deg);
	}
}

/* Volante da Mega-Sena (Grade 1 a 60) */
.volante-grid {
	display: grid;
	grid-template-columns: repeat(10, 1fr);
	gap: 4px;
	padding: 0.75rem;
	background: #061810;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	margin-top: 1rem;
}

.volante-num {
	aspect-ratio: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--font-mono);
	font-size: 0.75rem;
	color: #6d897c;
	background: rgba(255, 255, 255, 0.02);
	border-radius: 4px;
	border: 1px solid rgba(255, 255, 255, 0.04);
	cursor: pointer;
	transition: all 0.15s ease;
	user-select: none;
}

.volante-num:hover {
	border-color: var(--emerald-glow);
	color: #fff;
	background: rgba(16, 185, 129, 0.15);
}

.volante-num.selected {
	background: var(--emerald-glow);
	color: #042215;
	font-weight: 800;
	border-color: #a7f3d0;
	box-shadow: 0 0 8px rgba(16, 185, 129, 0.7);
	transform: scale(1.08);
	z-index: 1;
}

.volante-num.fixed-in-slot {
	background: var(--gold);
	color: #381b00;
	border-color: #fef08a;
	font-weight: 800;
}

.volante-num.excluded {
	background: rgba(239, 68, 68, 0.2);
	color: #f87171;
	text-decoration: line-through;
	opacity: 0.6;
}

/* Statistics Bar & Metrics */
.stats-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
	gap: 0.65rem;
	margin: 1.25rem 0;
}

.stat-box {
	background: rgba(0, 0, 0, 0.25);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 0.65rem 0.75rem;
	text-align: center;
}

.stat-box-label {
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--fg-muted);
	margin-bottom: 0.2rem;
}

.stat-box-val {
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--fg);
	font-family: var(--font-mono);
}

.stat-box-val.gold {
	color: var(--gold-light);
}

.stat-box-val.emerald {
	color: var(--emerald-bright);
}

/* Form Elements */
.field {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	margin-bottom: 1rem;
}

.field label {
	font-size: 0.85rem;
	font-weight: 500;
	color: var(--fg-muted);
}

.input, .select {
	background: #081610;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 0.65rem 0.85rem;
	color: var(--fg);
	font-family: var(--font-body);
	font-size: 0.95rem;
	transition: all 0.2s;
}

.input:focus, .select:focus {
	outline: none;
	border-color: var(--emerald-glow);
	box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.range-input {
	accent-color: var(--emerald-glow);
	height: 6px;
	background: #081610;
	border-radius: 4px;
}

/* Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.7rem 1.25rem;
	border-radius: var(--radius);
	font-family: var(--font-body);
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
	border: 1px solid transparent;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
	user-select: none;
}

.btn-primary {
	background: var(--emerald-gradient);
	color: #ffffff;
	box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
}

.btn-primary:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
	filter: brightness(1.1);
}

.btn-gold {
	background: var(--gold-gradient);
	color: #2b1100;
	font-weight: 700;
	box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
}

.btn-gold:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 22px rgba(245, 158, 11, 0.55);
	filter: brightness(1.1);
}

.btn-secondary {
	background: rgba(255, 255, 255, 0.05);
	border-color: var(--border);
	color: var(--fg);
}

.btn-secondary:hover {
	background: rgba(255, 255, 255, 0.1);
	border-color: var(--border-light);
}

.btn-ghost {
	background: transparent;
	color: var(--fg-muted);
	padding: 0.4rem 0.6rem;
}

.btn-ghost:hover {
	color: var(--fg);
	background: rgba(255, 255, 255, 0.05);
}

.btn-sm {
	padding: 0.4rem 0.75rem;
	font-size: 0.825rem;
}

.btn-lg {
	padding: 0.85rem 1.6rem;
	font-size: 1.05rem;
	width: 100%;
}

/* Tarot Cards UI */
.tarot-deck {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
	gap: 0.75rem;
	margin: 1.25rem 0;
}

.tarot-card {
	aspect-ratio: 2 / 3.1;
	background: #081711;
	border: 1px solid var(--border-gold);
	border-radius: var(--radius);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 0.5rem;
	cursor: pointer;
	text-align: center;
	transition: all 0.3s ease;
	position: relative;
	overflow: hidden;
}

.tarot-card:hover {
	transform: translateY(-5px);
	border-color: var(--gold-light);
	box-shadow: var(--shadow-gold);
}

.tarot-card.flipped {
	background: linear-gradient(160deg, #153828 0%, #061e14 100%);
	border-color: var(--emerald-bright);
}

.tarot-card-icon {
	font-size: 1.8rem;
	margin-bottom: 0.3rem;
}

.tarot-card-name {
	font-family: var(--font-title);
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--gold-light);
}

.tarot-card-num {
	font-size: 0.7rem;
	color: var(--fg-muted);
	margin-top: 0.2rem;
}

/* Strategy Selector Pills */
.strategy-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 0.5rem;
	margin-bottom: 1.25rem;
}

.strategy-pill {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: 0.75rem;
	border: 1px solid var(--border);
	background: rgba(0, 0, 0, 0.2);
	border-radius: var(--radius);
	cursor: pointer;
	transition: all 0.2s;
	text-align: left;
}

.strategy-pill:hover {
	border-color: var(--emerald-glow);
	background: rgba(16, 185, 129, 0.08);
}

.strategy-pill.active {
	border-color: var(--emerald-glow);
	background: rgba(16, 185, 129, 0.18);
	box-shadow: 0 0 12px rgba(16, 185, 129, 0.2);
}

.strategy-pill-title {
	font-weight: 600;
	font-size: 0.85rem;
	color: var(--fg);
	display: flex;
	align-items: center;
	gap: 0.35rem;
}

.strategy-pill-desc {
	font-size: 0.72rem;
	color: var(--fg-muted);
	margin-top: 0.2rem;
}

/* Saved Games / Chest */
.saved-item {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	padding: 0.85rem;
	background: rgba(0, 0, 0, 0.25);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	margin-bottom: 0.65rem;
	transition: all 0.2s;
}

.saved-item:hover {
	border-color: var(--border-light);
	background: rgba(0, 0, 0, 0.35);
}

.saved-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.saved-name {
	font-weight: 600;
	font-size: 0.9rem;
	color: var(--gold-light);
}

.saved-date {
	font-size: 0.72rem;
	color: var(--fg-subtle);
}

.saved-balls {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
}

.mini-ball {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--sphere-gradient);
	color: #fff;
	font-family: var(--font-mono);
	font-size: 0.75rem;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.5), 0 2px 4px rgba(0, 0, 0, 0.4);
}

.mini-ball.match {
	background: var(--sphere-gold);
	color: #2b1100;
	box-shadow: 0 0 8px rgba(245, 158, 11, 0.8);
	transform: scale(1.1);
}

/* Simulator / Sorteio Virtual */
.simulator-box {
	background: linear-gradient(180deg, #071a12 0%, #030a07 100%);
	border: 1px solid var(--border-gold);
	border-radius: var(--radius-lg);
	padding: 1.25rem;
	text-align: center;
	margin-top: 1.25rem;
}

/* Toast alert */
.toast-msg {
	position: fixed;
	bottom: 1.5rem;
	right: 1.5rem;
	background: #064e3b;
	color: #fff;
	border: 1px solid var(--emerald-bright);
	padding: 0.75rem 1.25rem;
	border-radius: var(--radius);
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
	font-weight: 500;
	z-index: 1000;
	animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Modal / Printable Card */
.modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.8);
	backdrop-filter: blur(4px);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 999;
	padding: 1rem;
}

.modal-content {
	background: var(--bg-surface);
	border: 1px solid var(--border-gold);
	border-radius: var(--radius-lg);
	max-width: 500px;
	width: 100%;
	padding: 1.5rem;
	box-shadow: var(--shadow-gold);
	max-height: 90vh;
	overflow-y: auto;
}

/* Ticket printable style */
.lottery-ticket {
	background: #fff;
	color: #111;
	border: 2px dashed #059669;
	border-radius: 8px;
	padding: 1.25rem;
	margin: 1rem 0;
	font-family: 'Space Mono', monospace;
	text-align: center;
}

.lottery-ticket-title {
	font-weight: 800;
	font-size: 1.1rem;
	color: #065f46;
	border-bottom: 2px solid #059669;
	padding-bottom: 0.5rem;
	margin-bottom: 0.75rem;
}

.lottery-ticket-numbers {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
	font-size: 1.3rem;
	font-weight: 800;
	color: #047857;
	margin: 1rem 0;
}

.lottery-ticket-footer {
	font-size: 0.7rem;
	color: #666;
	border-top: 1px solid #ddd;
	padding-top: 0.5rem;
}

/* Mystic Insight Box */
.mystic-insight {
	background: rgba(245, 158, 11, 0.08);
	border: 1px solid rgba(245, 158, 11, 0.25);
	border-radius: var(--radius);
	padding: 1rem;
	margin: 1rem 0;
	font-size: 0.9rem;
	line-height: 1.6;
	color: #fef3c7;
}

.mystic-insight-title {
	font-family: var(--font-title);
	font-weight: 700;
	color: var(--gold-light);
	margin-bottom: 0.35rem;
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

/* Badge tags */
.badge-gold {
	background: rgba(245, 158, 11, 0.2);
	border: 1px solid var(--border-gold);
	color: var(--gold-light);
	font-size: 0.75rem;
	padding: 0.15rem 0.5rem;
	border-radius: var(--radius-full);
}

.badge-emerald {
	background: rgba(16, 185, 129, 0.2);
	border: 1px solid var(--emerald-glow);
	color: var(--emerald-bright);
	font-size: 0.75rem;
	padding: 0.15rem 0.5rem;
	border-radius: var(--radius-full);
}

/* Responsive adjustments */
@media (max-width: 480px) {
	.shell {
		padding: 1rem 0.6rem 3rem;
	}
	
	.mega-ball {
		width: 46px;
		height: 46px;
		font-size: 1.1rem;
	}
	
	.volante-grid {
		gap: 2px;
		padding: 0.4rem;
	}
	
	.volante-num {
		font-size: 0.65rem;
	}
	
	.tab-btn {
		padding: 0.5rem 0.8rem;
		font-size: 0.82rem;
	}
}

/* Canvas confetti on top */
#confetti-canvas {
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 10000;
}

/* Disclaimer & Responsible Gaming */
.disclaimer-banner {
	background: rgba(15, 23, 42, 0.7);
	border: 1px solid rgba(245, 158, 11, 0.25);
	border-radius: var(--radius-md);
	padding: 0.75rem 1.25rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin: 1.25rem 0 1.75rem;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.disclaimer-banner-content {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-size: 0.82rem;
	color: #cbd5e1;
	line-height: 1.4;
}

.disclaimer-icon {
	font-size: 1.25rem;
	flex-shrink: 0;
}

.app-footer-disclaimer {
	margin-top: 3.5rem;
	padding: 1.75rem;
	background: rgba(15, 23, 42, 0.75);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: var(--radius-lg);
	color: #94a3b8;
	font-size: 0.82rem;
	line-height: 1.6;
	position: relative;
	overflow: hidden;
}

.app-footer-disclaimer::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 2px;
	background: linear-gradient(90deg, transparent, var(--gold-primary), var(--emerald-bright), transparent);
}

.app-footer-disclaimer-title {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--font-title);
	font-size: 0.95rem;
	color: var(--gold-light);
	margin-bottom: 0.75rem;
	font-weight: 600;
}

.app-footer-disclaimer p {
	margin-bottom: 0.5rem;
}

.disclaimer-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 1rem;
}

.disclaimer-tag {
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
	padding: 0.2rem 0.6rem;
	border-radius: var(--radius-full);
	font-size: 0.72rem;
	color: #cbd5e1;
}

