/* Aura Stream - Handcrafted Developer Minimalist Theme */

:root {
  --bg: #09090b;          /* Zinc 950 */
  --surface: #121214;     /* Zinc 900 modified */
  --border: #27272a;      /* Zinc 800 */
  --border-focus: #3f3f46;/* Zinc 700 */
  --text: #f4f4f5;        /* Zinc 100 */
  --text-muted: #71717a;  /* Zinc 500 */
  --accent: #f97316;      /* Orange 500 */
  --accent-hover: #ea580c;/* Orange 600 */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --radius: 8px;
  --transition: all 0.2s ease;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 3rem 1.5rem;
}

/* Subtle dot grid pattern */
.dot-grid-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 0);
  background-size: 24px 24px;
  pointer-events: none;
}

/* App container */
.app-wrapper {
  width: 100%;
  max-width: 1140px;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
}

.logo-mark {
  font-size: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.brand-info h1 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.brand-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.01);
  padding: 0.35rem 0.75rem;
  border-radius: 99px;
}

.status-dot {
  width: 6px;
  height: 6px;
  background-color: var(--success, #10b981);
  border-radius: 50%;
}

/* Grid Layout */
.layout-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 2rem;
}

@media (max-width: 900px) {
  .layout-grid {
    grid-template-columns: 1fr;
  }
}

.sidebar, .main-panel {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* Containers (Control box, List box) */
.control-box, .list-box, .player-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.box-title {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.box-title span {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
}

.box-title h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
}

.box-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

/* Custom upload drop zone */
.upload-area {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 2.25rem 1rem;
  text-align: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.005);
  transition: var(--transition);
  margin-bottom: 1.25rem;
}

.upload-area:hover, .upload-area.dragover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.015);
}

.upload-icon {
  font-size: 1.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.upload-title {
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.2rem;
}

.upload-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Form inputs */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.field-group label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.field-group label .label-aside {
  font-weight: 400;
  text-transform: lowercase;
  opacity: 0.7;
}

.field-group input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}

.field-group input:focus {
  border-color: var(--border-focus);
}

/* Typographic buttons */
.submit-btn {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.85rem;
  background: #f4f4f5; /* Zinc 100 style button (Vercel layout) */
  color: #09090b;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  width: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.submit-btn:hover {
  background: #e4e4e7;
}

.scan-btn {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  width: 100%;
  cursor: pointer;
  transition: var(--transition);
}

.scan-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-focus);
}

/* Path box (Terminal style) */
.terminal-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  margin-bottom: 1.25rem;
}

.terminal-prompt {
  color: var(--accent);
}

.terminal-text {
  color: var(--text-muted);
}

/* Upload progress */
.progress-box {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 1rem;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.progress-bar-inner {
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  transition: width 0.1s linear;
}

/* Right content header */
.list-top, .player-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
}

.list-title h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.icon-refresh-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.icon-refresh-btn:hover {
  color: var(--text);
  border-color: var(--border-focus);
}

/* Player view components */
.player-box {
  border-color: var(--border-focus);
}

.player-top {
  align-items: center;
}

.player-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.pulse-ring {
  width: 6px;
  height: 6px;
  background-color: var(--accent);
  border-radius: 50%;
}

.player-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-sans);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: var(--transition);
}

.player-close-btn:hover {
  color: var(--danger);
}

.player-wrapper {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}

.video-js {
  width: 100% !important;
  max-width: 100%;
}

/* Streams list */
.stream-list-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stream-item {
  background: rgba(255, 255, 255, 0.005);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: var(--transition);
}

.stream-item:hover {
  border-color: var(--border-focus);
  background: rgba(255, 255, 255, 0.015);
}

.item-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.item-info h4 {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  word-break: break-all;
}

.item-stats {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Monospace flat copy-link element */
.link-display-row {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.15rem;
}

.link-input-field {
  background: transparent;
  border: none;
  color: #a1a1aa;  /* Zinc 300 style */
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.4rem 0.6rem;
  flex-grow: 1;
  cursor: pointer;
  outline: none;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.copy-icon-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.copy-icon-btn:hover {
  color: var(--text);
}

/* Actions Row */
.item-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-family: var(--font-mono);
  text-transform: uppercase;
}

.badge-upload {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.badge-local {
  background: rgba(249, 115, 22, 0.05);
  color: var(--accent);
  border: 1px solid rgba(249, 115, 22, 0.2);
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-completed { color: var(--success, #10b981); }
.status-processing { color: var(--accent); }
.status-queued { color: var(--text-muted); }
.status-failed { color: var(--danger); }

.spin-icon {
  animation: rotateAction 1s linear infinite;
}

@keyframes rotateAction {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.action-buttons {
  display: flex;
  gap: 0.5rem;
}

.btn-icon-action {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
  transition: var(--transition);
}

.btn-icon-action:hover {
  color: var(--text);
  border-color: var(--border-focus);
}

.btn-icon-action.btn-play {
  background: rgba(16, 185, 129, 0.02);
  border-color: rgba(16, 185, 129, 0.1);
  color: var(--success, #10b981);
}

.btn-icon-action.btn-play:hover {
  background: var(--success, #10b981);
  color: #fff;
  border-color: var(--success, #10b981);
}

.btn-icon-action.btn-delete {
  background: rgba(239, 68, 68, 0.02);
  border-color: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.btn-icon-action.btn-delete:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

/* Empty placeholder */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  gap: 0.75rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.002);
}

.empty-state i {
  font-size: 1.5rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.empty-state h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.empty-state p {
  font-size: 0.78rem;
  color: var(--text-muted);
  max-width: 320px;
}
