:root {
	--xswipe-accent: #ff2d55;
	--xswipe-bg: #000;
	--xswipe-text: #fff;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: var(--xswipe-bg);
	color: var(--xswipe-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ---------------------------------------------------------------------
 * Top bar (feed page only)
 * ------------------------------------------------------------------- */
.xswipe-topbar {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 30;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 20px;
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent);
}

.xswipe-topbar__logo {
	display: flex;
	align-items: center;
	gap: 2px;
	color: var(--xswipe-text);
	text-decoration: none;
	font-weight: 800;
	font-size: 1.3rem;
	letter-spacing: -0.5px;
}

.xswipe-topbar__logo-mark {
	color: var(--xswipe-accent);
}

@media (min-width: 700px) {
	.xswipe-topbar {
		max-width: 420px;
		margin: 0 auto;
	}
}

.xswipe-topbar__tabs {
	display: flex;
	align-items: center;
	gap: 20px;
}

.xswipe-topbar__grid-btn {
	background: none;
	border: none;
	color: var(--xswipe-text);
	width: 22px;
	height: 22px;
	cursor: pointer;
	padding: 0;
}

.xswipe-topbar__tab {
	color: rgba(255, 255, 255, 0.6);
	text-decoration: none;
	font-weight: 600;
	font-size: 0.95rem;
	padding-bottom: 4px;
	border-bottom: 2px solid transparent;
}

.xswipe-topbar__tab.is-active {
	color: var(--xswipe-accent);
	border-bottom-color: var(--xswipe-accent);
}

/* ---------------------------------------------------------------------
 * Bottom mobile tab bar (feed page only)
 * ------------------------------------------------------------------- */
.xswipe-bottomnav {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 30;
	display: flex;
	justify-content: space-around;
	padding: 10px 0 max(10px, env(safe-area-inset-bottom));
	background: rgba(0, 0, 0, 0.85);
	backdrop-filter: blur(6px);
}

.xswipe-bottomnav__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	color: rgba(255, 255, 255, 0.6);
	text-decoration: none;
	font-size: 0.7rem;
}

.xswipe-bottomnav__item svg {
	width: 24px;
	height: 24px;
}

.xswipe-bottomnav__item.is-active {
	color: var(--xswipe-accent);
}

@media (min-width: 900px) {
	.xswipe-bottomnav {
		display: none;
	}
}

/* ---------------------------------------------------------------------
 * Plain header/footer (non-feed pages)
 * ------------------------------------------------------------------- */
.xswipe-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 20;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), transparent);
}

.xswipe-header__logo {
	color: var(--xswipe-text);
	font-weight: 700;
	text-decoration: none;
	font-size: 1.1rem;
}

.xswipe-header__nav ul {
	display: flex;
	gap: 16px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.xswipe-header__nav a {
	color: var(--xswipe-text);
	text-decoration: none;
	font-size: 0.9rem;
}

/* ---------------------------------------------------------------------
 * Swipe feed
 * ------------------------------------------------------------------- */
.xswipe-feed {
	width: 100%;
	height: 100vh;
	height: 100dvh;
}

@media (min-width: 700px) {
	body.xswipe-is-feed {
		background: #0a0a0a;
	}

	.xswipe-feed {
		max-width: 420px;
		margin: 0 auto;
		box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
	}
}

.xswipe-slide {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: flex-end;
	background: #111;
	overflow: hidden;
}

.xswipe-slide--empty {
	align-items: center;
	justify-content: center;
	color: #888;
}

.xswipe-slide__media {
	position: absolute;
	inset: 0;
}

.xswipe-slide__media video,
.xswipe-slide__media .xswipe-player,
.xswipe-slide__media .video-js,
.xswipe-slide__fallback-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.xswipe-slide__media .video-js .vjs-tech {
	object-fit: cover;
}

.xswipe-slide__iframe-wrap,
.xswipe-single__iframe-wrap {
	position: relative;
	width: 100%;
	height: 100%;
}

.xswipe-slide__iframe-wrap iframe,
.xswipe-single__iframe-wrap iframe {
	width: 100%;
	height: 100%;
	border: 0;
}

.xswipe-badge {
	position: absolute;
	top: 16px;
	right: 16px;
	padding: 2px 8px;
	border-radius: 4px;
	font-size: 0.7rem;
	font-weight: 700;
	background: var(--xswipe-accent);
	color: #fff;
}

.xswipe-play-toggle {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 64px;
	height: 64px;
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, 0.8);
	background: rgba(0, 0, 0, 0.25);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.15s ease;
	z-index: 3;
}

.xswipe-play-toggle svg {
	width: 26px;
	height: 26px;
	margin-left: 3px;
}

.xswipe-slide.is-paused .xswipe-play-toggle {
	opacity: 1;
	pointer-events: auto;
}

.xswipe-slide__info {
	position: absolute;
	left: 0;
	right: 88px;
	bottom: 0;
	z-index: 2;
	padding: 16px;
	padding-bottom: 90px;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
}

.xswipe-slide__stats {
	display: flex;
	gap: 16px;
	margin-bottom: 6px;
	color: rgba(255, 255, 255, 0.75);
	font-size: 0.8rem;
}

.xswipe-slide__stats span {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.xswipe-slide__stats svg {
	width: 14px;
	height: 14px;
}

.xswipe-slide__title {
	margin: 0 0 6px;
	font-size: 1.05rem;
	font-weight: 700;
}

.xswipe-desc-toggle {
	background: none;
	border: none;
	color: rgba(255, 255, 255, 0.75);
	width: 22px;
	height: 22px;
	padding: 0;
	margin-bottom: 8px;
	cursor: pointer;
}

.xswipe-tag-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	border: 1px solid rgba(255, 255, 255, 0.4);
	border-radius: 4px;
	padding: 3px 8px;
	font-size: 0.75rem;
	font-weight: 600;
	color: #fff;
}

.xswipe-tag-chip em {
	font-style: normal;
	background: rgba(255, 255, 255, 0.2);
	border-radius: 3px;
	padding: 0 5px;
}

/* ---------------------------------------------------------------------
 * Right-side action rail
 * ------------------------------------------------------------------- */
.xswipe-slide__rail {
	position: absolute;
	right: 12px;
	bottom: 96px;
	z-index: 3;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 18px;
}

.xswipe-rail__nav {
	background: none;
	border: none;
	color: rgba(255, 255, 255, 0.6);
	cursor: pointer;
	padding: 4px;
}

.xswipe-rail__nav svg,
.xswipe-rail__expand svg {
	width: 22px;
	height: 22px;
}

.xswipe-rail__nav--down {
	margin-bottom: 6px;
	color: var(--xswipe-accent);
}

.xswipe-rail__expand,
.xswipe-rail__action,
.xswipe-favorite-btn.xswipe-rail__action {
	position: relative;
	background: none;
	border: none;
	color: #fff;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	font-size: 0.7rem;
	padding: 0;
}

.xswipe-rail__action svg {
	width: 28px;
	height: 28px;
}

.xswipe-favorite-btn.is-favorite {
	color: var(--xswipe-accent);
}

.xswipe-rail__badge {
	position: absolute;
	top: -4px;
	right: -8px;
	background: var(--xswipe-accent);
	color: #fff;
	font-size: 0.6rem;
	font-weight: 700;
	border-radius: 8px;
	padding: 0 5px;
	min-width: 14px;
	line-height: 15px;
}

/* ---------------------------------------------------------------------
 * Single video / page views
 * ------------------------------------------------------------------- */
.xswipe-single,
.xswipe-page {
	max-width: 720px;
	margin: 80px auto 40px;
	padding: 0 16px;
}

.xswipe-single__player {
	aspect-ratio: 16 / 9;
	background: #000;
	margin-bottom: 16px;
}

.xswipe-single__player .video-js,
.xswipe-single__player img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.xswipe-single__player .video-js .vjs-tech {
	object-fit: contain;
}

.xswipe-single__title {
	margin: 0 0 8px;
	font-size: 1.3rem;
	line-height: 1.3;
	font-weight: 700;
}

.xswipe-single__meta {
	display: flex;
	gap: 10px;
	align-items: center;
	color: rgba(255, 255, 255, 0.6);
	font-size: 0.85rem;
	margin-bottom: 16px;
}

.xswipe-single__meta a {
	color: rgba(255, 255, 255, 0.85);
}

.xswipe-single__content {
	font-size: 0.9rem;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.85);
}

.xswipe-single__content p {
	margin: 0 0 12px;
}

.xswipe-single__back-to-feed {
	display: inline-block;
	margin-top: 24px;
	color: var(--xswipe-accent);
	text-decoration: none;
}

/* ---------------------------------------------------------------------
 * Footer
 * ------------------------------------------------------------------- */
.xswipe-footer {
	padding: 24px 16px;
	text-align: center;
	color: #888;
	font-size: 0.8rem;
}
