/* VideoComic AI - Global Styles */
:root {
  --primary: #00D4FF;
  --primary-hover: #00B8E6;
  --bg: #0F0F1A;
  --bg-card: #16213E;
  --bg-card-hover: #1D2A50;
  --border: #0F3460;
  --text: #E0E0E0;
  --text-muted: #888;
  --accent-red: #FF6B6B;
  --accent-green: #00C853;
  --accent-purple: #7C3AED;
  --radius: 12px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* Navigation */
.nav {
  background: rgba(22, 33, 62, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.nav-logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
}
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s;
}
.nav-links a:hover, .nav-links a.active {
  background: var(--bg-card);
  color: var(--primary);
}

/* Nav user dropdown */
.nav-user-menu { position: relative; }
.nav-user-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--primary) !important;
  font-weight: 600;
  cursor: pointer;
}
.nav-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  min-width: 160px;
  padding: 8px 0;
  box-shadow: var(--shadow);
  z-index: 200;
}
.nav-dropdown a {
  display: block;
  padding: 10px 16px !important;
  border-radius: 0 !important;
  font-size: 14px !important;
  color: var(--text) !important;
  background: none !important;
}
.nav-dropdown a:hover {
  background: var(--bg) !important;
  color: var(--primary) !important;
}

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

/* Hero */
.hero {
  padding: 80px 0;
  text-align: center;
  background: linear-gradient(180deg, rgba(0, 212, 255, 0.05) 0%, transparent 100%);
}
.hero h1 {
  font-size: 56px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), #7C3AED);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 16px;
  line-height: 1.2;
}
.hero p {
  font-size: 20px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 32px;
}
.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}
.btn-primary {
  background: var(--primary);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 212, 255, 0.3);
}
.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Feature Cards */
.features {
  padding: 60px 0;
}
.features h2 {
  text-align: center;
  font-size: 36px;
  margin-bottom: 48px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: all 0.2s;
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow);
}
.feature-icon {
  font-size: 40px;
  margin-bottom: 16px;
}
.feature-card h3 {
  font-size: 20px;
  margin-bottom: 12px;
  color: var(--primary);
}
.feature-card p {
  color: var(--text-muted);
  font-size: 14px;
}

/* Workflow */
.workflow {
  padding: 60px 0;
  background: var(--bg-card);
}
.workflow h2 {
  text-align: center;
  font-size: 36px;
  margin-bottom: 48px;
}
.workflow-steps {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.workflow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px;
  background: var(--bg);
  border-radius: var(--radius);
  min-width: 140px;
}
.workflow-step .step-num {
  background: var(--primary);
  color: var(--bg);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}
.workflow-step .step-icon {
  font-size: 32px;
}
.workflow-step span {
  font-size: 14px;
  color: var(--text-muted);
}
.workflow-arrow {
  font-size: 24px;
  color: var(--border);
}

/* Footer */
.footer {
  text-align: center;
  padding: 40px 0;
  color: var(--text-muted);
  font-size: 14px;
  border-top: 1px solid var(--border);
}
.footer a { color: var(--primary); text-decoration: none; }

/* Upload Page */
.upload-page {
  padding: 60px 0;
  max-width: 800px;
  margin: 0 auto;
}
.upload-page h1 {
  font-size: 36px;
  margin-bottom: 8px;
  text-align: center;
}
.upload-page .subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 40px;
}

/* Drop Zone */
.drop-zone {
  background: var(--bg-card);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 60px 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 24px;
}
.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--primary);
  background: rgba(0, 212, 255, 0.05);
}
.drop-zone .dz-icon {
  font-size: 64px;
  margin-bottom: 16px;
}
.drop-zone .dz-text {
  font-size: 18px;
  margin-bottom: 8px;
}
.drop-zone .dz-hint {
  font-size: 14px;
  color: var(--text-muted);
}
.drop-zone input[type="file"] {
  display: none;
}

/* Video Preview */
.video-preview {
  display: none;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}
.video-preview.show { display: block; }
.video-preview video {
  width: 100%;
  max-height: 300px;
  border-radius: 8px;
  background: #000;
}
.video-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-muted);
}
.video-info .remove-btn {
  color: var(--accent-red);
  cursor: pointer;
  font-size: 12px;
}

/* Style Select */
.style-select {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.style-option {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
}
.style-option:hover { border-color: var(--primary); }
.style-option.selected {
  border-color: var(--primary);
  background: rgba(0, 212, 255, 0.1);
}
.style-option input { display: none; }
.style-option .style-icon { font-size: 24px; display: block; margin-bottom: 4px; }

/* Progress */
.progress-section {
  display: none;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}
.progress-section.show { display: block; }
.progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 14px;
}
.progress-bar-wrap {
  background: var(--bg);
  border-radius: 8px;
  height: 12px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #7C3AED);
  border-radius: 8px;
  transition: width 0.3s;
  width: 0%;
}
.progress-stages {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.stage-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  background: var(--bg);
  color: var(--text-muted);
}
.stage-badge.active {
  background: rgba(0, 212, 255, 0.2);
  color: var(--primary);
}
.stage-badge.done {
  background: rgba(0, 200, 83, 0.2);
  color: var(--accent-green);
}

/* Result */
.result-section {
  display: none;
  margin-top: 24px;
}
.result-section.show { display: block; }
.result-section h3 {
  font-size: 24px;
  margin-bottom: 16px;
  color: var(--accent-green);
}
.comic-pages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.comic-page img {
  width: 100%;
  border-radius: 8px;
  background: var(--bg-card);
}

/* Error */
.error-msg {
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid var(--accent-red);
  border-radius: var(--radius);
  padding: 16px;
  color: var(--accent-red);
  margin-bottom: 24px;
  display: none;
}
.error-msg.show { display: block; }

/* Responsive */
@media (max-width: 768px) {
  .hero h1 { font-size: 36px; }
  .hero p { font-size: 16px; }
  .workflow-steps { flex-direction: column; }
  .workflow-arrow { transform: rotate(90deg); }
  .nav-links { gap: 4px; }
  .nav-links a { padding: 8px 12px; font-size: 13px; }
}
