/**
 * Mudream portal visuals adapted for guidev17
 */

:root {
	--dream-bg: #090909;
	--dream-panel: rgba(18, 18, 18, 0.92);
	--dream-panel-strong: rgba(26, 26, 26, 0.96);
	--dream-line: rgba(212, 173, 86, 0.28);
	--dream-line-strong: rgba(212, 173, 86, 0.52);
	--dream-gold: #d4ad56;
	--dream-gold-soft: #f0d493;
	--dream-text: #f4efe2;
	--dream-muted: #baa982;
	--dream-sidebar: linear-gradient(180deg, rgba(6, 39, 67, 0.96), rgba(5, 27, 50, 0.98));
	--dream-topbar: #4c2414;
	--dream-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
	--dream-topbar-height: 72px;
}

body.guide-portal {
	font-family: "Inter", Tahoma, Arial, sans-serif;
	color: var(--dream-text);
	background:
		radial-gradient(circle at top, rgba(130, 92, 24, 0.24), transparent 28%),
		linear-gradient(180deg, #040404 0%, #0a0a0a 45%, #060606 100%);
	min-height: 100vh;
	overflow-x: hidden;
}

body.guide-portal::before {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 0;
	background:
		linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
	background-size: 28px 28px;
	mask-image: radial-gradient(circle at center, black 55%, transparent 95%);
}

.guide-topbar,
.guide-layout,
.guide-main {
	position: relative;
	z-index: 1;
}

/* Top bar — Mudream main-nav simplified */
.guide-topbar {
	position: sticky;
	top: 0;
	z-index: 30;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: var(--dream-topbar-height);
	padding: 10px 20px;
	background: var(--dream-topbar);
	border-bottom: 1px solid rgba(232, 190, 102, 0.34);
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.topbar-brand {
	display: grid;
	grid-template-columns: 52px minmax(0, 1fr);
	gap: 12px;
	align-items: center;
	text-decoration: none;
	color: inherit;
	min-width: 0;
}

.topbar-logo {
	width: 52px;
	height: 52px;
	object-fit: contain;
	filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35));
}

.topbar-kicker {
	margin: 0 0 2px;
	font-size: 0.58rem;
	text-transform: uppercase;
	letter-spacing: 0.18em;
	color: #e2bf71;
}

.topbar-title {
	margin: 0;
	font-family: "Cinzel", serif;
	font-size: 1.15rem;
	font-weight: 700;
	color: #f5e8c4;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.topbar-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.topbar-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 14px;
	border-radius: 6px;
	font-family: "Cinzel", serif;
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #f4dda7;
	text-decoration: none;
	background: linear-gradient(180deg, rgba(71, 29, 19, 0.96), rgba(34, 12, 12, 0.96));
	border: 1px solid rgba(214, 157, 62, 0.46);
	box-shadow: inset 0 0 0 1px rgba(255, 224, 150, 0.06), 0 10px 20px rgba(0, 0, 0, 0.28);
	transition: transform 0.2s ease, border-color 0.2s ease;
}

.topbar-btn:hover {
	transform: translateY(-2px);
	border-color: rgba(255, 210, 126, 0.76);
	color: #fff;
}

.topbar-btn--primary {
	color: #17120a;
	background: linear-gradient(180deg, #f0d493, #c89838);
	border-color: rgba(255, 229, 160, 0.6);
	font-weight: 700;
}

.topbar-btn--admin {
	color: #dbe7ff;
	background: linear-gradient(180deg, rgba(30, 60, 90, 0.95), rgba(15, 35, 55, 0.95));
	border-color: rgba(113, 175, 255, 0.35);
}

.topbar-btn--admin:hover {
	color: #fff;
	border-color: rgba(113, 175, 255, 0.6);
}

/* Layout */
.guide-layout {
	display: grid;
	grid-template-columns: clamp(300px, 28vw, 380px) minmax(0, 1fr);
	gap: 20px;
	max-width: 1440px;
	margin: 0 auto;
	padding: 20px;
	min-height: calc(100vh - var(--dream-topbar-height));
	box-sizing: border-box;
}

.guide-main {
	min-width: 0;
	min-height: 0;
}

.panel {
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 100px),
		var(--dream-panel);
	border: 1px solid var(--dream-line);
	border-radius: 22px;
	box-shadow: var(--dream-shadow);
}

/* Sidebar with category icons */
.guide-sidebar {
	display: flex;
	flex-direction: column;
	padding: 0;
	overflow: hidden;
	max-height: calc(100vh - var(--dream-topbar-height) - 40px);
	position: sticky;
	top: calc(var(--dream-topbar-height) + 20px);
	background: var(--dream-sidebar) !important;
	border-color: rgba(145, 189, 255, 0.12);
}

.sidebar-heading {
	padding: 18px 18px 12px;
	border-bottom: 1px solid rgba(145, 189, 255, 0.08);
}

.sidebar-heading h2 {
	margin: 0 0 4px;
	font-family: "Cinzel", serif;
	font-size: 1.05rem;
	color: #f5e8c4;
}

.sidebar-heading p {
	margin: 0;
	font-size: 0.76rem;
	color: #8ca7c7;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.category-nav {
	flex: 1;
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: rgba(18, 18, 18, 0.92) rgba(0, 0, 0, 0.12);
}

.category-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.category-nav li {
	display: grid;
	grid-template-columns: 46px minmax(0, 1fr);
	gap: 12px;
	align-items: center;
	padding: 14px 16px;
	cursor: pointer;
	border-bottom: 1px solid rgba(145, 189, 255, 0.08);
	transition: background 0.2s ease, transform 0.2s ease;
}

.category-nav li:hover {
	background: rgba(255, 255, 255, 0.035);
	transform: translateX(2px);
}

.category-nav li.active {
	background: linear-gradient(90deg, rgba(255, 172, 51, 0.18), rgba(255, 172, 51, 0.04));
	box-shadow: inset 4px 0 0 #ffb236;
}

.nav-icon {
	width: 46px;
	height: 46px;
	object-fit: contain;
	filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.35));
}

.nav-copy strong {
	display: block;
	font-size: 0.95rem;
	font-weight: 600;
	color: #f3efe4;
	margin-bottom: 3px;
}

.nav-copy span {
	display: block;
	font-size: 0.72rem;
	color: #8ca7c7;
	text-transform: uppercase;
	line-height: 1.35;
}

.guide-sidebar .sidebar-footer {
	padding: 12px 16px;
	border-top: 1px solid rgba(145, 189, 255, 0.08);
	color: #8ca7c7;
	background: rgba(3, 28, 50, 0.5);
}

.guide-sidebar .sidebar-footer a {
	color: var(--dream-gold-soft);
}

/* Content panel */
.content-panel {
	min-height: calc(100vh - var(--dream-topbar-height) - 40px);
	max-height: calc(100vh - var(--dream-topbar-height) - 40px);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	padding: 0;
}

.content-header {
	padding: 22px 24px 0;
	flex-shrink: 0;
}

.eyebrow {
	margin: 0 0 8px;
	font-size: 0.76rem;
	text-transform: uppercase;
	letter-spacing: 0.18em;
	color: var(--dream-gold);
}

#content-title {
	margin: 0;
	font-family: "Cinzel", serif;
	font-size: clamp(1.35rem, 2.2vw, 2rem);
	color: var(--dream-gold-soft);
	letter-spacing: 0.03em;
}

.content-body,
#content.content-body {
	flex: 1;
	overflow-y: auto;
	padding: 16px 24px 24px;
	scrollbar-width: thin;
	scrollbar-color: rgba(18, 18, 18, 0.92) rgba(0, 0, 0, 0.12);
}

.content-body.is-entering {
	animation: dreamContentIn 0.35s ease;
}

@keyframes dreamContentIn {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.guides-menu--tiers li {
	font-size: 0.78rem !important;
}

/* Submenu tabs — Mudream subcategory style */
.guides-menu {
	background: rgba(255, 255, 255, 0.03) !important;
	border: 1px solid var(--dream-line) !important;
	border-radius: 14px !important;
	overflow: hidden;
	margin-bottom: 18px !important;
	box-shadow: none !important;
}

.guides-menu ul {
	display: flex !important;
	flex-wrap: wrap;
	gap: 0;
}

.guides-menu li {
	display: block !important;
	flex: 1 1 auto;
	min-width: 110px;
	padding: 12px 14px !important;
	text-align: center;
	font-family: "Inter", sans-serif !important;
	font-size: 0.82rem !important;
	font-weight: 600 !important;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #f3efe4 !important;
	background: transparent !important;
	border-right: 1px solid rgba(212, 173, 86, 0.12) !important;
	border-bottom: none !important;
	transition: background 0.2s ease, color 0.2s ease;
}

.guides-menu li:last-child {
	border-right: none !important;
}

.guides-menu li:hover,
.guides-menu li.active {
	background: linear-gradient(90deg, rgba(255, 172, 51, 0.18), rgba(255, 172, 51, 0.04)) !important;
	color: #ffffff !important;
	box-shadow: inset 0 -3px 0 #ffb236;
}

/* Guide blocks inside content */
.guide,
.guide-block,
.intro,
.news-item,
.panel {
	border-radius: 16px !important;
}

.guide-title,
.intro-title,
.news-title,
.page h2 {
	color: var(--dream-gold-soft) !important;
	font-family: "Cinzel", serif !important;
}

.guide-table thead th {
	background: rgba(0, 0, 0, 0.35) !important;
	color: var(--dream-gold) !important;
	border-color: var(--dream-line) !important;
}

.guide-table tbody td {
	border-color: rgba(212, 173, 86, 0.15) !important;
	color: #ddd2b6 !important;
}

.guide-table tbody tr:hover {
	background: rgba(255, 172, 51, 0.08) !important;
}

.guide font[color="#3498DB"],
.guide font[color="#3498db"],
.guide-block font[color="#3498DB"],
.guide-block font[color="#3498db"] {
	color: var(--dream-gold) !important;
}

.page-loading {
	color: var(--dream-gold);
	font-family: "Cinzel", serif;
}

/* Home carousel in dream style */
.home-carousel-wrap .carousel {
	border-color: var(--dream-line);
	border-radius: 14px;
	overflow: hidden;
}

.home-page .intro {
	border-radius: 16px;
	border-color: var(--dream-line) !important;
	background: var(--dream-panel-strong) !important;
}

.carousel-btn {
	border-color: var(--dream-line) !important;
	color: var(--dream-gold) !important;
}

.carousel-progress-bar {
	background: var(--dream-gold) !important;
}

/* Mobile */
.sidebar-toggle {
	background: var(--dream-topbar);
	border-color: rgba(214, 157, 62, 0.46);
	color: var(--dream-gold-soft);
	top: calc(var(--dream-topbar-height) + 8px);
}

@media (max-width: 900px) {
	.guide-layout {
		grid-template-columns: 1fr;
		padding: 12px;
		padding-top: 52px;
	}

	.guide-sidebar {
		position: fixed;
		left: 0;
		top: 0;
		height: 100%;
		max-height: 100%;
		width: min(320px, 88vw);
		z-index: 1000;
		transform: translateX(-100%);
		transition: transform 0.25s ease;
		border-radius: 0 22px 22px 0;
	}

	body.sidebar-open .guide-sidebar {
		transform: translateX(0);
	}

	.content-panel {
		min-height: auto;
		max-height: none;
	}

	.guide-topbar {
		padding: 8px 12px;
	}

	.topbar-actions .topbar-btn span:not(.fas):not(.fa) {
		display: none;
	}

	.topbar-btn {
		padding: 10px 12px;
	}

	.guides-menu li {
		min-width: 50%;
		border-bottom: 1px solid rgba(212, 173, 86, 0.12) !important;
	}
}

@media (min-width: 901px) {
	#app.guide-layout {
		margin-left: 0;
	}

	#main.guide-main {
		margin-left: 0;
	}
}
