/**
 * FuryBee Video — Shared Styles
 * NLE Pro Theme (DaVinci/Premiere inspired)
 */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* ============================================================
   CSS Variables — NLE Pro Theme
   ============================================================ */
:root {
  /* Backgrounds */
  --bg:         #0a0a0f;
  --bg2:        #0e0e14;
  --panel:      #121218;
  --panel-hi:   #18181f;
  --surface:    #1a1a22;
  --surface-hi: #222230;
  
  /* Borders */
  --border:     #2a2a38;
  --border-hi:  #3a3a4a;
  --groove:     #08080c;
  
  /* Text */
  --text:       #e0e0e8;
  --text-sec:   #a0a0b0;
  --dim:        #606070;
  --muted:      #404050;
  
  /* Accent Colors — Color Grading Palette */
  --orange:     #ff6b35;
  --amber:      #ffab00;
  --purple:     #a855f7;
  --violet:     #8b5cf6;
  --cyan:       #06b6d4;
  --teal:       #14b8a6;
  --green:      #22c55e;
  --red:        #ef4444;
  --blue:       #3b82f6;
  
  /* Primary accent */
  --accent:     #ff6b35;
  --accent-glow: rgba(255, 107, 53, 0.3);
  
  /* Timeline colors */
  --timeline-bg:    #0c0c12;
  --timeline-track: #16161e;
  --playhead:       #ff6b35;
  
  /* Functional */
  --success:    #22c55e;
  --warning:    #ffab00;
  --error:      #ef4444;
  
  /* Shadows */
  --shadow-sm:  0 1px 2px rgba(0,0,0,0.5);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg:  0 8px 24px rgba(0,0,0,0.5);
  
  /* Transitions */
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================================
   Reset & Base
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Subtle grid background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255,255,255,0.01) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.01) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: -1;
}

/* ============================================================
   Typography
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

.mono {
  font-family: 'JetBrains Mono', 'SF Mono', monospace;
}

/* ============================================================
   Links
   ============================================================ */
a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s var(--ease-out);
}
a:hover {
  color: var(--amber);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  background: linear-gradient(180deg, var(--surface-hi) 0%, var(--surface) 100%);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  white-space: nowrap;
}

.btn:hover {
  background: linear-gradient(180deg, var(--surface) 0%, var(--panel-hi) 100%);
  border-color: var(--border-hi);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(180deg, var(--accent) 0%, #e05a2a 100%);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

.btn-primary:hover {
  background: linear-gradient(180deg, #ff7b45 0%, var(--accent) 100%);
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 8px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ============================================================
   Inputs & Controls
   ============================================================ */
input[type="text"],
input[type="number"],
select {
  padding: 10px 14px;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  outline: none;
  transition: all 0.2s;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

/* Range slider */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--groove);
  border-radius: 3px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transition: transform 0.15s;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  transition: all 0.3s var(--ease-out);
}

.card:hover {
  border-color: var(--border-hi);
  box-shadow: var(--shadow-md);
}

.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.card-link:hover .card {
  border-color: var(--accent);
  box-shadow: 0 0 30px var(--accent-glow);
  transform: translateY(-2px);
}

/* ============================================================
   Video Preview
   ============================================================ */
.video-container {
  position: relative;
  background: var(--timeline-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16/9;
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--dim);
  font-size: 0.9rem;
}

.video-placeholder-icon {
  font-size: 3rem;
  opacity: 0.3;
}

/* Timecode display */
.timecode {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--accent);
  background: rgba(0,0,0,0.7);
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

/* ============================================================
   Timeline
   ============================================================ */
.timeline {
  background: var(--timeline-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-top: 16px;
}

.timeline-track {
  height: 48px;
  background: var(--timeline-track);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.timeline-waveform {
  position: absolute;
  inset: 0;
  opacity: 0.6;
}

.timeline-handle {
  position: absolute;
  top: 0;
  width: 4px;
  height: 100%;
  background: var(--accent);
  cursor: ew-resize;
  border-radius: 2px;
}

.timeline-handle::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--accent);
}

.timeline-selection {
  position: absolute;
  top: 0;
  height: 100%;
  background: rgba(255, 107, 53, 0.2);
  border-left: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
}

/* ============================================================
   Panels & Sections
   ============================================================ */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-sec);
}

.panel-body {
  padding: 16px;
}

/* ============================================================
   Drop Zone
   ============================================================ */
.dropzone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 48px 24px;
  text-align: center;
  transition: all 0.3s;
  cursor: pointer;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--accent);
  background: rgba(255, 107, 53, 0.05);
}

.dropzone-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  opacity: 0.4;
}

.dropzone-text {
  color: var(--text-sec);
  font-size: 0.95rem;
}

.dropzone-hint {
  color: var(--dim);
  font-size: 0.8rem;
  margin-top: 8px;
}

/* ============================================================
   Progress Bar
   ============================================================ */
.progress {
  height: 6px;
  background: var(--groove);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--amber));
  border-radius: 3px;
  transition: width 0.3s;
}

/* ============================================================
   Stats / Info Grid
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.stat-item {
  background: var(--surface);
  border-radius: 6px;
  padding: 12px;
}

.stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--dim);
  margin-bottom: 4px;
}

.stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  color: var(--text);
}

/* ============================================================
   Header / Nav
   ============================================================ */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.logo-icon {
  font-size: 1.5rem;
}

.logo-text {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
}

.logo-sub {
  font-size: 0.7rem;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.nav {
  display: flex;
  gap: 8px;
}

.nav-link {
  padding: 8px 16px;
  font-size: 0.85rem;
  color: var(--text-sec);
  border-radius: 6px;
  transition: all 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: var(--surface);
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  padding: 24px;
  text-align: center;
  color: var(--dim);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
  margin-top: 48px;
}

.footer a {
  color: var(--text-sec);
}

/* ============================================================
   Utilities
   ============================================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.gap-lg { gap: 24px; }

.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 16px; }
.mt-lg { margin-top: 24px; }
.mb-md { margin-bottom: 16px; }

.text-center { text-align: center; }
.text-dim { color: var(--dim); }
.text-accent { color: var(--accent); }

.hidden { display: none !important; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    gap: 16px;
  }
  
  .nav {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
  
  h1 { font-size: 1.5rem; }
  
  .btn {
    padding: 8px 16px;
    font-size: 0.8rem;
  }
}
