@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

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

:root {
	--bg: #1B1C1D;
	--bg2: #1B1C1D;
	--bg3: #101112;
	--panel: #1B1C1D;
	--red: #ff2d55;
	--red-glow: rgba(255, 45, 85, 0.35);
	--green: #008F40;
	--green-glow: rgba(0, 143, 64, 0.3);
	--gold: #FEE001;
	--purple: #2641BE;
	--text: #ffffff;
	--text2: #e0e6ed;
	--text3: #9ba7b5;
	--border: rgba(255, 255, 255, 0.08);
	--radius: 10px;
	--font: 'Inter', system-ui, -apple-system, sans-serif;
}

html {
	height: 100%;
}

body {
	background: var(--bg);
	color: var(--text);
	font-family: var(--font);
	min-height: 100vh;
	overflow-x: hidden;
	user-select: none;
}

.av-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 20px;
	height: 56px;
	background: #1B1C1D;
	border-bottom: 1px solid var(--border);
	position: sticky;
	top: 0;
	z-index: 500;
}

.av-header-left {
	display: flex;
	align-items: center;
	gap: 14px;
}

.av-logo-img {
	height: 42px;
	width: auto;
	object-fit: contain;
}

.av-header-bal {
	display: none;
	align-items: center;
	gap: 6px;
	background: #101112;
	border: 1px solid var(--border);
	padding: 6px 16px;
	border-radius: 50px;
	font-size: 14px;
	font-weight: 800;
	color: #28a909;
}

.av-header-bal.show {
	display: flex;
}

.av-header-right {
	display: flex;
	align-items: center;
	gap: 10px;
}

.av-hbtn {
	padding: 7px 18px;
	border-radius: 50px;
	border: none;
	font-family: var(--font);
	font-weight: 600;
	font-size: 12px;
	cursor: pointer;
	transition: all 0.2s;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.av-hbtn-support {
	background: transparent;
	color: var(--text2);
	border: 1px solid var(--border);
}

.av-hbtn-support:hover {
	color: #fff;
	border-color: rgba(255, 255, 255, 0.2);
}

.av-hbtn-login {
	background: transparent;
	color: var(--green);
	border: 1px solid var(--green);
}

.av-hbtn-login:hover {
	background: rgba(40, 169, 9, 0.1);
}

.av-hbtn-signup {
	background: var(--red);
	color: #fff;
	border: 1px solid var(--red);
}

.av-hbtn-signup:hover {
	background: #d1364a;
}

.av-hbtn-sound {
	background: transparent;
	color: var(--text2);
	border: 1px solid var(--border);
	width: 36px;
	height: 36px;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: all 0.2s;
}

.av-hbtn-sound:hover {
	color: #fff;
	border-color: rgba(255, 255, 255, 0.2);
	background: rgba(255, 255, 255, 0.05);
}

.av-hbtn-sound.muted {
	color: var(--red);
	border-color: var(--red);
}

.av-user-wrap {
	position: relative;
	display: none;
}

.av-user-wrap.show {
	display: block;
}

.av-avatar-btn {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 2px solid var(--green);
	background: var(--bg3);
	color: #fff;
	font-weight: 800;
	font-size: 14px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: 0.2s;
	font-family: var(--font);
}

.av-avatar-btn:hover {
	transform: scale(1.1);
	box-shadow: 0 0 12px var(--green-glow);
}

.av-dropdown {
	position: absolute;
	top: 46px;
	right: 0;
	width: 220px;
	background: #1e1838;
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 8px;
	box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
	display: none;
	z-index: 600;
	animation: ddFade 0.15s ease;
}

@keyframes ddFade {
	from {
		opacity: 0;
		transform: translateY(-6px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.av-dropdown.open {
	display: block;
}

.av-dd-header {
	padding: 10px 12px;
	border-bottom: 1px solid var(--border);
	margin-bottom: 4px;
}

.av-dd-name {
	font-weight: 700;
	font-size: 14px;
	color: #fff;
}

.av-dd-email {
	font-size: 11px;
	color: var(--text3);
	margin-top: 2px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.av-dd-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 12px;
	border-radius: 8px;
	color: var(--text2);
	font-size: 13px;
	font-weight: 500;
	text-decoration: none;
	transition: 0.15s;
}

.av-dd-item:hover {
	background: rgba(255, 255, 255, 0.06);
	color: #fff;
}

.av-dd-item.logout {
	color: var(--red);
	border-top: 1px solid var(--border);
	margin-top: 4px;
	padding-top: 12px;
}

.av-dd-item.logout:hover {
	background: rgba(231, 64, 87, 0.1);
}

.av-auth-btns {
	display: flex;
	gap: 8px;
	align-items: center;
}

.av-auth-btns.hide {
	display: none;
}

.av-hbar {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 0 16px;
	height: 32px;
	background: var(--bg2);
	border-bottom: 1px solid var(--border);
	overflow-x: auto;
	scrollbar-width: none;
}

.av-hbar::-webkit-scrollbar {
	display: none;
}

.av-hchip {
	padding: 3px 10px;
	border-radius: 10px;
	font-size: 11px;
	font-weight: 700;
	white-space: nowrap;
	flex-shrink: 0;
	font-variant-numeric: tabular-nums;
	cursor: default;
}

.av-hchip.low {
	background: #101112;
	color: #413cfd;
}

.av-hchip.mid {
	background: #101112;
	color: #913ef8;
}

.av-hchip.high {
	background: #101112;
	color: #c017b1;
}

.av-hchip.mega {
	background: #101112;
	color: #c017b1;
}

.av-main {
	display: flex;
	margin: 0;
	padding: 10px;
	gap: 10px;
	height: calc(100vh - 56px - 35px);
	min-height: 500px;
	width: 100%;
}

.av-sidebar {
	width: 260px;
	background: #101112;
	border-radius: var(--radius);
	border: none;
	display: flex;
	flex-direction: column;
	flex-shrink: 0;
	overflow: hidden;
}

.av-stabs {
	display: flex;
	background: #000000;
	border-radius: 50px;
	margin: 10px;
	padding: 4px;
}

.av-stab {
	flex: 1;
	padding: 8px 4px;
	font-size: 11px;
	font-weight: 600;
	color: var(--text3);
	background: transparent;
	border: none;
	border-radius: 50px;
	cursor: pointer;
	font-family: var(--font);
	transition: 0.2s;
}

.av-stab:hover {
	color: var(--text2);
}

.av-stab.on {
	background: #424548;
	color: #fff;
}

.av-sinfo {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 12px;
	border-bottom: 1px solid var(--border);
	font-size: 11px;
	color: var(--text3);
}

.av-sheader {
	display: grid;
	grid-template-columns: 1fr 62px 44px 62px;
	padding: 6px 12px;
	font-size: 9px;
	font-weight: 600;
	color: var(--text3);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	border-bottom: 1px solid var(--border);
}

.av-slist {
	flex: 1;
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.av-srow {
	display: grid;
	grid-template-columns: 1fr 62px 44px 62px;
	padding: 8px 12px;
	font-size: 11px;
	background: #000000;
	border-radius: 50px;
	margin: 4px 8px;
	align-items: center;
}

.av-srow:hover {
	background: rgba(255, 255, 255, 0.03);
}

.av-srow-user {
	display: flex;
	align-items: center;
	gap: 6px;
}

.av-srow-av {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 9px;
	font-weight: 700;
	flex-shrink: 0;
}

.av-srow-name {
	font-weight: 500;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 80px;
}

.av-srow .win {
	color: var(--green);
	font-weight: 600;
}

.av-srow .lost {
	color: var(--text3);
}

.av-sfooter {
	padding: 8px 12px;
	text-align: center;
	font-size: 9px;
	color: var(--text3);
	border-top: 1px solid var(--border);
}

.av-game {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-width: 0;
}

.av-canvas-wrap {
	flex: 1;
	position: relative;
	overflow: hidden;
	border-radius: var(--radius);
	border: 1px solid var(--border);
	min-height: 280px;
	background: radial-gradient(circle at center, #10243d 0%, #04060c 70%);
}

/* ROTATING RAYS */
.rays {
	position: absolute;
	inset: -60%;
	background: repeating-conic-gradient(
		rgba(255, 255, 255, .05) 0deg,
		rgba(255, 255, 255, .01) 8deg,
		transparent 8deg,
		transparent 18deg
	);
	animation: spin 40s linear infinite;
	opacity: .22;
	pointer-events: none;
}

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

/* RED GLOW */
.red-glow {
	position: absolute;
	bottom: -350px;
	left: -350px;
	width: 1200px;
	height: 1200px;
	background: radial-gradient(circle, rgba(255, 0, 0, .22), transparent 70%);
	z-index: 1;
	pointer-events: none;
}

#gc {
	display: block;
	width: 100%;
	height: 100%;
}

.av-mult {
	position: absolute;
	top: 45%;
	left: 50%;
	transform: translate(-50%, -50%);
	text-align: center;
	pointer-events: none;
	z-index: 10;
}

.av-mult-val {
	font-size: 110px;
	font-weight: 900;
	color: #fff;
	text-shadow: 0 0 10px rgba(255,255,255,.6), 0 0 40px rgba(255,255,255,.35);
	line-height: 1;
	font-variant-numeric: tabular-nums;
	letter-spacing: -2px;
}

.av-mult-val.red {
	color: #2641BE;
	text-shadow: 0 0 40px rgba(38, 65, 190, 0.5);
}

.av-wait {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	text-align: center;
	z-index: 10;
}

.av-wait-text {
	font-size: 14px;
	font-weight: 700;
	color: rgba(255, 255, 255, 0.8);
	margin-bottom: 18px;
	text-transform: uppercase;
	letter-spacing: 3px;
}

.av-wait-bar-wrap {
	width: 220px;
	height: 6px;
	background: rgba(0, 0, 0, 0.3);
	border-radius: 3px;
	overflow: hidden;
	margin: 0 auto 12px;
}

.av-wait-fill {
	height: 100%;
	background: linear-gradient(90deg, var(--red), #ff6b7a);
	border-radius: 3px;
	width: 100%;
}

.av-wait-cd {
	font-size: 18px;
	font-weight: 800;
	color: rgba(255, 255, 255, 0.7);
	font-variant-numeric: tabular-nums;
}

.av-crash {
	position: absolute;
	top: 45%;
	left: 50%;
	transform: translate(-50%, -50%);
	text-align: center;
	z-index: 10;
	animation: crashPulse 0.5s ease;
}

.av-crash-label {
	font-size: 32px;
	font-weight: 800;
	color: #ff2d55;
	text-transform: uppercase;
	letter-spacing: 4px;
	margin-bottom: 6px;
	text-shadow: 0 0 20px red, 0 0 60px red;
}

.av-crash-val {
	font-size: 80px;
	font-weight: 900;
	color: #ff2d55;
	text-shadow: 0 0 20px red, 0 0 60px red;
	font-variant-numeric: tabular-nums;
	letter-spacing: -2px;
}

@keyframes crashPulse {
	0% {
		transform: translate(-50%, -50%) scale(0.5);
		opacity: 0;
	}

	50% {
		transform: translate(-50%, -50%) scale(1.1);
	}

	100% {
		transform: translate(-50%, -50%) scale(1);
		opacity: 1;
	}
}

.hide {
	display: none !important;
}

#toastBox {
	position: fixed;
	top: 70px;
	right: 20px;
	z-index: 1000;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.av-toast {
	padding: 12px 20px;
	border-radius: 12px;
	font-size: 13px;
	font-weight: 800;
	font-family: var(--font);
	color: #000;
	background: #f8fe03;
	animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
	pointer-events: none;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
	border: 1px solid rgba(0,0,0,0.1);
}

.av-toast.win, 
.av-toast.lose, 
.av-toast.placed, 
.av-toast.cancel-t {
	background: #f8fe03;
	color: #000;
}

@keyframes toastIn {
	from {
		opacity: 0;
		transform: translateX(40px);
	}

	to {
		opacity: 1;
		transform: translateX(0);
	}
}

@keyframes toastOut {
	from {
		opacity: 1;
	}

	to {
		opacity: 0;
		transform: translateY(-10px);
	}
}

.av-bets {
	display: flex;
	gap: 10px;
}

.av-bpanel {
	flex: 1;
	background: #141518;
	border-radius: 20px;
	border: 1px solid rgba(255, 255, 255, 0.05);
	overflow: hidden;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
	padding: 1px;
}

.av-bptabs {
	display: flex;
	background: #000000;
	border-radius: 50px;
	margin: 12px auto 0;
	width: 65%;
	max-width: 200px;
	padding: 3px;
	border: 1px solid rgba(255, 255, 255, 0.04);
}

.av-bptab {
	flex: 1;
	padding: 6px 0;
	font-size: 11px;
	font-weight: 700;
	color: #7b7e85;
	background: transparent;
	border: none;
	border-radius: 50px;
	cursor: pointer;
	font-family: var(--font);
	transition: all 0.2s ease;
	text-align: center;
}

.av-bptab:hover {
	color: #ffffff;
}

.av-bptab.on {
	background: #2c2d30;
	color: #ffffff;
}

.av-bpbody {
	padding: 12px;
	display: flex;
	gap: 12px;
	align-items: stretch;
}

.av-bpleft {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.av-amt-row {
	display: flex;
	align-items: center;
	background: #000000;
	border-radius: 50px;
	padding: 3px 6px;
	border: 1.5px solid rgba(255, 255, 255, 0.08);
	position: relative;
	height: 44px;
}

.av-amt-btn {
	width: 28px;
	height: 28px;
	background: #2b2d30;
	border: none;
	border-radius: 50%;
	color: #ffffff;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-left: 5px;
	transition: all 0.2s ease;
}

.av-amt-btn:hover {
	background: #3d3f44;
	transform: scale(1.05);
}

/* Visually place the minus and plus side-by-side on the right of the black pill */
.av-amt-btn:first-of-type {
	order: 2; /* Minus */
}

.av-amt-btn:last-of-type {
	order: 3; /* Plus */
}

.av-amt-input {
	order: 1;
	flex: 1;
	height: 100%;
	background: transparent;
	border: none;
	color: #ffffff;
	font-size: 18px;
	font-weight: 900;
	text-align: left;
	padding-left: 14px;
	outline: none;
	font-family: var(--font);
	min-width: 0;
}

.av-amt-input:focus {
	border-color: transparent;
}

.av-presets {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	margin-top: 6px;
}

.av-pr {
	flex: 0 0 calc(50% - 3px);
	padding: 8px 0;
	background: #212225;
	border: none;
	border-radius: 50px;
	color: #8c8e93;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	font-family: var(--font);
	text-align: center;
	transition: all 0.2s ease;
}

.av-pr:hover {
	background: #2c2d32;
	color: #ffffff;
}

.av-auto-row {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	color: var(--text3);
}

.av-toggle {
	width: 28px;
	height: 16px;
	background: rgba(255, 255, 255, 0.15);
	border-radius: 10px;
	border: none;
	cursor: pointer;
	position: relative;
}

.av-toggle::after {
	content: '';
	position: absolute;
	width: 12px;
	height: 12px;
	background: #fff;
	border-radius: 50%;
	top: 2px;
	left: 2px;
	transition: 0.2s;
}

.av-toggle.on {
	background: var(--green);
}

.av-toggle.on::after {
	left: 14px;
}

.av-auto-input {
	width: 50px;
	height: 24px;
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: 4px;
	color: #fff;
	font-size: 11px;
	text-align: center;
	font-family: var(--font);
	outline: none;
}

.av-bet-btn {
	min-width: 130px;
	border-radius: 20px;
	border: none;
	cursor: pointer;
	font-family: var(--font);
	font-weight: 800;
	transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
	position: relative;
	overflow: hidden;
	align-self: stretch;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
}

.av-bet-btn.bet {
	background: linear-gradient(135deg, #44b21b, #39a312);
	color: #ffffff;
	box-shadow: 0 6px 20px rgba(68, 178, 27, 0.45);
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.av-bet-btn.bet:hover {
	transform: translateY(-2px) scale(1.02);
	box-shadow: 0 10px 25px rgba(68, 178, 27, 0.6);
	background: linear-gradient(135deg, #4dc621, #3fae15);
}

.av-bet-btn.bet:active {
	transform: translateY(0) scale(0.98);
}

.av-bet-btn.cashout {
	background: linear-gradient(135deg, #ff9a00, #e68a00);
	box-shadow: 0 6px 20px rgba(255, 154, 0, 0.45);
	border: 1px solid rgba(255, 255, 255, 0.15);
	animation: pulseCashout 1.2s ease infinite;
}

.av-bet-btn.cashout:hover {
	transform: translateY(-2px) scale(1.02);
	box-shadow: 0 10px 25px rgba(255, 154, 0, 0.6);
}

.av-bet-btn.cashout .btn-label,
.av-bet-btn.cashout .btn-sub {
	color: #000000;
}

@keyframes pulseCashout {
	0%, 100% {
		box-shadow: 0 6px 20px rgba(255, 154, 0, 0.4);
	}
	50% {
		box-shadow: 0 6px 30px rgba(255, 154, 0, 0.65);
	}
}

.av-bet-btn.cancel {
	background: linear-gradient(135deg, #d0190c, #b51206);
	box-shadow: 0 6px 20px rgba(208, 25, 12, 0.35);
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.av-bet-btn.cancel:hover {
	transform: translateY(-2px) scale(1.02);
	box-shadow: 0 10px 25px rgba(208, 25, 12, 0.5);
}

.av-bet-btn .btn-label {
	font-size: 18px;
	font-weight: 900;
	letter-spacing: 0.5px;
	color: #ffffff;
}

.av-bet-btn .btn-sub {
	font-size: 11px;
	font-weight: 700;
	opacity: 0.9;
	color: rgba(255, 255, 255, 0.85);
}

@media (max-width: 1024px) {
	.av-sidebar {
		display: none;
	}

	.av-main {
		height: auto;
		min-height: calc(100vh - 56px - 35px);
	}
}

@media (max-width: 768px) {
	.av-header {
		height: 50px;
	}
	.av-hbar {
		height: 30px;
	}

	.av-main {
		padding: 6px;
		gap: 6px;
		height: calc(100dvh - 50px - 30px);
		min-height: 0;
	}

	.av-canvas-wrap {
		min-height: 240px;
	}

	.av-mult-val {
		font-size: 48px;
	}

	.av-crash-val {
		font-size: 42px;
	}
}

@media (max-width: 600px) {
	.av-bets {
		flex-direction: column;
		gap: 6px;
	}

	.av-bpanel {
		min-width: 0;
	}

	.av-header {
		padding: 0 10px;
		height: 44px;
	}
	
	.av-hbar {
		height: 26px;
		padding: 0 10px;
	}

	.av-main {
		padding: 4px;
		gap: 4px;
		flex-direction: column;
		height: calc(100dvh - 44px - 26px);
		overflow: hidden;
	}

	.av-canvas-wrap {
		min-height: 160px;
		flex: 1;
	}

	.av-bets {
		flex-shrink: 0;
		height: auto;
	}

	.av-hbar {
		padding: 4px 10px;
	}

	.av-mult-val {
		font-size: 36px;
	}

	.av-crash-val {
		font-size: 32px;
	}
}

@media (max-width: 400px) {
	.av-header-bal {
		padding: 4px 10px;
		font-size: 11px;
	}

	.av-bpbody {
		padding: 8px;
		gap: 8px;
	}

	.av-amt-btn {
		width: 26px;
		height: 30px;
	}

	.av-pr {
		font-size: 10px;
	}

	.av-bet-btn {
		min-width: 80px;
		padding: 0 10px;
	}

	.av-bet-btn .btn-label {
		font-size: 11px;
	}
}