/**
 * KH Tube — KH MAX gamify UI (Core ile uyumlu glassmorphism + neon).
 */

/* Ecosystem çakışma kilidi */
body.kh-tube-active.kh-max-header-owned .kh-eco-header-actions,
body.kh-tube-active.kh-max-header-owned .kh-eco-balance:not(.kh-max-wallet-pill):not([data-kh-max-wallet] *) {
	display: none !important;
}

.kh-tube-header-actions .kh-max-header-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
	position: relative;
	z-index: 100020;
}

/* KH MAX CTA */
.kh-max-cta {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 16px;
	border-radius: 999px;
	text-decoration: none;
	font-weight: 800;
	font-size: 0.78rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #0b1020;
	background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 45%, #00d4ff 100%);
	box-shadow: 0 0 24px rgba(251, 191, 36, 0.35), 0 8px 20px rgba(0, 0, 0, 0.25);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	overflow: hidden;
}

.kh-max-cta:hover {
	transform: translateY(-2px);
	box-shadow: 0 0 32px rgba(0, 212, 255, 0.45), 0 12px 28px rgba(0, 0, 0, 0.35);
	color: #0b1020;
}

.kh-max-cta__glow {
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
	transform: translateX(-120%);
	animation: kh-max-shine 3.5s ease-in-out infinite;
}

@keyframes kh-max-shine {
	0% { transform: translateX(-120%); }
	55%, 100% { transform: translateX(120%); }
}

/* Header wallet pill */
.kh-max-wallet-pill {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 8px 12px;
	border-radius: 999px;
	text-decoration: none;
	font-size: 0.75rem;
	font-weight: 700;
	color: #e2e8f0;
	background: rgba(15, 23, 42, 0.65);
	border: 1px solid rgba(0, 212, 255, 0.28);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	box-shadow: 0 0 16px rgba(0, 212, 255, 0.12);
	overflow: hidden;
}

.kh-max-wallet-pill__glow {
	position: absolute;
	inset: -1px;
	border-radius: inherit;
	box-shadow: inset 0 0 12px rgba(0, 212, 255, 0.15);
	pointer-events: none;
}

.kh-max-wallet-pill__chip--coin {
	color: #fbbf24;
}

.kh-max-boost-chip {
	display: inline-flex;
	align-items: center;
	padding: 6px 10px;
	border-radius: 999px;
	font-size: 0.72rem;
	font-weight: 800;
	color: #fbbf24;
	background: linear-gradient(135deg, rgba(251, 191, 36, 0.18), rgba(239, 68, 68, 0.1));
	border: 1px solid rgba(251, 191, 36, 0.45);
	animation: kh-boost-pulse 2.4s ease-in-out infinite;
}

@keyframes kh-boost-pulse {
	0%, 100% { box-shadow: 0 0 8px rgba(251, 191, 36, 0.2); }
	50% { box-shadow: 0 0 20px rgba(251, 191, 36, 0.45); }
}

/* Profil dropdown */
.kh-max-profile { position: relative; }

.kh-max-profile__toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 8px 4px 4px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	background: rgba(15, 23, 42, 0.55);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	cursor: pointer;
	color: inherit;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.kh-max-profile__toggle:hover,
.kh-max-profile.is-open .kh-max-profile__toggle {
	border-color: rgba(0, 212, 255, 0.45);
	box-shadow: 0 0 20px rgba(0, 212, 255, 0.15);
}

.kh-max-profile__avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid rgba(0, 212, 255, 0.35);
}

.kh-max-profile__avatar--fallback {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 1.1rem;
	background: rgba(59, 130, 246, 0.2);
}

.kh-max-profile__badge {
	font-size: 0.62rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #fbbf24;
	max-width: 72px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.kh-max-profile__panel {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	min-width: 240px;
	padding: 14px;
	border-radius: 16px;
	background: rgba(10, 14, 28, 0.96);
	border: 1px solid rgba(255, 255, 255, 0.12);
	box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(18px);
	-webkit-backdrop-filter: blur(18px);
	z-index: 100020;
}

.kh-max-profile__head { margin-bottom: 10px; }
.kh-max-profile__name { display: block; font-size: 0.95rem; }
.kh-max-profile__tier { display: inline-block; margin-top: 4px; font-size: 0.72rem; color: #fbbf24; font-weight: 700; }

.kh-max-profile__wallet {
	padding: 10px 12px;
	margin-bottom: 10px;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(251, 191, 36, 0.2);
}

.kh-max-profile__wallet-row {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	font-size: 0.82rem;
	padding: 4px 0;
}

.kh-max-profile__wallet-row strong { color: #00d4ff; }

.kh-max-profile__links { display: grid; gap: 6px; }

.kh-max-profile__links a {
	display: block;
	padding: 8px 10px;
	border-radius: 10px;
	text-decoration: none;
	color: #e2e8f0;
	font-size: 0.85rem;
	transition: background 0.15s ease;
}

.kh-max-profile__links a:hover { background: rgba(59, 130, 246, 0.15); }

.kh-max-profile__guest { margin: 0 0 12px; font-size: 0.85rem; color: #94a3b8; }

.kh-max-profile__login {
	display: block;
	text-align: center;
	padding: 10px;
	border-radius: 10px;
	background: linear-gradient(135deg, #ec4899, #a855f7);
	color: #fff;
	text-decoration: none;
	font-weight: 700;
}

.kh-max-profile__boost-alert {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 10px;
	padding: 8px 10px;
	border-radius: 12px;
	background: linear-gradient(135deg, rgba(251, 191, 36, 0.16), rgba(239, 68, 68, 0.1));
	border: 1px solid rgba(251, 191, 36, 0.45);
	font-size: 0.78rem;
	font-weight: 700;
	color: #fbbf24;
}

/* Single boost badge */
.kh-max-boost-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 12px;
	padding: 8px 14px;
	border-radius: 999px;
	background: linear-gradient(135deg, rgba(251, 191, 36, 0.18), rgba(239, 68, 68, 0.12));
	border: 1px solid rgba(251, 191, 36, 0.45);
	font-size: 0.82rem;
	font-weight: 700;
	color: #fbbf24;
	animation: kh-boost-pulse 2.4s ease-in-out infinite;
}

/* ── Puan Hakediş Çubuğu (player altı) ── */
.kh-tube-earn-bar {
	width: 100%;
	padding: 10px var(--kh-vp-pad-x, 14px) 12px;
	background: linear-gradient(180deg, rgba(10, 14, 28, 0.85), rgba(10, 14, 28, 0.4));
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	box-sizing: border-box;
}

.kh-tube-earn-bar__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #94a3b8;
}

.kh-tube-earn-bar__meta strong {
	color: #00d4ff;
	font-size: 0.78rem;
}

.kh-tube-earn-bar__track {
	position: relative;
	height: 10px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.06);
}

.kh-tube-earn-bar__fill {
	height: 100%;
	width: 0;
	border-radius: inherit;
	background: linear-gradient(90deg, #3b82f6, #00d4ff, #fbbf24);
	transition: width 0.25s ease;
	box-shadow: 0 0 12px rgba(0, 212, 255, 0.35);
}

.kh-tube-earn-bar__marker {
	position: absolute;
	top: -2px;
	bottom: -2px;
	width: 2px;
	background: rgba(251, 191, 36, 0.8);
	box-shadow: 0 0 8px rgba(251, 191, 36, 0.6);
	transform: translateX(-50%);
}

.kh-tube-earn-bar.is-qualified .kh-tube-earn-bar__fill {
	background: linear-gradient(90deg, #22c55e, #fbbf24, #ec4899);
}

.kh-tube-earn-bar.is-glow {
	animation: kh-earn-glow 1.2s ease-out;
}

.kh-tube-earn-bar.is-glow .kh-tube-earn-bar__track {
	box-shadow: 0 0 28px rgba(251, 191, 36, 0.55), 0 0 48px rgba(0, 212, 255, 0.35);
	border-color: rgba(251, 191, 36, 0.6);
}

.kh-tube-earn-bar.is-resetting .kh-tube-earn-bar__fill {
	transition: width 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes kh-earn-glow {
	0% { filter: brightness(1); }
	40% { filter: brightness(1.35); }
	100% { filter: brightness(1); }
}

.kh-tube-earn-bar__hint {
	margin: 8px var(--kh-vp-pad-x, 14px) 0;
	padding: 8px 12px;
	border-radius: 8px;
	background: rgba(236, 72, 153, 0.12);
	color: #fbcfe8;
	font-size: 0.8rem;
	text-align: center;
}

@media (max-width: 900px) {
	.kh-max-profile__badge,
	.kh-max-boost-chip { display: none; }
	.kh-max-cta__label { display: none; }
	.kh-max-cta { padding: 10px 12px; }
}
