:root {
	--bg: #1a1a1a; --panel-bg: #222; --card: #2c2c2c; --text: #f5f5f5;
	--muted: #b0b0b0; --accent: #00BFA6; --white: #ffffff;
}

* {
	box-sizing: border-box; margin: 0; padding: 0;
}

body, html {
	margin: 0; padding: 0; height: auto; /* allow natural page height */
	font-family: "Segoe UI", Roboto, Arial, sans-serif; background: var(--bg); color: var(--text);
}

/* HEADER */
.top-nav {
	display: flex; justify-content: space-between; align-items: center; padding: 1rem 2rem;
	background: var(--panel-bg); border-bottom: 2px solid var(--accent);
	height: 70px; flex-shrink: 0;
}

.brand {
	font-size: 1.7rem; font-weight: 700;
}

.btn {
	padding: 0.6rem 1.2rem; border-radius: 9999px; border: none;
	font-weight: 600; cursor: pointer;
}

.small {
	padding: 0.3rem 0.5rem; font-size: 0.8rem;
}

.primary {
	background: var(--card); color: var(--white);
}

.primary:hover {
	background: var(--accent);
}
/* Make ALL buttons hover cyan */
.btn:hover {
  background: var(--accent);
  color: var(--white);
}

.full {
	width: 100%;
}

/* APP CONTAINER: fill remaining space below header */
.app-container {
	display: flex; flex-direction: column; min-height: calc(100vh - 70px);
	/* header = 70px */
}

/* MAIN CONTENT: stretch to fill available height */
.app-content {
	display: flex; gap: 1rem; flex: 1; min-height: 0; padding: 1rem;
}

/* LEFT PANEL: Slides */
.left-panel {
	flex: 2; background: var(--panel-bg); border-radius: 1rem; position: relative;
	display: flex; align-items: center; justify-content: center; overflow: hidden;
}

.slides-placeholder {
	color: var(--muted); text-align: center; font-size: 1.2rem; width: 100%; height: 100%;
}

.slides-placeholder p {
	position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); margin: 0;
	text-align: center; font-size: 1.5rem; color: #ccc; pointer-events: auto;
	cursor: pointer;
}

/* Slide arrows */
.arrow {
	position: absolute; right: 10px; background: var(--card); color: var(--white); border: none;
	border-radius: 50%; padding: 0.5rem; cursor: pointer; font-size: 1rem;
}

.arrow.top-right {
	top: 10px;
}

.arrow.bottom-right {
	bottom: 10px;
}

/* RIGHT PANEL: Avatar & Camera */
.right-panel {
	flex: 1; display: flex; flex-direction: column; gap: 1rem;
}

/* Webcam container */
#webcam {
	width: 100%; height: 100%; /* fill camera-placeholder */ border-radius: 1rem;
	overflow: hidden; position: relative; background: #000;
}

.avatar-panel, .camera-panel {
	flex: 1; height: 45%; background: var(--panel-bg); border-radius: 1rem; display: flex;
	flex-direction: column; align-items: left; padding: 0rem;
}

.avatar-buttons {
	display: flex; gap: 0.5rem; margin-bottom: 0.5rem; flex-wrap: wrap;
}

.avatar-placeholder {
	color: var(--muted); width: 100%; flex: 1; display: flex; align-items: auto;
	justify-content: center; text-align: center; font-size: smaller;
}

/* ===== FEEDBACK OVERLAY (new layout) ===== */
#feedback-overlay {
	display: none; /* hidden by default */ position: fixed; top: 0; left: 0; width: 100%;
	height: 100%; background: rgba(0, 0, 0, 0.7); justify-content: center; align-items: center;
	gap: 1.5rem; z-index: 200; padding: 2rem; box-sizing: border-box; font-size: small;
}

/* Both sections side-by-side */
.basic-feedback, .ai-feedback-content {
	height: 80vh; border-radius: 1rem; padding: 1.2rem; box-sizing: border-box; overflow-y: auto;
}

/* Basic Feedback (right side, smaller area) */
.basic-feedback {
	flex: 1; background: var(--card); color: var(--text); display: flex; flex-direction: column;
	justify-content: flex-start; width: 30%;
}

/* AI Feedback (left side, main area) */
.ai-feedback-content {
	flex: 2; background: var(--panel-bg); color: var(--text); position: relative; width: 65%;
}
/* ===== Comprehensive review UI (inside .ai-feedback-content) ===== */
.pricing-box{
  background: var(--card);
  border-radius: 1rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

.pricing-row{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.badge{
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(0, 191, 166, 0.15);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
}

.countdown{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-weight: 700;
  color: var(--white);
}

.price{
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.price-was{
  color: var(--muted);
  text-decoration: line-through;
}

.price-now{
  color: var(--white);
  font-size: 1.2rem;
  font-weight: 800;
}

.pricing-note{
  margin-top: 0.6rem;
  color: var(--muted);
  line-height: 1.4;
  font-size: 0.95rem;
}

.benefits h3{
  margin: 0.8rem 0 0.4rem;
  color: var(--white);
  font-size: 1rem;
}

.benefits ul{
  margin: 0 0 1rem 1.1rem;
  color: var(--muted);
  line-height: 1.5;
}

.field-label{
  display: block;
  margin-bottom: 0.35rem;
  color: var(--muted);
}

.ai-feedback-content input[type="text"]{
  width: 100%;
  padding: 0.6rem 0.9rem;
  border-radius: 0.8rem;
  border: 1px solid #3a3a3a;
  background: #1f1f1f;
  color: var(--text);
  outline: none;
}

.ai-feedback-content input[type="text"]:focus{
  border-color: var(--accent);
}

.warn{
  margin-top: 0.7rem;
  color: #ffb3b3;
}

/* Close button */
#close-feedback {
	position: absolute; top: 1rem; right: 1rem; background: var(--accent); color: var(--white);
	border: none; border-radius: 50%; width: 30px; height: 30px; cursor: pointer;
	transition: background 0.3s ease;
}

#close-feedback:hover {
	background: var(--white); color: var(--bg);
}

/* Headings and text */
.basic-feedback h2,
.ai-feedback-content h2 {
	margin-top: 0; color: var(--white); font-size: 1.2rem; margin-bottom: 1rem;
}

.basic-feedback p, .ai-feedback-content p {
	color: var(--muted); line-height: 1.4;
}

/* Scroll styling */
.basic-feedback::-webkit-scrollbar, .ai-feedback-content::-webkit-scrollbar {
	width: 8px;
}

.basic-feedback::-webkit-scrollbar-thumb, .ai-feedback-content::-webkit-scrollbar-thumb {
	background-color: var(--accent); border-radius: 10px;
}
/* ===== SLIDE TIMINGS SUMMARY (inside Free Feedback) ===== */
#slide-timings-summary {
	margin-top: 0; padding: 0.5rem; background: var(--card); border-radius: 0.5rem;
	font-size: 0.9rem; line-height: 1.4; color: var(--muted);
	max-height: 250px; /* make scrollable if many slides */ overflow-y: auto;
}

#slide-timings-summary::-webkit-scrollbar {
	width: 6px;
}

#slide-timings-summary::-webkit-scrollbar-thumb {
	background-color: var(--accent); border-radius: 10px;
}

/* FOOTER */
footer {
	text-align: center; padding: 1.5rem; font-size: 0.9rem; background: var(--panel-bg);
	color: var(--muted); border-top: 2px solid var(--accent);
}

.slides-placeholder iframe {
	width: 100%; height: 100%; border-radius: 1rem;
}

#pdf-canvas {
	width: 100%; height: 100%
}

.avatar-panel {
	position: relative; display: flex; flex-direction: column; justify-content: center;
	align-items: center; height: 100%; background: var(--panel-bg); border-radius: 1rem;
	padding: 0.5rem; overflow: hidden;
}

.avatar-audio {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;

  display: flex;
  flex-direction: column;     /* ✅ stack rows */
  gap: 0.5rem;
}
.audio-row{
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
#voice-scope {
  width: 100%;
  height: 60px;          /* ✅ smaller so it fits the panel */
  display: block;
  background: #111;
  border-radius: 0.8rem;
  border: 1px solid #333;
}

/* Slim playback bar */
#audio-playback {
	width: 100%; padding: 0; margin: 0; height: 16px; /* thinner bar */ border: none;
	outline: none; background: transparent; filter: brightness(0.9);
}

/* Timer — small, elegant, minimal */
#recording-timer {
	font-family: monospace; font-size: 0.8rem; color: var(--muted); min-width: 40px;
	text-align: right; line-height: 1;
}

/* ===== AUDIENCE OVERLAY ===== */
#audience-overlay {
	display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; 
	background: #000; z-index: 300; justify-content: center; align-items: center;
	overflow: hidden; 
}

#audience-overlay video {
	width: 100%; height: 100%; object-fit: cover; transform: scale(3) translateY(-10%);
	transform-origin: center center; /* keep it centered */
}

#close-audience {
	position: absolute; top: 1rem; right: 1rem; background: var(--accent); color: var(--white);
	border: none; border-radius: 50%; width: 35px; height: 35px; font-size: 1rem;
	cursor: pointer; transition: background 0.3s ease; z-index: 301;
}

#close-audience:hover {
	background: var(--white); color: var(--bg);
}

/* Position the new Audience button on slides box */
.arrow.top-left {
	top: 10px; left: 10px;
}
/* Compact Audience button next to Up arrow */
#audience-btn {
	position: absolute; /* crucial: remove from normal flow */ top: 10px;
	right: 45px; /* just left of up arrow */ background: var(--card); color: var(--white);
	border: none; border-radius: 20px; padding: 0.25rem 0.5rem; /* minimal padding */
	font-size: 0.75rem; font-weight: 600; cursor: pointer;
	display: inline-flex; /* inline so width fits content */ align-items: center;
	gap: 0.25rem; white-space: nowrap; /* prevent wrapping */ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
	transition: background 0.2s ease, transform 0.1s ease; z-index: 10;
	width: auto; /* ensures width is only enough for text+icon */ min-width: 0; /* prevents parent influence */
	max-width: max-content; /* absolutely fit content */
}

#audience-btn:hover { background: var(--accent); color: var(--white); 
	transform: translateY(-1px);
}

#audience-btn:active { transform: scale(0.95); }

hr { border: 0; border-top: 1px solid var(--muted); margin: 0.5rem 0; }

/* RESPONSIVE */
@media (max-width: 768px) {
	.app-content {
		flex-direction: column;
	}

	.left-panel, .right-panel {
		width: 100%; height: 300px;
	}

	.avatar-panel, .camera-panel {
		flex: unset; height: 150px;
	}

	#feedback-overlay {
		flex-direction: column; align-items: stretch;
	}

	.basic-feedback,.ai-feedback-content {
		width: 100%; height: 45vh;
	}
}