/* ====== GAME TAPE APP STYLES ====== */

/* Nav bar */
.gt-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.gt-nav-brand {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--fg);
  text-decoration: none;
}

.gt-nav-link {
  font-size: 14px;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.gt-nav-link:hover { color: var(--fg); }

/* Page wrapper */
.gt-page {
  padding-top: 72px;
  min-height: 100vh;
}

/* Upload section */
.gt-upload-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 80px 24px;
  text-align: center;
}

.gt-upload-page h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin-bottom: 12px;
}

.gt-upload-sub {
  color: var(--fg-muted);
  max-width: 500px;
  margin-bottom: 48px;
}

.gt-upload-zone {
  width: 100%;
  max-width: 600px;
  border: 2px dashed rgba(124, 106, 255, 0.3);
  border-radius: var(--radius);
  padding: 64px 32px;
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s;
  position: relative;
}

.gt-upload-zone:hover,
.gt-upload-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.gt-upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  pointer-events: none; /* lets touch events pass through to buttons beneath */
}

.gt-upload-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  color: var(--accent);
}

.gt-upload-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 6px;
}

.gt-upload-hint {
  font-size: 13px;
  color: var(--fg-dim);
}

.gt-file-selected {
  display: none;
  text-align: center;
}

.gt-file-selected.visible {
  display: block;
}

.gt-file-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--accent-bright);
  margin-bottom: 8px;
}

.gt-file-size {
  font-size: 13px;
  color: var(--fg-dim);
  margin-bottom: 24px;
}

.gt-submit-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 14px 40px;
  border-radius: var(--radius-sm);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  position: relative;
  z-index: 10;
  pointer-events: auto;
  touch-action: manipulation;
}

.gt-submit-btn:hover { background: var(--accent-bright); }
.gt-submit-btn:active { transform: scale(0.98); }
.gt-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.gt-status-msg {
  margin-top: 24px;
  font-size: 14px;
  color: var(--fg-muted);
}

/* Processing state */
.gt-processing {
  display: none;
  margin-top: 40px;
  text-align: center;
}

.gt-processing.visible { display: block; }

.gt-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(124, 106, 255, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.gt-processing-text {
  font-size: 14px;
  color: var(--fg-muted);
}

/* Dashboard */
.gt-dashboard {
  padding: 40px 24px 80px;
  max-width: 1100px;
  margin: 0 auto;
}

.gt-dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}

.gt-dashboard-title {
  font-size: 1.8rem;
}

.gt-back-link {
  font-size: 14px;
  color: var(--accent);
  text-decoration: none;
}

.gt-back-link:hover { text-decoration: underline; }

/* Score card */
.gt-score-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 40px;
  display: flex;
  align-items: center;
  gap: 48px;
  margin-bottom: 32px;
}

.gt-score-circle {
  flex-shrink: 0;
  width: 140px;
  height: 140px;
  position: relative;
}

.gt-score-svg {
  transform: rotate(-90deg);
}

.gt-score-bg {
  fill: none;
  stroke: rgba(255,255,255,0.06);
  stroke-width: 10;
}

.gt-score-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease;
}

.gt-score-num {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gt-score-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1;
}

.gt-score-label {
  font-size: 12px;
  color: var(--fg-dim);
  margin-top: 4px;
}

.gt-score-meta h2 {
  font-size: 1.6rem;
  margin-bottom: 12px;
}

.gt-score-meta p {
  color: var(--fg-muted);
  max-width: 500px;
  line-height: 1.6;
}

.gt-tone-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.gt-chip {
  background: var(--accent-glow);
  border: 1px solid rgba(124, 106, 255, 0.2);
  color: var(--accent-bright);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
}

/* Grid sections */
.gt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.gt-panel {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 28px 24px;
}

.gt-panel-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 20px;
}

/* Timeline */
.gt-timeline {
  position: relative;
}

.gt-timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--green));
  opacity: 0.3;
}

.gt-timeline-item {
  position: relative;
  padding-left: 32px;
  margin-bottom: 24px;
}

.gt-timeline-item:last-child { margin-bottom: 0; }

.gt-timeline-item::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--bg-card);
}

.gt-timeline-item.green-dot::before { border-color: var(--green); }
.gt-timeline-item.orange-dot::before { border-color: var(--orange); }

.gt-timeline-pct {
  font-family: 'Space Grotesk', monospace;
  font-size: 11px;
  color: var(--fg-dim);
  letter-spacing: 1px;
  margin-bottom: 2px;
}

.gt-timeline-label {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  margin-bottom: 4px;
}

.gt-timeline-desc {
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.5;
}

.gt-intensity-bar {
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}

.gt-intensity-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
}

/* Pacing */
.gt-pacing-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.gt-pacing-row:last-child { border-bottom: none; }

.gt-pacing-label { font-size: 14px; color: var(--fg-muted); }
.gt-pacing-val {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  color: var(--fg);
}

/* Missed signals */
.gt-signal-item {
  padding: 14px 16px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  border-left: 3px solid var(--orange);
}

.gt-signal-item:last-child { margin-bottom: 0; }

.gt-signal-type {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--orange);
  margin-bottom: 4px;
  font-weight: 500;
}

.gt-signal-desc {
  font-size: 14px;
  margin-bottom: 6px;
  line-height: 1.5;
}

.gt-signal-opp {
  font-size: 12px;
  color: var(--fg-dim);
  font-style: italic;
}

/* Recommendations */
.gt-rec-item {
  padding: 16px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.gt-rec-item:last-child { margin-bottom: 0; }

.gt-rec-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.gt-rec-priority {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.gt-rec-priority.high { background: rgba(255, 140, 66, 0.15); color: var(--orange); }
.gt-rec-priority.medium { background: var(--accent-glow); color: var(--accent-bright); }
.gt-rec-priority.low { background: var(--green-glow); color: var(--green); }

.gt-rec-area {
  font-size: 12px;
  color: var(--fg-dim);
}

.gt-rec-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--fg-muted);
}

/* Processing status page */
.gt-status-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  padding: 40px 24px;
  text-align: center;
}

.gt-checking {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.6rem;
  margin-bottom: 16px;
}

.gt-status-id {
  font-size: 13px;
  color: var(--fg-dim);
  margin-bottom: 32px;
}

/* History list */
.gt-history {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px;
}

.gt-history h1 {
  font-size: 1.8rem;
  margin-bottom: 32px;
}

.gt-history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gt-history-item {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  transition: border-color 0.2s;
}

.gt-history-item:hover { border-color: rgba(124, 106, 255, 0.3); }

.gt-history-info { flex: 1; }

.gt-history-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  margin-bottom: 4px;
}

.gt-history-meta {
  font-size: 13px;
  color: var(--fg-dim);
}

.gt-history-status {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 500;
}

.gt-history-status.completed { background: var(--green-glow); color: var(--green); }
.gt-history-status.failed { background: rgba(255, 100, 100, 0.1); color: #ff6464; }
.gt-history-status.pending,
.gt-history-status.processing,
.gt-history-status.transcribing,
.gt-history-status.analyzing {
  background: var(--accent-glow);
  color: var(--accent-bright);
}

@media (max-width: 768px) {
  .gt-grid { grid-template-columns: 1fr; }
  .gt-score-card { flex-direction: column; text-align: center; }
  .gt-nav { padding: 14px 20px; }
}