@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Rajdhani:wght@500;600&display=swap');

.duel-bracket-wrap {
	overflow-x: auto;
	padding: 16px 0;
	-webkit-overflow-scrolling: touch;
}

.duel-bracket-wrap.is-fullwidth {
	padding-left: 0;
	padding-right: 0;
	overflow-x: auto;
	overflow-y: visible;
}

.duel-bracket-wrap.is-fullwidth:not(.alignfull) {
	position: relative;
	left: 50%;
	right: 50%;
	width: 100vw;
	max-width: 100vw;
	margin-left: -50vw;
	margin-right: -50vw;
}

.duel-bracket-wrap.is-fullwidth.alignfull {
	position: relative;
	left: auto;
	right: auto;
	width: 100%;
	max-width: 100%;
	margin-left: 0;
	margin-right: 0;
}

.duel-bracket-wrap.is-fullwidth .duel-bracket-frame {
	display: inline-block;
	width: max-content;
	max-width: none;
	border-radius: 0;
}

body.duel-bracket-fullwidth [class*=\"ct-container\"],
body.duel-bracket-fullwidth .entry-content,
body.duel-bracket-fullwidth .wp-block-group,
body.duel-bracket-fullwidth .wp-block-group__inner-container {
\toverflow: visible !important;
}

.duel-bracket-frame {
	position: relative;
	border-radius: 18px;
	padding: 24px 28px 30px;
	min-width: 980px;
	background: radial-gradient(circle at 35% 30%, #162d4a 0%, #0b1b2e 55%, #081320 100%);
	box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45);
	overflow: hidden;
}

.duel-bracket-frame::before {
	content: '';
	position: absolute;
	inset: -10% -10% -10% -10%;
	background-image:
		radial-gradient(circle at 20% 30%, rgba(80, 140, 190, 0.35) 0%, transparent 45%),
		radial-gradient(circle at 70% 25%, rgba(60, 120, 170, 0.25) 0%, transparent 40%),
		radial-gradient(circle at 55% 70%, rgba(50, 110, 160, 0.2) 0%, transparent 50%),
		radial-gradient(circle at 85% 60%, rgba(30, 70, 110, 0.2) 0%, transparent 45%);
	opacity: 0.8;
	pointer-events: none;
}

.duel-bracket-frame::after {
	content: '';
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, rgba(6, 12, 20, 0.6) 0%, rgba(6, 12, 20, 0.35) 55%, rgba(6, 12, 20, 0.6) 100%),
		linear-gradient(90deg, rgba(5, 10, 17, 0.85) 0%, rgba(5, 10, 17, 0) 12%, rgba(5, 10, 17, 0) 88%, rgba(5, 10, 17, 0.85) 100%);
	pointer-events: none;
}

.duel-bracket-header {
	position: relative;
	z-index: 2;
	text-align: center;
	margin-bottom: 18px;
}

.duel-mobile-label {
	display: none;
	font-family: 'Rajdhani', 'Segoe UI', sans-serif;
	font-size: 12px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(230, 240, 255, 0.7);
	margin: 4px 0 8px;
}

.duel-bracket-mobile-nav {
	display: none;
	position: relative;
	z-index: 2;
	justify-content: center;
	gap: 8px;
	margin: 0 auto 12px;
	flex-wrap: wrap;
}

.duel-nav-btn {
	background: rgba(18, 40, 64, 0.85);
	color: rgba(230, 240, 255, 0.9);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 999px;
	padding: 6px 12px;
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
}

.duel-nav-btn:active {
	transform: translateY(1px);
}

.duel-bracket-title {
	margin: 0;
	font-family: 'Bebas Neue', 'Oswald', sans-serif;
	font-size: 46px;
	letter-spacing: 0.14em;
	color: #f5f7ff;
	text-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}

.duel-bracket {
	--slot-height: 24px;
	--slot-gap: 6px;
	--round-gap: 16px;
	--connector-length: 10px;
	--slot-width: 120px;
	--center-width: 180px;
	--match-height: calc(var(--slot-height) * 2 + var(--slot-gap));
	--gap-r32: 8px;
	--gap-r16: calc((var(--match-height) + (var(--gap-r32) * 4)) / 2);
	--gap-qf: calc((var(--match-height) + (var(--gap-r16) * 4)) / 2);
	--gap-sf: calc((var(--match-height) + (var(--gap-qf) * 4)) / 2);
	--side-gap: calc(var(--connector-length) * 2 + var(--round-gap));
	--side-width: calc(var(--slot-width) * 4 + var(--side-gap) * 3);
	--line-color: rgba(255, 255, 255, 0.18);
	--slot-bg: rgba(28, 57, 86, 0.85);
	--slot-bg-hover: rgba(50, 96, 138, 0.95);
	--slot-border: rgba(255, 255, 255, 0.1);
	--text: #e4efff;
	--muted: rgba(220, 235, 250, 0.4);
	position: relative;
	z-index: 2;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 18px;
	width: max-content;
	min-width: 900px;
	color: var(--text);
}

.duel-bracket-wrap.is-fullwidth .duel-bracket-frame {
	padding-left: 18px;
	padding-right: 18px;
}

.duel-bracket-wrap.is-fullwidth .duel-bracket {
	gap: 14px;
}

.duel-side {
	display: flex;
	gap: calc(var(--connector-length) * 2 + var(--round-gap));
	align-items: center;
	width: var(--side-width);
	flex: 0 0 var(--side-width);
}

.duel-side.duel-right {
	flex-direction: row-reverse;
}

.duel-round {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.duel-round.round-r32 .duel-match {
	margin: var(--gap-r32) 0;
}

.duel-round.round-r16 {
	padding-top: calc((var(--match-height) + (var(--gap-r32) * 2)) / 2);
}

.duel-round.round-r16 .duel-match {
	margin: var(--gap-r16) 0;
}

.duel-round.round-qf {
	padding-top: calc((var(--match-height) + (var(--gap-r16) * 2)) / 2);
}

.duel-round.round-qf .duel-match {
	margin: var(--gap-qf) 0;
}

.duel-round.round-sf {
	padding-top: calc((var(--match-height) + (var(--gap-qf) * 2)) / 2);
}

.duel-round.round-sf .duel-match {
	margin: var(--gap-sf) 0;
}

.duel-center {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 12px;
	width: var(--center-width);
	flex: 0 0 var(--center-width);
}

.duel-final-slot {
	width: var(--center-width);
	display: flex;
	justify-content: center;
}

.duel-center::before {
	content: '';
	position: absolute;
	top: -12px;
	bottom: -12px;
	width: 2px;
	background: rgba(255, 255, 255, 0.25);
	left: 50%;
	transform: translateX(-50%);
}

.duel-round.round-final .duel-match {
	margin: 0;
}

.duel-match {
	display: flex;
	flex-direction: column;
	gap: var(--slot-gap);
	position: relative;
}

.duel-slot {
	min-height: var(--slot-height);
	background: var(--slot-bg);
	color: var(--text);
	border: 1px solid var(--slot-border);
	border-radius: 3px;
	padding: 3px 12px;
	text-align: left;
	font-size: 11px;
	line-height: 1.1;
	display: flex;
	align-items: center;
	width: var(--slot-width);
	box-sizing: border-box;
	font-family: 'Rajdhani', 'Segoe UI', sans-serif;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.duel-slot:not(.is-empty) {
	box-shadow: 0 6px 14px rgba(6, 16, 28, 0.35);
}

.duel-slot.slot-r16 {
	background: rgba(18, 40, 64, 0.75);
	color: rgba(214, 230, 245, 0.6);
	border-color: rgba(255, 255, 255, 0.08);
	width: calc(var(--slot-width) - 10px);
	min-height: 24px;
	font-size: 11px;
}

.duel-slot.slot-r32 {
\tbackground: rgba(15, 32, 50, 0.7);
\tcolor: rgba(210, 225, 240, 0.55);
\tborder-color: rgba(255, 255, 255, 0.06);
\twidth: calc(var(--slot-width) - 14px);
\tmin-height: 23px;
\tfont-size: 10.5px;
}

.duel-slot.slot-r32:not(.is-empty) {
\tbackground: rgba(28, 72, 112, 0.9);
\tcolor: #f0f6ff;
\tborder-color: rgba(255, 255, 255, 0.18);
}

.duel-slot.slot-r16:not(.is-empty) {
	background: rgba(32, 78, 122, 0.95);
	color: #f0f6ff;
	border-color: rgba(255, 255, 255, 0.18);
}

.duel-slot.slot-qf {
	background: rgba(30, 70, 105, 0.95);
	color: #f0f6ff;
	width: var(--slot-width);
	min-height: 26px;
}

.duel-slot.slot-qf:not(.is-empty) {
	background: rgba(46, 110, 165, 0.98);
	color: #ffffff;
	border-color: rgba(255, 255, 255, 0.22);
}

.duel-slot.slot-sf {
	background: rgba(26, 60, 90, 0.8);
	color: rgba(230, 240, 255, 0.78);
	width: calc(var(--slot-width) - 6px);
	min-height: 25px;
}

.duel-slot.slot-sf:not(.is-empty) {
	background: rgba(38, 92, 138, 0.95);
	color: #f2f7ff;
	border-color: rgba(255, 255, 255, 0.2);
}

.duel-slot.slot-final {
	background: rgba(28, 65, 98, 0.85);
	color: rgba(235, 245, 255, 0.9);
	width: calc(var(--slot-width) - 4px);
	min-height: 26px;
}

.duel-slot.slot-final:not(.is-empty) {
	background: rgba(43, 102, 152, 0.98);
	color: #ffffff;
	border-color: rgba(255, 255, 255, 0.22);
}

button.duel-slot {
	appearance: none;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}

button.duel-slot:hover,
button.duel-slot:focus-visible {
	background: var(--slot-bg-hover);
	outline: none;
	transform: translateY(-1px);
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.35);
}

.duel-slot.is-empty {
	background: rgba(255, 255, 255, 0.05);
	color: var(--muted);
	border: 1px solid rgba(255, 255, 255, 0.07);
}

.duel-slot.is-empty.slot-r16 {
	background: rgba(20, 38, 58, 0.55);
}

.duel-slot.is-empty.slot-r32 {
\tbackground: rgba(16, 30, 46, 0.45);
}

.duel-slot.is-empty.slot-qf,
.duel-slot.is-empty.slot-sf,
.duel-slot.is-empty.slot-final {
	background: rgba(28, 55, 82, 0.35);
}

.duel-side.duel-left .duel-slot::after,
.duel-side.duel-right .duel-slot::after {
	content: '';
	position: absolute;
	top: 50%;
	width: var(--connector-length);
	height: 1px;
	background: var(--line-color);
}

.duel-side.duel-left .duel-slot::after {
	right: calc(-1 * var(--connector-length));
}

.duel-side.duel-right .duel-slot::after {
	left: calc(-1 * var(--connector-length));
}

.duel-side.duel-left .duel-match::before,
.duel-side.duel-right .duel-match::before {
	content: '';
	position: absolute;
	width: 1px;
	background: var(--line-color);
	top: calc(var(--slot-height) / 2);
	bottom: calc(var(--slot-height) / 2);
}

.duel-side.duel-left .duel-match::before {
	right: calc(-1 * var(--connector-length));
}

.duel-side.duel-right .duel-match::before {
	left: calc(-1 * var(--connector-length));
}

.duel-side.duel-left .duel-match::after,
.duel-side.duel-right .duel-match::after {
	content: '';
	position: absolute;
	top: 50%;
	width: var(--connector-length);
	height: 1px;
	background: var(--line-color);
}

.duel-side.duel-left .duel-match::after {
	right: calc(-2 * var(--connector-length));
}

.duel-side.duel-right .duel-match::after {
	left: calc(-2 * var(--connector-length));
}

.duel-winner .duel-slot {
	font-weight: 600;
	background: linear-gradient(90deg, rgba(184, 140, 74, 0.95) 0%, rgba(143, 107, 58, 0.95) 100%);
	border-color: rgba(255, 255, 255, 0.35);
	justify-content: center;
	width: var(--center-width);
	min-height: 34px;
	font-size: 13px;
}

.duel-bracket-modal {
	position: fixed;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 9999;
}

.duel-bracket-modal.is-open {
	display: flex;
}

.duel-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(6, 12, 20, 0.75);
}

.duel-modal-card {
	position: relative;
	background: #0f2238;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 12px;
	padding: 20px 56px 18px 22px;
	max-width: 520px;
	width: min(92vw, 520px);
	z-index: 1;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.duel-modal-media {
	margin: 0 0 12px;
}

.duel-modal-video {
	position: relative;
	width: 100%;
	padding-top: 56.25%;
	border-radius: 10px;
	overflow: hidden;
	background: rgba(5, 10, 16, 0.85);
}

.duel-modal-iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.duel-modal-title {
	margin: 0 0 8px;
	font-size: 20px;
}

.duel-modal-desc {
	margin: 0 0 12px;
	color: rgba(238, 243, 255, 0.85);
	font-size: 14px;
	line-height: 1.4;
}

.duel-modal-link {
	display: inline-block;
	background: #2b5c8a;
	color: #fff;
	padding: 8px 14px;
	border-radius: 6px;
	text-decoration: none;
	font-size: 14px;
}

.duel-modal-link:hover {
	background: #3670a8;
}

.duel-modal-close {
	position: absolute;
	top: 8px;
	right: 10px;
	background: transparent;
	border: none;
	color: #fff;
	font-size: 22px;
	cursor: pointer;
}

@media (max-width: 1100px) {
	.duel-bracket {
		--slot-width: 112px;
		--center-width: 170px;
	}

	.duel-bracket-frame {
		min-width: 900px;
		padding: 22px 24px 28px;
	}

	.duel-bracket-title {
		font-size: 40px;
	}

	.duel-slot {
		font-size: 10px;
	}
}

@media (max-width: 900px) {
	.duel-bracket {
		--slot-width: 104px;
		--center-width: 160px;
	}

	.duel-bracket-frame {
		min-width: 820px;
		padding: 18px 20px 24px;
	}

	.duel-bracket {
		gap: 14px;
	}

	.duel-slot {
		font-size: 10px;
	}

	.duel-bracket-mobile-nav {
		display: flex;
	}
}

@media (max-width: 760px) {
	.duel-bracket {
		--slot-width: 96px;
		--center-width: 150px;
	}

	.duel-bracket-frame {
		min-width: 720px;
		padding: 18px 18px 24px;
	}

	.duel-bracket-title {
		font-size: 34px;
	}
}

@media (max-width: 640px) {
	.duel-bracket {
		--slot-height: 30px;
		--slot-gap: 6px;
		--round-gap: 24px;
		--connector-length: 14px;
		--slot-width: 130px;
		--center-width: 190px;
	}

	.duel-bracket-frame {
		min-width: 0;
		padding: 12px 12px 18px;
	}

	.duel-bracket-title {
		font-size: 24px;
		letter-spacing: 0.1em;
	}

	.duel-nav-btn {
		font-size: 10px;
		padding: 7px 12px;
	}

	.duel-bracket {
		gap: 12px;
		justify-content: flex-start;
		margin: 0;
		min-width: 0;
		width: 100%;
		flex-direction: column;
		align-items: stretch;
	}

	.duel-side.duel-left {
		order: 1;
	}

	.duel-center {
		order: 2;
	}

	.duel-side.duel-right {
		order: 3;
	}

	.duel-side,
	.duel-center {
		width: auto;
		flex: 0 0 auto;
		align-items: stretch;
	}

	.duel-side {
		flex-direction: column;
		gap: 16px;
	}

	.duel-side.duel-right {
		flex-direction: column;
	}

	.duel-side.duel-left .round-r16 {
		order: 1;
	}

	.duel-side.duel-left .round-r32 {
		order: 0;
	}

	.duel-side.duel-left .round-qf {
		order: 2;
	}

	.duel-side.duel-left .round-sf {
		order: 3;
	}

	.duel-side.duel-right .round-sf {
		order: 1;
	}

	.duel-side.duel-right .round-qf {
		order: 2;
	}

	.duel-side.duel-right .round-r16 {
		order: 3;
	}

	.duel-side.duel-right .round-r32 {
		order: 4;
	}

	.duel-round {
		width: 100%;
	}

	.duel-match {
		width: 100%;
	}

	.duel-round.round-r32,
	.duel-round.round-r16,
	.duel-round.round-qf,
	.duel-round.round-sf {
		padding-top: 0;
	}

	.duel-round.round-r32 .duel-match,
	.duel-round.round-r16 .duel-match,
	.duel-round.round-qf .duel-match,
	.duel-round.round-sf .duel-match {
		margin: 8px 0;
	}

	.duel-slot,
	.duel-slot.slot-r16,
	.duel-slot.slot-qf,
	.duel-slot.slot-sf,
	.duel-slot.slot-final,
	.duel-winner .duel-slot {
		width: 100%;
	}

	.duel-center::before,
	.duel-side.duel-left .duel-slot::after,
	.duel-side.duel-right .duel-slot::after,
	.duel-side.duel-left .duel-match::before,
	.duel-side.duel-right .duel-match::before,
	.duel-side.duel-left .duel-match::after,
	.duel-side.duel-right .duel-match::after {
		display: none;
	}

	.duel-final-slot {
		width: 100%;
	}

	.duel-bracket-wrap {
		overflow-x: visible;
		scroll-snap-type: none;
		scroll-padding: 0;
	}

	.duel-bracket-mobile-nav {
		display: none !important;
	}

	.duel-mobile-label {
		display: none !important;
	}

	.duel-bracket-wrap {
		scroll-snap-type: none;
		scroll-padding: 0;
	}

	.duel-side,
	.duel-center {
		scroll-snap-align: center;
	}

	.duel-slot {
		font-size: 12px;
	}

	button.duel-slot:active {
		transform: scale(0.98);
	}

	.duel-bracket-modal.is-open {
		align-items: flex-end;
	}

	.duel-modal-card {
		width: 100%;
		max-width: 100%;
		border-radius: 16px 16px 0 0;
		padding: 18px 56px 24px 20px;
		max-height: 85vh;
		overflow-y: auto;
	}

	.duel-modal-close {
		top: 10px;
		right: 14px;
		font-size: 26px;
	}
}
