/* Cornice semplice: bordo nero sottile, angoli arrotondati */
.f3-frame {
	width: 100%;
	max-width: 960px;
	margin: 40px auto;
	aspect-ratio: 16 / 9;
	border: 2px solid #000;
	border-radius: 14px;
	overflow: hidden;
	background: #000;
	box-sizing: border-box;
}

.f3-frame-video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.f3-frame-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	font-family: Arial, sans-serif;
	font-size: 16px;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: #555;
}

/* Farm3D TV — integrazione esatta mockup Lorenzo */
.tv-container {
	position: relative;
	width: 100%;
	max-width: 600px;
	aspect-ratio: 4 / 3;
	margin: 40px auto 0;
	z-index: 10;
	transition: all 0.3s ease;
}

.channel-display {
	position: absolute;
	bottom: 5%;
	left: 5%;
	color: #33ff33;
	font-family: 'Courier New', Courier, monospace;
	font-size: clamp(20px, 4vw, 40px);
	font-weight: bold;
	text-shadow: 0 0 8px rgba(51, 255, 51, 0.8);
	z-index: 10;
	pointer-events: none;
	transition: opacity 0.1s;
}

.tv-body {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: #c4763e;
	border-radius: 40px;
	border: 6px solid #4a2f1d;
	box-sizing: border-box;
	z-index: 2;
	display: flex;
	flex-direction: column;
	padding: 5%;
	box-shadow:
		inset 0 10px 0px rgba(255,255,255,0.2),
		inset 10px 0 0px rgba(255,255,255,0.1),
		inset -10px 0 0px rgba(0,0,0,0.1),
		inset 0 -15px 0px rgba(0,0,0,0.15);
}

.tv-screen {
	position: relative;
	flex-grow: 1;
	width: 100%;
	background-color: #000;
	border-radius: 30% / 15%;
	border: 6px solid #4a2f1d;
	box-sizing: border-box;
	overflow: hidden;
	box-shadow:
		inset 0 10px 15px rgba(0,0,0,0.1),
		inset 0 -5px 10px rgba(0,0,0,0.05),
		0 0 0 10px #b16431;
	margin-bottom: 5%;
}

.tv-screen::before {
	content: '';
	position: absolute;
	top: 5%;
	left: 5%;
	width: 90%;
	height: 40%;
	background: linear-gradient(to bottom, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 100%);
	border-radius: 30% / 10%;
	pointer-events: none;
	opacity: 0.6;
	z-index: 5;
}

.tv-video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: opacity 0.3s ease;
	pointer-events: none;
}
.tv-video.is-active { opacity: 1; }

.control-panel {
	position: relative;
	width: 100%;
	height: 20%;
	min-height: 60px;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	padding: 0 4%;
	box-sizing: border-box;
	background-color: rgba(0,0,0,0.05);
	border-radius: 10px;
	border: 2px solid rgba(0,0,0,0.1);
}

.channel-buttons {
	display: flex;
	flex-direction: row;
	gap: 15px;
}

.ch-btn-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
}

.ch-label {
	font-family: sans-serif;
	font-size: clamp(10px, 2vw, 14px);
	font-weight: bold;
	color: #4a2f1d;
}

.ch-btn {
	width: clamp(25px, 5vw, 40px);
	height: clamp(15px, 3vw, 25px);
	background-color: #d1b49f;
	border: 3px solid #4a2f1d;
	border-radius: 4px;
	box-shadow: 0 4px 0 #8c5b36, inset 0 2px 0 rgba(255,255,255,0.5);
	cursor: pointer;
	transition: all 0.1s;
}

.ch-btn.is-active,
.ch-btn:active {
	transform: translateY(4px);
	box-shadow: 0 0 0 #8c5b36, inset 0 2px 0 rgba(255,255,255,0.5);
}

.audio-knob-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
}

.audio-label {
	font-family: sans-serif;
	font-size: clamp(10px, 2vw, 12px);
	font-weight: bold;
	color: #4a2f1d;
	text-transform: uppercase;
	text-align: center;
	line-height: 1;
}

.audio-knob {
	width: clamp(30px, 6vw, 45px);
	height: clamp(30px, 6vw, 45px);
	background-color: #333;
	border-radius: 50%;
	border: 4px solid #4a2f1d;
	position: relative;
	box-shadow:
		inset 0 4px 0 rgba(255,255,255,0.2),
		0 4px 5px rgba(0,0,0,0.3);
	cursor: pointer;
	padding: 0;
}

.audio-knob::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 4px;
	height: 40%;
	background-color: #ddd;
	border-radius: 2px;
	transform-origin: bottom center;
	transform: translate(-50%, -100%) rotate(-130deg);
	transition: transform 0.2s ease;
}
.audio-knob.is-on::after { transform: translate(-50%, -100%) rotate(0deg); }

.tv-foot {
	position: absolute;
	bottom: -5%;
	width: 10%;
	height: 10%;
	min-height: 20px;
	background-color: #a75b29;
	border: 5px solid #4a2f1d;
	border-top: none;
	z-index: 1;
	box-shadow: inset 5px 0 0px rgba(255,255,255,0.2);
}

.tv-foot.left {
	left: 15%;
	border-radius: 0 0 10px 20px;
	transform: skewX(15deg);
}

.tv-foot.right {
	right: 15%;
	border-radius: 0 0 20px 10px;
	transform: skewX(-15deg);
}

@media (max-width: 600px) {
	.tv-container {
		aspect-ratio: 1 / 1;
		max-width: 100%;
	}
	.tv-body { border-radius: 30px; }
	.tv-screen {
		border-radius: 20% / 10%;
		box-shadow:
			inset 0 10px 15px rgba(0,0,0,0.1),
			inset 0 -5px 10px rgba(0,0,0,0.05),
			0 0 0 6px #b16431;
	}
	.control-panel { padding: 0 2%; }
	.channel-buttons { gap: 10px; }
}
