/* Display page styles */

/* Image container - full viewport */
.display-container {
  position: fixed;
  inset: 0;
  background: var(--bg);
  overflow: hidden;
}

.display-container .img-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  z-index: 1;
}

.display-container .img-layer.active {
  opacity: 1;
  z-index: 2;
}

/* Idle message */
.idle-message {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 3;
  color: var(--text-dim);
  font-size: 1.2rem;
  transition: opacity 0.8s ease;
  pointer-events: none;
}

.idle-message.hidden {
  opacity: 0;
}

.idle-message .idle-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.4;
}

.idle-message .idle-text {
  opacity: 0.6;
}

/* Entry count in idle state */
.entry-count-display {
  font-size: 0.85rem;
  color: var(--text-dim);
  opacity: 0.5;
  margin-top: 12px;
  pointer-events: auto;
}

.entry-count-display a {
  color: var(--accent);
  text-decoration: none;
}

.entry-count-display a:hover {
  text-decoration: underline;
}

/* Tutorial hint */
.tutorial-hint {
  margin-top: 20px;
  font-size: 0.9rem;
  color: var(--text-dim);
  opacity: 0.7;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  animation: hint-pulse 2.5s ease-in-out infinite;
}

.tutorial-hint.hidden {
  display: none;
}

.tutorial-hint .hint-arrow {
  font-size: 1.2rem;
  opacity: 0.5;
}

@keyframes hint-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.9; }
}

/* Controls bar at bottom */
.controls-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  transition: opacity 0.5s ease;
}

.controls-bar.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Mic button */
.mic-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
  flex-shrink: 0;
}

.mic-btn svg {
  width: 22px;
  height: 22px;
  fill: var(--text-dim);
  transition: fill 0.3s;
}

.mic-btn:hover {
  border-color: var(--text-dim);
}

.mic-btn.listening {
  border-color: var(--accent);
  background: rgba(233, 69, 96, 0.15);
}

.mic-btn.listening svg {
  fill: var(--accent);
}

/* Pulse animation when listening */
.mic-btn.listening {
  animation: mic-pulse 2s ease-in-out infinite;
}

@keyframes mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(233, 69, 96, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(233, 69, 96, 0); }
}

.status-text {
  font-size: 0.85rem;
  color: var(--text-dim);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-text.active {
  color: var(--success);
}

.status-text.error {
  color: var(--danger);
}

.ctrl-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
}

.ctrl-btn svg {
  width: 16px;
  height: 16px;
  fill: var(--text-dim);
}

.ctrl-btn:hover {
  border-color: var(--text-dim);
}

.ctrl-btn.active {
  border-color: var(--accent);
}

.ctrl-btn.active svg {
  fill: var(--accent);
}

.ctrl-btn.folder-active {
  border-color: var(--success);
}

.ctrl-btn.folder-active svg {
  fill: var(--success);
}

/* Debug overlay */
.debug-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  max-height: 50vh;
  overflow-y: auto;
  z-index: 40;
  background: rgba(0, 0, 0, 0.85);
  padding: 12px 16px;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--text);
  display: none;
  border-bottom: 1px solid var(--border);
}

.debug-overlay.active {
  display: block;
}

.debug-section {
  margin-bottom: 8px;
}

.debug-label {
  color: var(--accent);
  font-weight: 600;
  margin-right: 8px;
}

.debug-transcript {
  color: var(--success);
  word-break: break-word;
}

.debug-buffer {
  color: var(--text-dim);
}

.debug-scores {
  color: var(--warning);
}

.debug-current {
  color: #fff;
  font-weight: 600;
}

/* Admin link in corner */
.admin-link {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 45;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.75rem;
  opacity: 0.5;
  transition: opacity var(--transition);
}

.admin-link:hover {
  opacity: 1;
  color: var(--accent);
}

/* Version label */
.app-version {
  position: fixed;
  bottom: 4px;
  right: 8px;
  font-size: 0.65rem;
  color: var(--text-dim);
  opacity: 0.35;
  z-index: 5;
  pointer-events: none;
}
