html, body { overscroll-behavior: none; }

.nff-root {
	position: fixed;
	inset: 0;
	background: #3a3a3a;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	touch-action: none;
	font-family: Arial, Helvetica, sans-serif;
	z-index: 9999;
}

.nff-stage {
	position: relative;
	width: 100%;
	height: 100%;
	max-width: 520px;
	perspective: 1800px;
}

.nff-hint {
	position: absolute;
	bottom: 6px;
	left: 50%;
	transform: translateX(-50%);
	color: rgba(255,255,255,.55);
	font-size: 12px;
	letter-spacing: .05em;
	pointer-events: none;
	z-index: 5;
}

/* ---- top half: image, always static, never flips ---- */
#nff-img { position: absolute; top: 0; left: 0; right: 0; height: 50%; overflow: hidden; }

.nff-image-static {
	position: absolute;
	inset: 0;
	background: #e8e8e8 repeating-conic-gradient(#ddd 0% 25%, #f4f4f4 0% 50%) 0 0/24px 24px;
	background-size: cover;
	background-position: center;
	overflow: hidden;
}

.nff-img-current { z-index: 1; }
.nff-img-incoming {
	z-index: 2;
	opacity: 0;
	background-color: transparent; /* no checker flash while empty/transparent */
}

.nff-copyright {
	position: absolute;
	right: 10px;
	bottom: 10px;
	background: #e21b1b;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	padding: 4px 8px;
	letter-spacing: .03em;
}

/* ---- bottom half: the only part that flips, hinged invisibly at the
       exact vertical center (the "imaginary" line — never drawn) ---- */
.nff-flip-lower {
	position: absolute;
	top: 50%; left: 0; right: 0; bottom: 0;
	transform-style: preserve-3d;
	transform-origin: top center;
	will-change: transform;
}

.nff-face {
	position: absolute;
	inset: 0;
	backface-visibility: hidden;
	background: #fff;
	overflow: hidden;
}

.nff-face.nff-back {
	transform: rotateX(180deg);
}

.nff-body {
	height: 100%;
	padding: 14px 16px 10px;
	display: flex;
	flex-direction: column;
	min-height: 0;
	box-sizing: border-box;
}

.nff-title {
	font-size: 22px;
	font-weight: 800;
	text-transform: uppercase;
	margin: 4px 0 8px;
	color: #111;
}

.nff-desc {
	font-size: 12.5px;
	line-height: 1.5;
	color: #222;
	text-transform: uppercase;
	overflow: hidden;
	flex: 1;
}

.nff-readmore {
	color: #2b3fbe;
	font-weight: 700;
	font-size: 12.5px;
	text-decoration: none;
	white-space: nowrap;
}

.nff-meta {
	margin-top: auto;
	padding-top: 8px;
	font-size: 12px;
	color: #222;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.nff-meta-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.nff-author, .nff-time {
	display: flex;
	align-items: center;
	gap: 5px;
}
.nff-author { font-weight: 700; }
.nff-author svg, .nff-time svg { width: 13px; height: 13px; fill: #444; flex-shrink: 0; }

.nff-like {
	display: flex;
	align-items: center;
	gap: 5px;
	background: none;
	border: none;
	padding: 0;
	font-size: 13px;
	font-weight: 700;
	color: #222;
	cursor: pointer;
}
.nff-like svg { width: 17px; height: 17px; fill: #999; transition: fill .15s, transform .15s; }
.nff-like.liked svg { fill: #e21b1b; transform: scale(1.15); }

.nff-share {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #25D366;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	text-decoration: none;
	flex-shrink: 0;
}
.nff-share svg { width: 15px; height: 15px; fill: #fff; }

@media (max-width: 480px) {
	.nff-title { font-size: 19px; }
	.nff-desc { font-size: 11.5px; }
}
