/* CaptionHub — dark masonry meme grid, matching the reference layout */

/* Force full-width, no matter what else (a page builder, a hosting
   platform's own wrapper, etc.) might otherwise try to box content
   into a narrower centered column. */
html, body, #page, .site, .site-content, .wp-site-blocks,
.hostinger-wrapper, .entry-content, .content-area, main, #main {
	max-width: none !important;
	width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

body {
	background: #0a0a0a;
	color: #fff;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	margin: 0;
}

.ch-top-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 14px 24px;
	background: #0a0a0a;
	border-bottom: 1px solid #1c1c1e;
	position: sticky;
	top: 0;
	z-index: 100;
}

.ch-logo {
	color: #fff;
	font-weight: 800;
	font-size: 18px;
	text-decoration: none;
	letter-spacing: 0.5px;
}

.ch-top-bar-controls {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1;
	justify-content: flex-end;
}

.ch-category-select {
	background: #1c1c1e;
	color: #fff;
	border: 1px solid #333;
	border-radius: 6px;
	padding: 8px 12px;
	font-size: 13px;
}

.ch-btn {
	background: #1c1c1e;
	color: #fff;
	border: 1px solid #333;
	border-radius: 6px;
	padding: 8px 16px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	display: inline-block;
}

.ch-btn:hover {
	background: #2a2a2c;
}

.ch-btn-outline {
	background: transparent;
}

.ch-upload-btn {
	background: #c8102e;
	border-color: #c8102e;
	color: #fff;
	margin-left: 6px;
}

.ch-upload-btn:hover {
	background: #a80e26;
}

.ch-avatar-link {
	display: block;
	margin-left: 10px;
	line-height: 0;
}

.ch-avatar {
	border-radius: 50%;
	display: block;
	border: 2px solid #333;
}

.ch-avatar-link:hover .ch-avatar {
	border-color: #c8102e;
}

.ch-search-input {
	background: #1c1c1e;
	color: #fff;
	border: 1px solid #333;
	border-radius: 6px;
	padding: 8px 14px;
	font-size: 13px;
	min-width: 200px;
}

.ch-search-input::placeholder {
	color: #777;
}

/* Masonry grid via CSS columns — variable-height cards flow like the
   reference screenshot without needing a JS masonry library. */
.ch-meme-grid {
	column-count: 7;
	column-gap: 14px;
	padding: 20px 24px;
}

@media (max-width: 1600px) {
	.ch-meme-grid { column-count: 6; }
}
@media (max-width: 1400px) {
	.ch-meme-grid { column-count: 5; }
}
@media (max-width: 1000px) {
	.ch-meme-grid { column-count: 3; }
}
@media (max-width: 700px) {
	.ch-meme-grid { column-count: 2; }
	.ch-top-bar { flex-wrap: wrap; padding: 10px 14px; }
	.ch-search-input { min-width: 140px; }
}

.ch-meme-card {
	display: block;
	position: relative;
	break-inside: avoid;
	margin-bottom: 14px;
	border-radius: 8px;
	overflow: hidden;
	text-decoration: none;
	background: #1c1c1e;
}

.ch-meme-card img,
.ch-meme-card video {
	width: 100%;
	height: auto;
	display: block;
}

/* Upload form */
.ch-upload-form {
	max-width: 480px;
	margin: 30px auto;
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 0 20px;
}

.ch-upload-form label {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
}

.ch-upload-form input[type="text"],
.ch-upload-form select {
	background: #1c1c1e;
	color: #fff;
	border: 1px solid #333;
	border-radius: 6px;
	padding: 10px 12px;
	font-size: 14px;
	font-weight: 400;
}

.ch-upload-hint {
	font-size: 11px;
	font-weight: 400;
	color: #888;
}

.ch-caption-maker {
	max-width: 600px;
	margin: 30px auto;
	padding: 0 20px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.ch-caption-maker label {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
}

.ch-caption-maker input[type="text"],
.ch-caption-maker input[type="file"],
.ch-caption-maker select {
	background: #1c1c1e;
	color: #fff;
	border: 1px solid #333;
	border-radius: 6px;
	padding: 10px 12px;
	font-size: 14px;
	font-weight: 400;
}

.ch-caption-canvas {
	display: none;
	max-width: 100%;
	border-radius: 8px;
	background: #111;
	cursor: move;
	touch-action: none;
}

.ch-hidden-real-file-input {
	display: none;
}

.ch-tags-input-wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	background: #1c1c1e;
	border: 1px solid #333;
	border-radius: 6px;
	padding: 8px 10px;
}

.ch-tags-input-wrap:focus-within {
	border-color: #c8102e;
}

.ch-tags-input-wrap input[type="text"] {
	flex: 1;
	min-width: 120px;
	background: transparent;
	border: none;
	padding: 4px 2px;
	font-size: 13px;
	color: #fff;
}

.ch-tags-input-wrap input[type="text"]:focus {
	outline: none;
}

.ch-tag-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #c8102e;
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	border-radius: 999px;
	padding: 5px 6px 5px 12px;
}

.ch-tag-chip-remove {
	background: rgba(255,255,255,0.25);
	color: #fff;
	border: none;
	border-radius: 50%;
	width: 16px;
	height: 16px;
	line-height: 1;
	font-size: 12px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.ch-tag-chip-remove:hover {
	background: rgba(255,255,255,0.4);
}

.ch-upload-categories {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
}

.ch-upload-categories-label {
	font-size: 13px;
	font-weight: 600;
}

.ch-upload-categories select {
	background: #1c1c1e;
	color: #fff;
	border: 1px solid #333;
	border-radius: 6px;
	padding: 10px 12px;
	font-size: 14px;
	font-weight: 400;
}

.ch-upload-message {
	max-width: 480px;
	margin: 20px auto 0;
	padding: 12px 16px;
	background: #1c1c1e;
	border-radius: 8px;
	font-size: 14px;
}

.ch-upload-preview {
	background: #1c1c1e;
	border: 1px solid #333;
	border-radius: 10px;
	padding: 16px;
}

.ch-upload-preview-heading {
	font-size: 13px;
	font-weight: 700;
	margin: 0 0 12px;
	color: #999;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.ch-upload-preview-media {
	border-radius: 8px;
	overflow: hidden;
	margin-bottom: 12px;
	background: #000;
}

.ch-upload-preview-media img,
.ch-upload-preview-media video {
	width: 100%;
	max-height: 400px;
	object-fit: contain;
	display: block;
	margin: 0 auto;
}

.ch-upload-preview-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 10px;
}

.ch-upload-preview-category {
	font-size: 13px;
	color: #999;
}

.ch-upload-login-prompt {
	max-width: 400px;
	margin: 60px auto;
	text-align: center;
}

.ch-upload-login-prompt .ch-btn {
	margin: 0 6px;
}

.ch-grid-status {
	text-align: center;
	color: #666;
	padding: 20px;
	font-size: 13px;
}

.ch-ad-card {
	position: relative;
}

.ch-ad-card img,
.ch-ad-card video {
	width: 100%;
	height: auto;
	display: block;
}

.ch-ad-label {
	position: absolute;
	top: 8px;
	left: 8px;
	background: rgba(0, 0, 0, 0.65);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	padding: 3px 8px;
	border-radius: 4px;
}

/* Categories page */
.ch-categories-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px 24px 0;
}

.ch-categories-header h1 {
	font-size: 20px;
	font-weight: 800;
	margin: 0;
}

.ch-categories-sort-toggle {
	display: flex;
	gap: 8px;
}

.ch-categories-sort-btn {
	background: #1c1c1e;
	color: #ccc;
	border: 1px solid #333;
	border-radius: 999px;
	padding: 6px 14px;
	font-size: 12px;
	font-weight: 600;
	text-decoration: none;
}

.ch-categories-sort-btn.ch-categories-sort-active {
	background: #c8102e;
	border-color: #c8102e;
	color: #fff;
}

.ch-categories-count {
	padding: 0 24px;
	margin: 8px 0 0;
	font-size: 13px;
	color: #999;
}

.ch-categories-no-results {
	padding: 20px 24px;
	color: #999;
	font-size: 14px;
}

.ch-categories-suggested {
	margin-top: 30px;
	padding-top: 24px;
	border-top: 1px solid #1c1c1e;
}

.ch-categories-suggested-heading {
	font-size: 16px;
	font-weight: 800;
	padding: 0 24px;
	margin: 0 0 12px;
}

.ch-categories-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 18px;
	padding: 12px 24px 24px;
}

@media (max-width: 1400px) {
	.ch-categories-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 900px) {
	.ch-categories-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
	.ch-categories-grid { grid-template-columns: repeat(2, 1fr); }
}

.ch-category-tile {
	display: block;
	text-decoration: none;
	max-width: 220px;
}

.ch-category-tile-thumb {
	width: 100%;
	aspect-ratio: 1 / 1;
	border-radius: 10px;
	overflow: hidden;
	background: #1c1c1e;
	margin-bottom: 8px;
}

.ch-category-tile-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ch-category-tile-name {
	display: block;
	font-size: 14px;
	font-weight: 700;
	color: #fff;
}

.ch-category-tile-count {
	display: block;
	font-size: 12px;
	color: #999;
}

.ch-category-page-title {
	font-size: 20px;
	font-weight: 800;
	padding: 20px 24px 0;
	margin: 0 0 8px;
}

/* Single meme page */
.ch-single-meme-wrap {
	max-width: 600px;
	margin: 30px auto;
	padding: 0 20px;
	text-align: center;
}

.ch-single-meme-card {
	position: relative;
	border-radius: 8px;
	overflow: hidden;
	margin-bottom: 16px;
}

.ch-single-meme-card img,
.ch-single-meme-card video {
	width: 100%;
	height: auto;
	display: block;
}

.ch-single-meme-meta {
	color: #999;
	font-size: 13px;
	margin-bottom: 20px;
}

.ch-single-meme-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin: 14px 0;
}

.ch-tag-pill {
	background: #1c1c1e;
	color: #ccc;
	border: 1px solid #333;
	border-radius: 999px;
	padding: 6px 14px;
	font-size: 12px;
	font-weight: 600;
	text-decoration: none;
}

.ch-tag-pill:hover {
	background: #c8102e;
	border-color: #c8102e;
	color: #fff;
}

.ch-similar-wrap {
	max-width: 1000px;
	margin: 40px auto 0;
	padding: 0 20px 40px;
}

.ch-similar-heading {
	font-size: 18px;
	font-weight: 800;
	margin: 0 0 16px;
}

.ch-page-wrap {
	max-width: 600px;
	margin: 0 auto;
	padding: 20px;
}

.ch-page-title {
	font-size: 22px;
	font-weight: 800;
}

/* Profile page */
.ch-profile-wrap {
	max-width: 700px;
	margin: 0 auto;
	padding: 30px 20px;
}

.ch-profile-header {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 16px;
}

.ch-profile-avatar {
	border-radius: 50%;
	flex-shrink: 0;
}

.ch-profile-header-info {
	flex: 1;
}

.ch-profile-username {
	font-size: 22px;
	font-weight: 800;
	margin: 0 0 4px;
}

.ch-profile-stats-inline {
	font-size: 13px;
	color: #999;
}

.ch-profile-logout-btn {
	align-self: flex-start;
}

.ch-btn-small {
	font-size: 12px;
	padding: 6px 12px;
}

.ch-profile-bio-form {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	background: #1c1c1e;
	border: 1px solid #333;
	border-radius: 8px;
	padding: 14px;
	margin-bottom: 16px;
}

.ch-profile-bio-form textarea {
	flex: 1;
	background: transparent;
	border: none;
	color: #fff;
	font-size: 14px;
	resize: vertical;
	min-height: 40px;
}

.ch-profile-bio-form textarea:focus {
	outline: none;
}

.ch-profile-actions {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	margin-bottom: 24px;
}

.ch-profile-columns {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

@media (max-width: 700px) {
	.ch-profile-columns {
		grid-template-columns: 1fr;
	}
}

.ch-profile-column {
	background: #1c1c1e;
	border: 1px solid #333;
	border-radius: 8px;
	padding: 18px;
}

.ch-profile-column h2 {
	font-size: 14px;
	font-weight: 700;
	margin: 0 0 14px;
}

.ch-profile-stat-row {
	display: flex;
	justify-content: space-between;
	font-size: 13px;
	padding: 8px 0;
	border-bottom: 1px solid #2a2a2c;
}

.ch-profile-stat-row:last-of-type {
	border-bottom: none;
}

.ch-profile-stat-row span:first-child {
	color: #999;
}

.ch-profile-danger-zone {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px solid #2a2a2c;
	font-size: 12px;
}

.ch-profile-danger-zone a {
	color: #999;
	text-decoration: none;
}

.ch-profile-delete-btn {
	background: none;
	border: none;
	color: #e8555a;
	font-size: 12px;
	cursor: pointer;
	padding: 0;
}

/* Play Fullscreen slideshow */
.ch-single-meme-actions {
	text-align: center;
	margin-bottom: 14px;
}

.ch-fullscreen-overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: #000;
	z-index: 9999;
	align-items: center;
	justify-content: center;
}

.ch-fullscreen-overlay.ch-fullscreen-active {
	display: flex;
}

.ch-fullscreen-media {
	max-width: 100%;
	max-height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ch-fullscreen-media img,
.ch-fullscreen-media video {
	max-width: 100vw;
	max-height: 100vh;
	object-fit: contain;
}

.ch-fullscreen-close {
	position: absolute;
	top: 20px;
	right: 24px;
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	border: none;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	font-size: 22px;
	cursor: pointer;
	z-index: 10000;
}

.ch-fullscreen-hint {
	position: absolute;
	top: 30px;
	right: 74px;
	color: #fff;
	font-size: 13px;
	font-weight: 500;
	background: rgba(255, 255, 255, 0.1);
	padding: 8px 14px;
	border-radius: 999px;
	z-index: 10000;
	opacity: 1;
	transition: opacity 0.6s ease;
}

.ch-fullscreen-hint.ch-fullscreen-hint-hidden {
	opacity: 0;
	pointer-events: none;
}
