/* 
   Y Amanece - Styles
   Dark cinematic design with warm sunrise accents.
*/

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Sunrise palette */
  --sun-gold:    #ffffff;
  --sun-amber:   #ffffff;
  --sun-coral:   #ffffff;
  --sun-rose:    #ffffff;
  --dawn-violet: #ffffff;
  --night-deep:  #000000;
  --night-mid:   #000000;
  --night-soft:  #000000;

  /* Text */
  --text-primary:   #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.75);
  --text-muted:     rgba(255, 255, 255, 0.5);

  /* Layout */
  --stream-max-width: 1280px;
  --stream-radius: 0;
}

html {
  font-family: Consolas, monospace;
  background: #000000;
  color: #ffffff;
  scroll-behavior: smooth;
  overflow-x: hidden;
  overflow-y: hidden; /* No scroll bar when folded */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  overflow-y: hidden; /* No scroll bar when folded */
  position: relative;
  background: #000000;
}

html.manifesto-open,
body.manifesto-open {
  overflow-y: auto; /* Scroll enabled when manifesto is unfolded */
}

.aurora-bg {
  display: none !important;
}

#app {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

.stream-section {
  width: 100%;
  max-width: var(--stream-max-width);
  margin-bottom: 0;
  position: relative;
  z-index: 10; /* Keeps video above sun lines that extend upwards */
}

.stream-wrapper {
  position: relative;
  width: 100%;
}

.stream-glow {
  display: none !important;
}

.stream-frame {
  position: relative;
  width: 100%;
  max-width: 1280px;
  padding-bottom: 56.25%; /* 1280x720 aspect ratio (16:9) */
  border-radius: var(--stream-radius);
  overflow: hidden;
  background: #000000;
  box-sizing: border-box;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.8);
}

/* 1px solid pure white border, pixel perfect, strictly inside dimensions (maintaining 1280x720) */
.stream-frame::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 1px solid #ffffff;
  box-sizing: border-box;
  pointer-events: none;
  z-index: 3;
}

.stream-frame iframe,
.stream-frame video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.location-section {
  width: 100%;
  max-width: var(--stream-max-width);
  margin-bottom: auto;
  position: relative;
  z-index: 2;
}

.location-container {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  width: 100%;
  gap: 16px;
  padding: 0;
  margin-top: 16px;
}

/* Green Live Indicator & Radar Ping */
.location-indicator {
  position: relative;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-top: 0px;
}

#radar-canvas {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  pointer-events: none;
}

/* Layout Columns */
.location-left-column {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 192px;
  flex-grow: 1;
  padding-right: 32px;
  position: relative;
  z-index: 1; /* Sun rays with z-index 5 sit above this column */
  user-select: text;
  -webkit-user-select: text;
}

/* Location Display Block (Non-clickable, text selectable) */
.location-display {
  display: flex;
  flex-direction: column;
  gap: 16px;
  user-select: text;
  -webkit-user-select: text;
}

.current-location-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.location-label {
  font-family: Consolas, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1.3;
}

.live-tag {
  color: #00FF7F;
  font-weight: 600;
  letter-spacing: 0.15em;
}

.location-name {
  font-family: Consolas, monospace;
  font-size: 20px;
  font-weight: 400;
  font-style: normal;
  color: var(--text-primary);
  letter-spacing: 0.01em;
  line-height: 1.2;
  margin: 0;
}

.next-location-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.next-label,
.next-name {
  font-family: Consolas, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

.next-label {
  text-transform: uppercase;
}

.next-label.recalculating {
  letter-spacing: 0.15em;
  color: var(--text-muted);
  animation: pulse-recalc 1.8s ease-in-out infinite;
}

@keyframes pulse-recalc {
  0%, 100% {
    opacity: 0.45;
  }
  50% {
    opacity: 1.0;
  }
}

/* Branding */
.branding {
  text-align: left;
  padding: 0;
  margin-top: 16px;
  cursor: pointer;
  user-select: none;
  display: inline-block;
  align-self: flex-start;
}

.brand-text {
  font-family: Consolas, monospace;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: lowercase;
  color: var(--text-muted);
  transition: color 0.4s ease;
}

.branding:hover .brand-text,
.branding.active .brand-text {
  color: var(--text-secondary);
}

/* Animation Area Styles */
.animation-area {
  position: relative;
  width: 256px;
  height: 192px;
  flex-shrink: 0;
  margin-left: auto;
  z-index: 5; /* Ensures sun rays sit above the text in location-left-column */
}

.pixel-anim {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  z-index: 1;
}

/* Sun Canvas - 12 pixel-perfect rays with zero anti-aliasing */
#sun-canvas {
  position: absolute;
  top: -442px;
  left: -606px;
  width: 1050px;
  height: 820px;
  pointer-events: none;
  z-index: 5; /* Behind video (z-index 10), above text (z-index 1) */
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}


/* DEBUG BADGE */
.debug-badge {
  color: #FFD700;
  font-weight: bold;
  font-size: 1.2rem;
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 1000;
  pointer-events: none;
}

/* CLICK GLOW ANIMATION */
@keyframes click-glow {
  0%   { background-color: #333333; }
  50%  { background-color: #bbbbbb; }
  100% { background-color: #333333; }
}

.clicked-glow {
  animation: click-glow 1s ease-in-out 5;
}

/* DEBUG COLUMNS */
.col-name {
  flex: 2;
  display: flex;
  flex-direction: column;
}

.wheel-container.unfolded .col-name {
  flex-direction: row;
  align-items: baseline;
  gap: 16px;
}

.col-platform {
  flex: 1;
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  display: none;
}

.col-link {
  flex: 1;
  font-size: 14px;
  text-align: right;
  display: none;
  padding-right: 15px;
}

.col-link a {
  color: #4da6ff;
  text-decoration: none;
}

.col-link a:hover {
  text-decoration: underline;
}

.wheel-container.unfolded .col-platform,
.wheel-container.unfolded .col-link {
  display: block;
}

.wheel-container.unfolded .item-text {
  width: 100%;
}

/* ==========================================================================
   Manifesto / Information Unfold Section
   ========================================================================== */

.manifesto-section {
  width: 100%;
  max-width: var(--stream-max-width);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease, margin 0.6s ease;
  pointer-events: none;
  margin-top: 0;
  position: relative;
  z-index: 2;
}

.manifesto-section.unfolded {
  max-height: 2000px;
  opacity: 1;
  pointer-events: auto;
  margin-top: 56px;
  margin-bottom: 64px;
}

.manifesto-inner {
  width: 100%;
  max-width: 820px;
  padding-top: 36px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.manifesto-content p {
  font-family: Consolas, monospace;
  font-size: 15px;
  line-height: 1.85;
  color: var(--text-secondary);
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}

.manifesto-credits {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.manifesto-credits .credit-author {
  font-family: Consolas, monospace;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0.08em;
  margin-bottom: 0;
}

