/**
 * @file web/src/ui/styles.css
 * @description Design System "Dark Obsidian & Electric Cyan" per OFFCast.
 * Palette ufficiale:
 * - Background primario: #080C14
 * - Card Surface: #0F1624 con bordo 1px solid rgba(0, 229, 255, 0.2)
 * - Accento primario: #00E5FF (Electric Cyan)
 * - Accento secondario: #7C4DFF (Electric Violet)
 * - Testo primario: #F1F5F9
 * Include focus ring ad alto contrasto per la navigazione D-Pad dei telecomandi Smart TV (Android TV, LG webOS, Samsung Tizen).
 */

:root {
  --bg-obsidian: #080C14;
  --card-surface: #0F1624;
  --card-border: rgba(0, 229, 255, 0.2);
  --accent-cyan: #00E5FF;
  --accent-violet: #7C4DFF;
  --text-primary: #F1F5F9;
  --text-muted: #94A3B8;
  --danger-red: #FF5252;
  --success-green: #00E676;
}

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

html,
body {
  width: 100%;
  min-height: 100vh;
  background-color: var(--bg-obsidian);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.zc-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.zc-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background-color: var(--card-surface);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.zc-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.zc-brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
}

.zc-brand-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent-cyan);
}

.zc-brand-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.zc-mode-switcher {
  display: flex;
  gap: 0.6rem;
}

.zc-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.zc-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(0, 229, 255, 0.1);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 229, 255, 0.3);
}

.zc-badge--violet {
  background: rgba(124, 77, 255, 0.14);
  color: #C4B5FD;
  border-color: rgba(124, 77, 255, 0.4);
}

.zc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
}

.zc-card {
  background-color: var(--card-surface);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.zc-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.zc-btn {
  appearance: none;
  cursor: pointer;
  padding: 0.8rem 1.2rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid rgba(0, 229, 255, 0.35);
  background: rgba(15, 22, 36, 0.9);
  color: var(--text-primary);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.zc-btn:hover {
  background: rgba(0, 229, 255, 0.14);
}

/* Navigazione D-Pad ad alto contrasto per telecomandi Smart TV (LG webOS, Samsung Tizen, Android TV) */
.zc-btn:focus,
.zc-btn:focus-visible,
.zc-input:focus-visible {
  outline: 3px solid var(--accent-cyan);
  outline-offset: 3px;
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.55);
  transform: scale(1.02);
}

.zc-btn--primary {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, #00B8D4 100%);
  color: #080C14;
  border: none;
  font-weight: 700;
}

.zc-btn--primary:hover {
  background: linear-gradient(135deg, #33EBFF 0%, var(--accent-cyan) 100%);
}

.zc-btn--tv-hero {
  padding: 1.15rem 1.75rem;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  border: 2px solid var(--accent-cyan);
  box-shadow: 0 0 28px rgba(0, 229, 255, 0.28);
}

.zc-sphere-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: radial-gradient(circle at center, rgba(0, 229, 255, 0.08) 0%, rgba(8, 12, 20, 0.95) 75%);
  border-radius: 16px;
  border: 1px solid rgba(0, 229, 255, 0.18);
}

.zc-sphere-canvas {
  width: 280px;
  height: 280px;
  max-width: 100%;
  border-radius: 50%;
}

.zc-ttl-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.zc-reminder-banner {
  background: rgba(124, 77, 255, 0.14);
  border: 1px solid rgba(124, 77, 255, 0.45);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-primary);
}

.zc-status-box {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: rgba(8, 12, 20, 0.75);
  border-left: 3px solid var(--accent-cyan);
  font-size: 0.88rem;
  color: var(--text-primary);
}

.zc-status-box--alert {
  border-left-color: var(--danger-red);
  color: #FCA5A5;
}

.zc-video-stage {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  overflow: hidden;
  position: relative;
}

.zc-video-element {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.zc-input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: #080C14;
  color: var(--text-primary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8rem;
}

.zc-telemetry-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

.zc-stat-item {
  background: rgba(8, 12, 20, 0.8);
  border: 1px solid rgba(0, 229, 255, 0.15);
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
}

.zc-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.zc-stat-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-top: 0.2rem;
}
