/* 中奖弹窗 v4 — 多球自适应布局 */
.win-notify-mask {
	position: fixed;
	inset: 0;
	z-index: 99998;
	background: rgba(0, 0, 0, 0.55);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	display: none;
}

.win-notify-box {
	position: fixed;
	left: 50%;
	top: 50%;
	z-index: 99999;
	width: 72%;
	max-width: 300px;
	max-height: 80vh;
	overflow: hidden;
	transform: translate(-50%, -48%) scale(0.94);
	opacity: 0;
	border-radius: 14px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
	display: none;
	font-family: "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
	background: #fff;
}

.win-notify-box.wn-many-balls {
	max-width: 320px;
}

.win-notify-box.wn-show {
	transform: translate(-50%, -50%) scale(1);
	opacity: 1;
	transition: transform 0.26s cubic-bezier(0.34, 1.2, 0.64, 1), opacity 0.22s ease;
}

/* ── 头部 ── */
.win-notify-head {
	padding: 16px 14px 14px;
	color: #fff;
	text-align: center;
	background: linear-gradient(160deg, #5c5c5c 0%, #3a3a3a 100%);
}

.win-notify-box.win .win-notify-head {
	background: linear-gradient(160deg, #ff8f00 0%, #e53935 55%, #b71c1c 100%);
}

.win-notify-head h3 {
	margin: 0;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: 0.5px;
}

.win-notify-head p {
	margin: 4px 0 0;
	font-size: 11px;
	opacity: 0.82;
	font-weight: 400;
}

/* ── 开奖号 ── */
.win-notify-haoma {
	padding: 14px 10px 12px;
	background: #f7f8fa;
	border-bottom: 1px solid #eceef2;
	text-align: center;
	overflow: visible;
}

.win-notify-haoma .balls {
	display: flex;
	flex-wrap: nowrap;
	justify-content: center;
	align-items: center;
	gap: 0;
	line-height: 1;
	max-width: 100%;
}

/* 4~6 球：单行紧凑，无加号 */
.win-notify-haoma .balls.wn-mode-compact {
	flex-wrap: wrap;
	gap: 4px;
}

/* 7+ 球：两排网格 */
.win-notify-haoma .balls.wn-mode-grid {
	flex-wrap: wrap;
	justify-content: center;
	align-content: center;
	gap: 5px 4px;
	max-width: 100%;
}

/* 正圆球：默认（formula 三球公式） */
.win-notify-haoma .balls .wn-ball,
#win-notify-box .wn-ball {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 34px !important;
	height: 34px !important;
	min-width: 34px !important;
	max-width: 34px !important;
	min-height: 34px !important;
	max-height: 34px !important;
	padding: 0 !important;
	margin: 0 2px;
	border-radius: 50% !important;
	box-sizing: border-box;
	flex-shrink: 0;
	font-style: normal;
	font-size: 15px;
	font-weight: 700;
	color: #fff;
	line-height: 1;
	background: radial-gradient(circle at 35% 30%, #6ec6ff 0%, #1e88e5 45%, #1565c0 100%);
	box-shadow: 0 2px 6px rgba(21, 101, 192, 0.35), inset 0 -2px 4px rgba(0, 0, 0, 0.12), inset 0 1px 2px rgba(255, 255, 255, 0.35);
}

/* compact 模式略小 */
.win-notify-haoma .balls.wn-mode-compact .wn-ball,
#win-notify-box .wn-mode-compact .wn-ball {
	width: 30px !important;
	height: 30px !important;
	min-width: 30px !important;
	max-width: 30px !important;
	min-height: 30px !important;
	max-height: 30px !important;
	margin: 0;
	font-size: 14px;
}

/* grid 模式更小，两排放下 */
.win-notify-haoma .balls.wn-mode-grid .wn-ball,
#win-notify-box .wn-mode-grid .wn-ball {
	width: 26px !important;
	height: 26px !important;
	min-width: 26px !important;
	max-width: 26px !important;
	min-height: 26px !important;
	max-height: 26px !important;
	margin: 0;
	font-size: 12px;
}

/* 两位数号码（如 10）缩小字号 */
.win-notify-haoma .balls .wn-ball.wn-ball-db,
#win-notify-box .wn-ball.wn-ball-db {
	font-size: 11px !important;
}

.win-notify-haoma .balls.wn-mode-compact .wn-ball.wn-ball-db,
#win-notify-box .wn-mode-compact .wn-ball.wn-ball-db {
	font-size: 10px !important;
}

.win-notify-haoma .balls.wn-mode-grid .wn-ball.wn-ball-db,
#win-notify-box .wn-mode-grid .wn-ball.wn-ball-db {
	font-size: 9px !important;
}

.win-notify-haoma .balls .wn-ball.wn-special,
#win-notify-box .wn-ball.wn-special {
	background: radial-gradient(circle at 35% 30%, #ffab91 0%, #ff5722 45%, #d84315 100%);
	box-shadow: 0 2px 6px rgba(216, 67, 21, 0.35), inset 0 -2px 4px rgba(0, 0, 0, 0.12), inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.win-notify-haoma .balls .wn-op,
#win-notify-box .wn-op {
	display: inline-block;
	width: auto !important;
	height: auto !important;
	min-width: 0 !important;
	max-width: none !important;
	padding: 0 3px !important;
	margin: 0;
	border-radius: 0 !important;
	background: none !important;
	box-shadow: none !important;
	color: #b0b8c4;
	font-size: 13px;
	font-weight: 500;
	font-style: normal;
	line-height: 34px;
	vertical-align: middle;
	flex-shrink: 0;
}

.win-notify-haoma .balls .wn-ball.wn-sum,
#win-notify-box .wn-ball.wn-sum {
	background: radial-gradient(circle at 35% 30%, #ffe082 0%, #ffa000 45%, #ff8f00 100%);
	color: #fff;
	box-shadow: 0 2px 6px rgba(255, 143, 0, 0.35), inset 0 -2px 4px rgba(0, 0, 0, 0.1), inset 0 1px 2px rgba(255, 255, 255, 0.35);
}

.win-notify-haoma .sum {
	display: block;
	margin-top: 6px;
	font-size: 11px;
	color: #9aa3af;
	letter-spacing: 0.3px;
}

/* ── 注单列表 ── */
.win-notify-list {
	max-height: 32vh;
	overflow-y: auto;
	padding: 0;
	background: #fff;
}

.win-notify-item {
	display: flex;
	align-items: center;
	padding: 10px 14px;
	border-bottom: 1px solid #f2f3f5;
	font-size: 13px;
}

.win-notify-item:last-child {
	border-bottom: none;
}

.win-notify-item .label {
	flex: 1;
	color: #333;
	font-weight: 500;
	word-break: break-all;
	padding-right: 6px;
	line-height: 1.35;
}

.win-notify-item .stake {
	width: 56px;
	text-align: right;
	color: #aaa;
	font-size: 12px;
	flex-shrink: 0;
}

.win-notify-item .result {
	min-width: 52px;
	text-align: right;
	font-weight: 600;
	font-size: 12px;
	flex-shrink: 0;
}

.win-notify-item .result.win {
	color: #e53935;
}

.win-notify-item .result.lose {
	color: #c5c5c5;
}

.win-notify-item .result.push {
	color: #ff9800;
}

/* ── 底部 ── */
.win-notify-foot {
	padding: 12px 14px 16px;
	background: #fff;
	text-align: center;
}

.win-notify-total {
	display: inline-block;
	padding: 6px 16px;
	margin-bottom: 12px;
	border-radius: 20px;
	font-size: 14px;
	font-weight: 600;
	background: #f3f4f6;
	color: #666;
}

.win-notify-total.positive {
	background: linear-gradient(135deg, #fff8e1, #ffe082);
	color: #e65100;
}

.win-notify-total.negative {
	background: #f3f4f6;
	color: #888;
}

.win-notify-close {
	display: inline-block;
	min-width: 140px;
	padding: 10px 28px;
	border: none;
	border-radius: 22px;
	background: linear-gradient(180deg, #ef5350 0%, #c62828 100%);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	letter-spacing: 1px;
	box-shadow: 0 4px 12px rgba(198, 40, 40, 0.28);
}

.win-notify-box.win .win-notify-close {
	background: linear-gradient(180deg, #ffb300 0%, #f57c00 100%);
	box-shadow: 0 4px 12px rgba(245, 124, 0, 0.28);
}

.win-notify-close:active {
	transform: scale(0.97);
}

@media (max-width: 480px) {
	.win-notify-box {
		width: 78%;
		max-width: 290px;
	}

	.win-notify-box.wn-many-balls {
		max-width: 310px;
	}

	.win-notify-haoma .balls.wn-mode-formula .wn-ball,
	#win-notify-box .wn-mode-formula .wn-ball {
		width: 32px !important;
		height: 32px !important;
		min-width: 32px !important;
		max-width: 32px !important;
		min-height: 32px !important;
		max-height: 32px !important;
		font-size: 14px;
	}

	.win-notify-haoma .balls.wn-mode-formula .wn-op,
	#win-notify-box .wn-mode-formula .wn-op {
		line-height: 32px;
		font-size: 12px;
	}

	.win-notify-haoma .balls.wn-mode-compact .wn-ball,
	#win-notify-box .wn-mode-compact .wn-ball {
		width: 28px !important;
		height: 28px !important;
		min-width: 28px !important;
		max-width: 28px !important;
		min-height: 28px !important;
		max-height: 28px !important;
		font-size: 13px;
	}

	.win-notify-haoma .balls.wn-mode-grid .wn-ball,
	#win-notify-box .wn-mode-grid .wn-ball {
		width: 24px !important;
		height: 24px !important;
		min-width: 24px !important;
		max-width: 24px !important;
		min-height: 24px !important;
		max-height: 24px !important;
		font-size: 11px;
	}
}
