/* Universal Pro Theme — main stylesheet v1.0.0 */
:root {
	--at-bg: #1a1a1a;
	--at-bg-dark: #0d0d0d;
	--at-card: #2d2d2d;
	--at-fg: #ffffff;
	--at-muted: #b0b0b0;
	--at-border: #404040;
	--at-accent: #FFD700;
	--at-accent-fg: #1a1a1a;
	--at-primary: #FFD700;
	--at-secondary: #2d2d2d;
	--at-radius: 0.75rem;
	--at-transition: 220ms ease;
	--at-font-body: "Inter", system-ui, sans-serif;
	--at-font-display: "Space Grotesk", "Inter", sans-serif;
	--at-max: 78rem;
}

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

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--at-bg);
	color: var(--at-fg);
	font-family: var(--at-font-body);
	font-size: 1rem;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	overflow-x: clip;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--at-font-display);
	font-weight: 700;
	line-height: 1.2;
	margin: 0 0 0.6em;
	letter-spacing: -0.02em;
	color: var(--at-fg);
}

a { color: var(--at-accent); text-decoration: none; transition: color var(--at-transition); }
a:hover { color: #ffe566; }

img { max-width: 100%; height: auto; display: block; }

p { margin: 0 0 1.2em; }

.up-container { max-width: var(--at-max); margin: 0 auto; padding: 0 1.25rem; }

.up-skip-link {
	position: absolute; left: -9999px; top: 0; z-index: 999;
	background: var(--at-accent); color: var(--at-accent-fg);
	padding: 0.6rem 1rem; border-radius: 0 0 0.5rem 0; font-weight: 600;
}
.up-skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--at-accent); outline-offset: 2px; }

/* Header — fixed/floating, stays visible on scroll */
.up-header {
	background: #1a1a1a;
	border-bottom: 1px solid #404040;
	position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
	width: 100%;
}
.up-header-inner {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 1.5rem;
	min-height: 104px; padding: 12px 16px;
}
/* LEFT — Logo, 80px, centered within its column */
.up-brand { justify-self: start; display: flex; align-items: center; justify-content: center; padding: 0 16px; }
.up-brand img { max-height: 80px; width: auto; height: 80px; max-width: 80px; object-fit: contain; }
.up-logo-text {
	font-family: var(--at-font-display); font-weight: 700; font-size: 1.4rem;
	color: var(--at-fg); white-space: nowrap;
}
.up-logo-text:hover { color: var(--at-accent); }

/* CENTER — Navigation menu */
.up-nav { justify-self: center; display: flex; align-items: center; justify-content: center; gap: 1.5rem; padding: 0 24px; }
.up-menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.up-menu > li { position: relative; }
.up-menu a {
	color: #ffffff; font-weight: 500; font-size: 16px;
	padding: 0.5rem 0; position: relative;
	transition: color var(--at-transition);
}
.up-menu a::after {
	content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
	background: var(--at-accent); transition: width var(--at-transition);
}
.up-menu a:hover { color: var(--at-accent); }
.up-menu a:hover::after { width: 100%; }
.up-menu .current-menu-item > a { color: var(--at-accent); }
.up-menu .current-menu-item > a::after { width: 100%; }
.up-menu .sub-menu {
	position: absolute; left: 0; top: 100%; min-width: 200px;
	background: #1a1a1a; border: 1px solid #404040; border-radius: 0.5rem;
	padding: 0.5rem 0; margin: 0; list-style: none; flex-direction: column; gap: 0;
	opacity: 0; visibility: hidden; transform: translateY(8px);
	transition: opacity var(--at-transition), transform var(--at-transition), visibility var(--at-transition);
	z-index: 10;
}
.up-menu li:hover > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.up-menu .sub-menu a { padding: 0.6rem 1rem; }
.up-menu .sub-menu a::after { display: none; }

.up-header-right { justify-self: end; display: flex; align-items: center; gap: 1rem; }
.up-header-actions { display: flex; gap: 8px; align-items: center; }

/* Compact header buttons (Login/Register) — always visible in the header bar */
.up-btn-header {
	padding: 0.5rem 0.9rem;
	min-height: 40px;
	font-size: 0.85rem;
	border-radius: 0.25rem;
	white-space: nowrap;
	font-weight: 600;
}

.up-nav-toggle {
	display: none; background: none; border: 0; cursor: pointer;
	width: 44px; height: 44px; padding: 10px; position: relative;
	align-items: center; justify-content: center;
	border-radius: 4px; flex-shrink: 0;
}
.up-nav-toggle span {
	display: block; width: 24px; height: 2px; background: var(--at-fg);
	margin: 5px auto; transition: var(--at-transition);
}

/* Close button (X) inside mobile menu */
.up-nav-close {
	display: none; position: absolute; top: 12px; right: 12px;
	width: 44px; height: 44px; padding: 10px; cursor: pointer;
	background: none; border: 0; border-radius: 4px;
	align-items: center; justify-content: center; z-index: 2;
}
.up-nav-close span {
	display: block; position: relative; width: 24px; height: 2px; background: var(--at-fg);
	transform: rotate(45deg);
}
.up-nav-close span::after {
	content: ""; position: absolute; left: 0; top: 0; width: 24px; height: 2px;
	background: var(--at-fg); transform: rotate(90deg);
}

/* Offset content for fixed header + floating footer */
body { padding-top: 104px; padding-bottom: 50px; }
body.admin-bar { padding-top: 136px; }
body.admin-bar .up-header { top: 32px; }

/* Hero */
.up-hero {
	background: linear-gradient(180deg, var(--at-bg-dark) 0%, var(--at-bg) 100%);
	padding: 4rem 0; text-align: center; border-bottom: 1px solid var(--at-border);
}
.up-hero-title { font-size: clamp(2rem, 5vw, 3.25rem); margin-bottom: 0.4em; }
.up-hero-sub { color: var(--at-muted); font-size: 1.15rem; max-width: 42rem; margin: 0 auto 1.8rem; }
.up-hero-actions { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }

/* Sections */
.up-section { padding: 3rem 0; }
.up-section-title { font-size: 1.75rem; margin-bottom: 1.5rem; text-align: center; }

/* Grid */
.up-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(3, 1fr); }

/* Card */
.up-card {
	background: var(--at-card);
	border: 1px solid var(--at-border);
	border-radius: var(--at-radius);
	overflow: hidden;
	display: flex; flex-direction: column;
	transition: border-color var(--at-transition), transform var(--at-transition);
}
.up-card:hover { border-color: var(--at-accent); transform: translateY(-2px); }
.up-card-thumb { display: block; aspect-ratio: 16/9; overflow: hidden; background: var(--at-bg-dark); }
.up-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.up-card-body { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.up-card-meta { display: flex; gap: 0.6rem; font-size: 0.8rem; color: var(--at-muted); }
.up-card-cat { color: var(--at-accent); }
.up-card-title { font-size: 1.2rem; margin: 0; }
.up-card-title a { color: var(--at-fg); }
.up-card-title a:hover { color: var(--at-accent); }
.up-card-excerpt { color: var(--at-muted); margin: 0; font-size: 0.95rem; flex: 1; }
.up-card-link { color: var(--at-accent); font-weight: 600; font-size: 0.9rem; }

/* Content layout */
.up-content { padding: 2.5rem 0; }
.up-page-header { margin-bottom: 2rem; }
.up-page-title { font-size: clamp(1.75rem, 4vw, 2.5rem); }
.up-archive-desc { color: var(--at-muted); }
.up-empty { color: var(--at-muted); padding: 2rem 0; }

/* Breadcrumbs */
.up-breadcrumbs { margin-bottom: 1.5rem; font-size: 0.85rem; }
.up-breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.up-breadcrumbs li::after { content: "/"; color: var(--at-muted); margin-left: 0.5rem; }
.up-breadcrumbs li:last-child::after { content: ""; }
.up-breadcrumbs a { color: var(--at-accent); }
.up-breadcrumbs span { color: var(--at-muted); }

/* Article */
.up-article { max-width: 48rem; margin: 0 auto; }
.up-article-title { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.up-article-meta { color: var(--at-muted); font-size: 0.9rem; display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.up-article-meta a { color: var(--at-accent); }
.up-article-thumb { margin: 0 0 2rem; border-radius: var(--at-radius); overflow: hidden; }
.up-article-content { font-size: 1.0625rem; line-height: 1.8; }
.up-article-content h2 { font-size: 1.6rem; margin-top: 2rem; }
.up-article-content h3 { font-size: 1.3rem; margin-top: 1.5rem; }
.up-article-content a { color: var(--at-accent); text-decoration: underline; }
.up-article-content img { border-radius: 0.5rem; margin: 1.5rem 0; }
.up-article-content blockquote {
	border-left: 4px solid var(--at-accent); margin: 1.5rem 0;
	padding: 0.75rem 1.25rem; background: var(--at-card); border-radius: 0 0.5rem 0.5rem 0;
	font-style: italic;
}
.up-article-content pre {
	background: var(--at-bg-dark); padding: 1rem; border-radius: 0.5rem;
	overflow-x: auto; border: 1px solid var(--at-border);
}
.up-article-content code { background: var(--at-card); padding: 0.15rem 0.4rem; border-radius: 0.3rem; font-size: 0.9em; }
.up-article-content table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.up-article-content th, .up-article-content td { border: 1px solid var(--at-border); padding: 0.6rem 0.8rem; text-align: left; }
.up-article-content th { background: var(--at-card); }

.up-article-footer { margin-top: 2.5rem; }
.up-tags { margin-bottom: 1.5rem; }
.up-tags span { color: var(--at-muted); margin-right: 0.4rem; }
.up-tags a { background: var(--at-card); border: 1px solid var(--at-border); padding: 0.25rem 0.6rem; border-radius: 0.4rem; font-size: 0.85rem; }

.up-author-bio {
	display: flex; gap: 1rem; align-items: flex-start;
	background: var(--at-card); border: 1px solid var(--at-border);
	border-radius: var(--at-radius); padding: 1.25rem;
}
.up-author-bio h3 { font-size: 1.1rem; margin: 0 0 0.3rem; }
.up-author-bio p { margin: 0; color: var(--at-muted); }

.up-related { margin-top: 3rem; }
.up-related-title { font-size: 1.4rem; margin-bottom: 1.25rem; }

/* Comments */
.up-comments { margin-top: 3rem; max-width: 48rem; margin-left: auto; margin-right: auto; }
.up-comments-title { font-size: 1.4rem; margin-bottom: 1.25rem; }
.up-comment-list { list-style: none; padding: 0; margin: 0 0 2rem; }
.up-comment-list .children { list-style: none; padding-left: 2rem; }
.up-comment-body { background: var(--at-card); border: 1px solid var(--at-border); border-radius: var(--at-radius); padding: 1rem 1.25rem; margin-bottom: 1rem; }

/* Pagination */
.up-pagination { margin: 2.5rem 0; display: flex; gap: 0.4rem; justify-content: center; flex-wrap: wrap; }
.up-pagination .page-numbers {
	padding: 0.5rem 0.85rem; border: 1px solid var(--at-border); border-radius: 0.5rem;
	color: var(--at-fg); background: var(--at-card);
}
.up-pagination .page-numbers.current { background: var(--at-accent); color: var(--at-accent-fg); border-color: var(--at-accent); }
.up-pagination a.page-numbers:hover { border-color: var(--at-accent); }

/* Newsletter */
.up-newsletter {
	background: var(--at-bg-dark); border-top: 1px solid var(--at-border);
	border-bottom: 1px solid var(--at-border); padding: 3rem 0; text-align: center;
}
.up-newsletter-text { color: var(--at-muted); margin-bottom: 1.5rem; }
.up-newsletter-form { display: flex; gap: 0.6rem; max-width: 30rem; margin: 0 auto; flex-wrap: wrap; justify-content: center; }

/* 404 */
.up-404 { text-align: center; padding: 4rem 0; }
.up-404-title { font-size: clamp(3rem, 10vw, 6rem); color: var(--at-accent); margin: 0; }
.up-404-text { color: var(--at-muted); margin-bottom: 1.5rem; }

/* Footer */
.up-footer { background: var(--at-bg-dark); border-top: 1px solid var(--at-border); padding: 3rem 0 1.5rem; margin-top: 3rem; }
.up-footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.up-footer-title { font-size: 1.1rem; margin-bottom: 1rem; }
.up-footer-text { color: var(--at-muted); font-size: 0.9rem; }
.up-footer-links { list-style: none; padding: 0; margin: 0; }
.up-footer-links li { margin-bottom: 0.5rem; }
.up-footer-links a { color: var(--at-muted); }
.up-footer-links a:hover { color: var(--at-accent); }
.up-footer-bottom { border-top: 1px solid var(--at-border); margin-top: 2rem; padding-top: 1.5rem; text-align: center; color: var(--at-muted); font-size: 0.85rem; }
.up-social ul { list-style: none; padding: 0; margin: 0.5rem 0 0; display: flex; gap: 0.8rem; }
.up-social a { color: var(--at-muted); }
.up-social a:hover { color: var(--at-accent); }

/* Sidebar */
.up-sidebar { display: flex; flex-direction: column; gap: 1.5rem; }
.widget { background: var(--at-card); border: 1px solid var(--at-border); border-radius: var(--at-radius); padding: 1.25rem; }
.widget-title { font-size: 1.05rem; margin: 0 0 0.8rem; }
.up-widget-list { list-style: none; padding: 0; margin: 0; }
.up-widget-list li { margin-bottom: 0.5rem; }
.up-widget-list a { color: var(--at-muted); }
.up-widget-list a:hover { color: var(--at-accent); }

/* Mobile auth bar (hidden on desktop) */
.up-mobile-auth { display: none; }

/* ===========================================================================
   Floating protected credit bar — "Support By KING403"
   Fixed to viewport bottom on every page. Hardcoded, not editable from admin.
   =========================================================================== */
.up-floating-footer {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 500;
	width: 100%;
	height: auto;
	padding: 12px 16px;
	background: #FFD700;
	border-top: 1px solid #FFC700;
	text-align: center;
	box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.28);
	transition: opacity 220ms ease;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}
.up-floating-footer-text {
	display: inline-block;
	margin: 0;
	color: #1a1a1a;
	font-family: var(--at-font-display);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.02em;
	pointer-events: none;
}
/* Ensure the floating bar always sits above page content but below the
   fixed header (z-index 1000) and mobile menu (z-index 999). */
.up-floating-footer { z-index: 500; }
