.cams-count-badge {
	position: absolute;
	top: 18px;
	right: 32px;
	background: var(--accent);
	color: #fff;
	font-size: 1.1em;
	font-weight: bold;
	padding: 7px 18px;
	border-radius: 22px;
	box-shadow: 0 2px 8px #fc3f8b22;
	letter-spacing: 1px;
	z-index: 10;
}
.country-nav {
	display: flex;
	gap: 10px;
	margin: 24px 0 24px 32px;
	padding: 0;
	list-style: none;
}
.country-nav li {
	margin: 0;
}
.country-nav a {
	display: inline-block;
	padding: 8px 18px;
	border-radius: 20px;
	background: var(--panel);
	color: var(--text);
	text-decoration: none;
	font-size: 1.05em;
	font-weight: 500;
	transition: background 0.18s, color 0.18s;
}
.site-header { display:flex; align-items:center; gap:12px; }
/* crop empty top/bottom space of the logo by using a fixed-height, overflow-hidden container
	and making the image fill the container with object-fit:cover */
.site-logo-link { display:inline-flex; align-items:center; height:64px; overflow:hidden; }
.site-logo { height:100%; width:auto; display:block; object-fit:cover; object-position:center center; transition: transform 160ms ease; }
.site-title { display:none; }

@media (max-width:1200px){
	.site-logo-link { height:56px; }
}
@media (max-width:900px){
	.site-logo-link { height:48px; }
}
@media (max-width:480px){
	.site-logo-link { height:40px; }
}

/* Ensure the sidebar (tags) aligns to the top of the gallery content */
main { display: flex; gap: 32px; align-items: flex-start; }
/* Remove extra padding on the aside container and use a single margin on the sidebar panel
	to align it with the gallery; avoids double offsets that cause you to need negative margins. */
aside { padding-top: 0; }
aside > .sidebar-modern,
.cam-sidebar > .sidebar-modern { margin-top: 0px; }
.country-nav a:hover {
	background: var(--accent);
	color: #fff;
}
.country-nav a.active {
	background: var(--accent);
	color: #fff;
	font-weight: bold;
	box-shadow: 0 2px 8px #fc3f8b22;
}

/* Age gate modal */
.age-modal-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.7);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 99999;
}
.age-modal {
	background: var(--panel);
	color: var(--text);
	max-width: 520px;
	width: calc(100% - 48px);
	padding: 24px;
	border-radius: 12px;
	box-shadow: 0 12px 40px rgba(0,0,0,0.5);
	text-align: center;
}
.age-modal h2 { margin: 0 0 12px 0; font-size: 1.4rem; }
.age-modal p { margin: 0 0 18px 0; color: var(--muted); }
.age-modal .age-actions { display:flex; gap:12px; justify-content:center; }
.age-modal .btn { padding:10px 16px; border-radius:8px; cursor:pointer; border:none; font-weight:700; }
.age-modal .btn.confirm { background: var(--accent); color:#fff; }
.age-modal .btn.deny { background: #eee; color: #333; }

body { font-family: Arial, sans-serif; background: var(--bg); margin: 0; padding: 0; transition: background-color 180ms ease, color 180ms ease; }

/* Dark mode variables */
:root{
	--bg: #f8f8f8;
	--panel: #ffffff;
	--text: #111111;
	--muted: #666666;
	--accent: #fc3f8b;
}
body.dark-mode{
	--bg: #121212;
	--panel: #1b1b1b;
	--text: #eaeaea;
	--muted: #9aa0a6;
	--accent: #ff6b8a;
	background: var(--bg);
}

/* Dark-mode scrollbars for WebKit browsers and Firefox */
body.dark-mode {
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.10) rgba(27,27,27,0.8);
}

/* WebKit scrollbar styling */
body.dark-mode ::-webkit-scrollbar { width: 12px; height: 12px; }
body.dark-mode ::-webkit-scrollbar-track { background: rgba(0,0,0,0.12); }
body.dark-mode ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.10); border-radius: 999px; border: 3px solid rgba(0,0,0,0.06); }
body.dark-mode ::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.16); }

/* Make sure common scrollable containers match the dark scrollbar appearance */
body.dark-mode .cam-sidebar::-webkit-scrollbar-thumb,
body.dark-mode .sidebar-gallery::-webkit-scrollbar-thumb,
body.dark-mode .related-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.10); }

body.dark-mode .cam-sidebar, body.dark-mode .sidebar-gallery, body.dark-mode .related-list { scrollbar-color: rgba(255,255,255,0.10) rgba(27,27,27,0.8); }

.sidebar-modern {
		background: var(--panel);
		border-radius: 12px;
		box-shadow: 0 2px 12px #0002;
		padding: 18px;
		margin: 0 0 18px 0;
}
.sidebar-title {
	font-size: 1.3em;
	color: #fc3f8b;
	margin-bottom: 18px;
	display: flex;
	align-items: center;
}
.tag-list {
	list-style: none;
	padding: 0;
	margin: 0;
}
.tag-item {
	margin-bottom: 10px;
}
.tag-link {
	display: flex;
	align-items: center;
	text-decoration: none;
	color: var(--text);
	background: var(--panel);
	border-radius: 6px;
	padding: 7px 12px;
	transition: background 0.18s, color 0.18s;
	font-size: 1em;
}
.tag-link:hover {
	background: var(--accent);
	color: #fff;
}
.tag-link.active {
	background: #fc3f8b;
	color: #fff;
	font-weight: bold;
}
.tag-link svg {
	margin-right: 6px;
}
.gallery { display: flex; flex-wrap: wrap; gap: 16px; margin: 0px; }
.gallery-item { background: var(--panel); border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); width: 220px; overflow: hidden; transition: background-color 180ms ease, color 180ms ease; }
.image-container { position: relative; }
.the_img { width: 100%; height: 160px; object-fit: cover; }
.overlay { position: absolute; top: 8px; left: 8px; background: #fc3f8b; color: #fff; padding: 2px 8px; border-radius: 4px; font-size: 0.9em; }
.itsnew .overlay { display: block; }
.gallery-item-info { padding: 12px; color: var(--text); }
.username { font-size: 1.1em; margin: 0 0 8px 0; color: var(--text); }
.details { display: flex; justify-content: space-between; font-size: 0.95em; margin-bottom: 8px; color: var(--muted); }
.time-online { font-size: 0.9em; color: var(--muted); }

/* Cam detail card overrides */
.cam-card { max-width: 900px; width: 100%; }
.cam-card .the_img { height: 540px; object-fit: cover; }
.cam-card iframe, .cam-card .iframe-embed { width: 100%; height: 540px; border: none; }
@media (max-width: 900px) {
	.cam-card .the_img, .cam-card iframe, .cam-card .iframe-embed { height: 320px; }
	main { padding: 12px; }
}

/* Cam detail description styling */
.gallery-item-info { padding: 18px 20px 26px 20px; }
.meta-header { display: flex; justify-content: space-between; align-items: center; gap:16px; flex-wrap: nowrap; }
.meta-left { flex: 1 1 auto; display:flex; align-items:center; gap:16px; min-width:0; }
.meta-right { flex: 0 0 auto; display:flex; align-items:center; gap:12px; }
.meta-left .username { font-size: 2.4rem; margin: 0; }
.username-badge { font-size: 2.6rem; margin: 0; line-height: 1; font-weight: 800; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta-sub { color: #666; margin-top: 4px; font-size: 0.95rem; }
.stat-badges { margin-top: 10px; display: flex; gap: 10px; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; font-weight: 700; box-shadow: 0 6px 18px rgba(0,0,0,0.08); color: #fff; }
.badge .emoji { font-size: 1.1rem; }
.badge .count { font-size: 1rem; }
.badge.viewers { background: linear-gradient(90deg,#ff9aa2,#ff6b8a); }
.viewers-right { min-width: 110px; text-align:center; }
.badge.followers { background: linear-gradient(90deg,#ffd17a,#ffb86b); color: #222; }
@media (max-width: 900px) {
	.meta-header { flex-direction: column; align-items: stretch; gap:10px; }
	.meta-left { flex-direction: column; align-items: flex-start; gap:8px; }
	.meta-right { justify-content: flex-start; }
}
@media (max-width: 700px) {
	.username-badge { font-size: 1.6rem; }
	.badge { padding: 6px 10px; gap:6px; }
	.viewers-right { width: 100%; text-align: left; }
}

/* Full-bleed (full width) mode */
.fullwidth-btn { display:block; width:100%; padding:10px 14px; background:#fc3f8b; color:#fff; border:none; border-radius:8px; font-weight:700; cursor:pointer; }
.fullwidth-btn[aria-pressed="true"] { background:#ff6b8a; }
.full-bleed { overflow-x: hidden; overflow-y: auto; }
.full-bleed .cam-card { position:relative; width:80vw !important; max-width:80vw !important; margin:0 auto !important; border-radius:12px !important; }
.full-bleed .image-container iframe, .full-bleed .image-container .iframe-embed, .full-bleed .image-container .the_img { width:80vw !important; height: 80vh !important; max-height: 100vh !important; margin:0 auto; display:block; }
.full-bleed main { padding:0 !important; }
.full-bleed .gallery-item-info { padding: 18px 36px 36px 36px; max-width:1100px; margin:0 auto; }
@media (max-width:900px) {
	.full-bleed .image-container iframe, .full-bleed .image-container .iframe-embed, .full-bleed .image-container .the_img { height: 56vh !important; width:96vw !important; }
	.full-bleed .cam-card { width:96vw !important; max-width:96vw !important; }
}

	/* When in full-bleed mode position the cam card as a centered overlay
	   so the related sidebar remains visible underneath and the card stays centered. */
	.full-bleed .cam-card {
		position: absolute !important;
		top: 40px !important;
		/* by default center but shifted right to leave room for left sidebar (260px)
		   centerX = (viewport + sidebarWidth) / 2 -> left: calc((100% + 260px)/2) */
		left: 50% !important;
		transform: translateX(-50%) !important;
		width: 80vw !important;
		max-width: 80vw !important;
		z-index: 2000 !important;
		margin: 0 !important;
		border-radius: 12px !important;
		background: var(--panel) !important;
	}

@media (min-width: 1000px) {
  .full-bleed .cam-card { left: calc((100% + 260px) / 2) !important; transform: translateX(-50%) !important; }
}
	.full-bleed .image-container iframe,
	.full-bleed .image-container .iframe-embed,
	.full-bleed .image-container .the_img {
		height: calc(100vh - 160px) !important;
		max-height: calc(100vh - 160px) !important;
	}

	/* When in full-bleed make the left sidebar scrollable and constrained to viewport */
	.full-bleed .cam-sidebar {
		position: fixed;
		left: 12px;
		top: 40px;
		width: 260px;
		max-height: calc(100vh - 80px);
		overflow: auto;
		padding-right: 6px;
		z-index: 2050;
	}

	.related-list { padding-bottom: 24px; }
	.related-sentinel { height: 28px; }

	.related-loader { text-align:center; color:#666; font-size:0.95rem; padding:8px 6px; }

	/* Floating full-width FAB (bottom-right of iframe) */
	.fullwidth-fab {
		width: 46px;
		height: 46px;
		border-radius: 50%;
		background: #fc3f8b;
		color: #fff;
		border: none;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		box-shadow: 0 6px 20px rgba(0,0,0,0.18);
		cursor: pointer;
	}
	.fullwidth-fab svg { width:20px; height:20px; display:block; }
	.fullwidth-fab[aria-pressed="true"], .fullwidth-fab.pressed { background: #ff6b8a; }
	.fullwidth-fab:focus { outline: 3px solid rgba(252,63,139,0.18); }
	.fullwidth-fab.inline { position: static; margin-right: 6px; }
	.fullwidth-fab.absolute { position: absolute; right: 12px; bottom: 12px; z-index: 2100; }

	/* Show FAB on wide screens and hide the textual fullwidth button; reverse on small screens */
	@media (min-width: 900px) {
		.fullwidth-btn { display: none; }
		.fullwidth-fab.inline { display: inline-flex; }
	}
	@media (max-width: 899px) {
		.fullwidth-fab.inline { display: none; }
		.fullwidth-btn { display: block; }
	}

/* small subtitle under badge */
.badge .since { display: block; font-size: 0.78rem; opacity: 0.95; margin-left: 8px; color: rgba(255,255,255,0.95); font-weight:600; }
.badge.followers .since { color: rgba(34,34,34,0.9); }

/* subtle pulse for viewers badge */
.pulse { box-shadow: 0 10px 30px rgba(255,107,138,0.12); }
@keyframes pulse-shadow {
	0% { box-shadow: 0 6px 18px rgba(0,0,0,0.06), 0 0 0 0 rgba(255,107,138,0.12); }
	70% { box-shadow: 0 10px 30px rgba(255,107,138,0.12), 0 0 0 12px rgba(255,107,138,0.06); }
	100% { box-shadow: 0 6px 18px rgba(0,0,0,0.06), 0 0 0 0 rgba(255,107,138,0.0); }
}

/* Keep header and logo visible when full-bleed is active */
body.full-bleed .site-header {
	position: relative;
	z-index: 3001; /* above cam-card (2000) */
	background: transparent;
}

/* Shrink logo in full-bleed so it doesn't obstruct the view */
body.full-bleed .site-logo-link { height:44px; overflow:visible; }
body.full-bleed .site-logo { height:100%; transform: scale(0.72); transition: transform 160ms ease; }

/* Ensure header elements remain interactive */
body.full-bleed .site-header a, body.full-bleed .site-header button { position: relative; z-index: 3002; }
.pulse { animation: pulse-shadow 2.8s infinite ease-out; }

.cam-details .label { display:inline-block; min-width: 110px; color:#444; }
.cam-details .value { color:#111; }
.cam-details { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 20px; margin-top: 14px; }
.cam-details .detail { display:flex; gap:8px; align-items:flex-start; }
.cam-details .detail.full { grid-column: 1 / -1; }
.cam-details .label { font-weight: 700; color: #555; min-width: 110px; }
.cam-details .value { color: #222; }
.watch-link a { color: #fc3f8b; font-weight: 700; text-decoration: none; }
.watch-link a:hover { text-decoration: underline; }
@media (max-width: 700px) {
	.cam-details { grid-template-columns: 1fr; }
	.meta-left .username { font-size: 1.6rem; }
}

/* Ensure cam card is centered in the page on large screens */
main > .cam-card { margin-left: auto !important; margin-right: auto !important; display: block; }

/* Make the cam card a fixed 900px on wide screens but allow it to shrink on smaller viewports */
.gallery-item.itsnew.cam-card {
	width: 900px;
	max-width: 100%;
	box-sizing: border-box;
	margin: 0 auto;
}

@media (max-width: 960px) {
	.gallery-item.itsnew.cam-card {
		width: 100%;
		padding: 0 12px;
	}
}

/* small tag pills for cam detail tags */
.tag-pill { display:inline-block; margin:4px 6px 4px 0; padding:6px 10px; background:var(--panel); color:var(--text); border-radius:999px; text-decoration:none; font-weight:600; font-size:0.95rem; transition: background 180ms ease, color 180ms ease; }
.tag-pill:hover { background:var(--accent); color:#fff; }

/* Cam layout with left sidebar and main content */
.cam-layout { display:flex; gap:28px; align-items:flex-start; }
.cam-sidebar { width:260px; flex:0 0 260px; padding-top:0px; }
.cam-main { flex:1 1 auto; }
.related-list { display:flex; flex-direction:column; gap:12px; }
.related-item { display:block; text-decoration:none; color:inherit; }
.related-thumb { width:260px; height:160px; background-size:cover; background-position:center; border-radius:10px; overflow:hidden; position:relative; box-shadow:0 6px 18px rgba(0,0,0,0.08); }
.related-overlay { position: absolute; left: 8px; right: 8px; bottom: 8px; padding: 8px 10px; background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.6) 100%); color: #fff; font-weight:700; font-size:1rem; display:flex; gap:8px; align-items:center; justify-content:space-between; }
.related-overlay .rel-name { font-weight:800; }
.related-overlay .rel-age { font-weight:600; opacity:0.9; font-size:0.95rem; }
.sidebar-gallery .gallery { display:flex; flex-direction:column; gap:12px; }
.sidebar-gallery .gallery-item { width:100%; display:flex; gap:12px; align-items:center; position:relative; }
.sidebar-gallery .gallery-item .the_img { width:220px !important; height:140px !important; object-fit:cover !important; border-radius:10px; display:block !important; flex: 0 0 220px !important; }
/* overlay name+age on injected sidebar gallery items */
.sidebar-gallery .gallery-item .image-container { position: relative; }
.sidebar-gallery .gallery-item .gallery-item-info { position: absolute; left: 8px; right: 8px; bottom: 8px; background: rgba(0,0,0,0.55); color: #fff; padding: 8px 10px; border-radius: 8px; display:flex; align-items:center; justify-content:space-between; }
.sidebar-gallery .gallery-item .gallery-item-info .username { color: #fff; margin: 0; }
.sidebar-gallery .gallery-item .gallery-item-info .details, .sidebar-gallery .gallery-item .gallery-item-info .time-online { display: none; }
/* compact info: show only viewers count and username */
.sidebar-gallery .gallery-item-info .username { font-size: 1rem; margin: 0 0 6px 0; }
.sidebar-gallery .gallery-item-info .details { display: none; }
.sidebar-gallery .gallery-item-info .time-online { display: none; }
.sidebar-gallery .gallery-item-info .detail-item.viewers { display: block; font-weight:700; color:#444; }
.sidebar-gallery .gallery-item-info .detail-item.followers { display:none; }
/* highlight selected thumbnail */
.sidebar-gallery .gallery-item.selected { outline: 2px solid #fc3f8b; border-radius: 8px; box-shadow: 0 8px 20px rgba(252,63,139,0.08); }
.sidebar-gallery .gallery-item .the_img[src^="data:"] { object-fit:cover; }
.related-overlay { position:absolute; left:0; right:0; bottom:0; padding:8px 10px; background:linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.5) 100%); color:#fff; font-weight:700; font-size:0.95rem; }
@media (max-width:1000px) {
	.cam-layout { flex-direction:column; }
	.cam-sidebar { width:100%; flex:0 0 auto; order: 1; }
	.cam-main { order: 0; }
}

/* Make the cam sidebar sticky and independently scrollable on wide screens (like full-bleed) */
@media (min-width: 900px) {
  .cam-sidebar { position: sticky; top: 40px; max-height: calc(100vh - 80px); overflow: auto; }
}

@media (max-width:600px) {
  .related-thumb { width:100%; height:120px; }
  .related-overlay { font-size:0.95rem; padding:10px; }
}

/* Ensure iframe fills available width when related sidebar stacks below */
@media (max-width:1000px) {
	.cam-main .cam-card { width:100% !important; max-width:100% !important; margin:0 !important; }
	.cam-main .image-container iframe, .cam-main .image-container .iframe-embed, .cam-main .image-container .the_img {
		width:100% !important;
		height: 56vh !important;
		max-height: none !important;
		display:block;
	}
}

/* Dark mode visual overrides for panels/text */
body.dark-mode .sidebar-title,
body.dark-mode .username-badge,
body.dark-mode .username { color: var(--text); }
body.dark-mode .gallery-item-info,
body.dark-mode .cam-details { color: var(--text); }
body.dark-mode a { color: #9ad1ff; }

/* Dark mode toggle button (fixed bottom-left) */
.dark-toggle {
	position: fixed;
	left: 12px;
	bottom: 12px;
	width: 44px;
	height: 44px;
	border-radius: 8px;
	border: none;
	background: rgba(0,0,0,0.06);
	color: var(--text);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 6px 18px rgba(0,0,0,0.08);
	cursor: pointer;
	z-index: 2200;
}
.dark-toggle[aria-pressed="true"] { background: var(--accent); color: #fff; }

