:root {
  --bg-dark: #0d1117;
  --card-bg: #161b22;
  --card-border: #30363d;
  --text-primary: #f0f6fc;
  --text-secondary: #8b949e;
  --accent-blue: #58a6ff;
  --accent-gradient: linear-gradient(135deg, #a855f7, #6366f1, #3b82f6);
  --btn-primary: #238636;
  --btn-primary-hover: #2ea043;
  --btn-secondary: #21262d;
  --btn-secondary-hover: #30363d;
  --radius-lg: 16px;
  --radius-md: 10px;
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  padding: 2rem 1.5rem;
}

.app-container {
  max-width: 1200px;
  margin: 0 auto;
}

.app-header {
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 1.5rem;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0.5rem;
}

.badge-gemini {
  background: var(--accent-gradient);
  color: white;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.05em;
}

.app-header h1 {
  font-size: 1.8rem;
  font-weight: 800;
}

.app-header h1 span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-tagline {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.grid-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
}

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

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.form-group {
  margin-bottom: 1.15rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

input[type="text"],
textarea,
select {
  width: 100%;
  background: #0d1117;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 0.7rem 0.9rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

input[type="text"]:focus,
textarea:focus,
select:focus {
  border-color: var(--accent-blue);
}

/* Drop Zone */
.drop-zone {
  position: relative;
  border: 2px dashed var(--card-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  background: #0d1117;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s, background-color 0.2s;
}

.drop-zone:hover {
  border-color: var(--accent-blue);
  background: #11161d;
}

.file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.icon-upload {
  width: 36px;
  height: 36px;
  margin-bottom: 0.5rem;
  stroke: var(--accent-blue);
}

.drop-content p {
  font-size: 0.9rem;
  font-weight: 600;
}

.drop-content p span {
  color: var(--accent-blue);
  text-decoration: underline;
}

.drop-content small {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.image-preview {
  max-height: 180px;
  max-width: 100%;
  border-radius: 8px;
  object-fit: contain;
  margin: 0 auto;
}

/* Buttons */
.action-buttons {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn {
  flex: 1;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background-color 0.2s, transform 0.1s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--btn-primary);
  color: white;
}

.btn-primary:hover {
  background: var(--btn-primary-hover);
}

.btn-secondary {
  background: var(--btn-secondary);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--btn-secondary-hover);
}

.btn-success {
  background: #1f6feb;
  color: white;
  width: 100%;
}

.btn-success:hover {
  background: #388bfd;
}

/* Output Card */
.status-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.status-banner.idle {
  background: #1c2128;
  color: var(--text-secondary);
}

.status-banner.running {
  background: #2a1f0a;
  color: #e3b341;
  border: 1px solid #d2992244;
}

.status-banner.success {
  background: #11261a;
  color: #3fb950;
  border: 1px solid #2ea04344;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.preview-box {
  background: #0d1117;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.section-label:not(:first-child) {
  margin-top: 1rem;
}

.text-display {
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.5;
}

.code-display {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: #79c0ff;
  white-space: pre-wrap;
}

.video-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0d1117;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-placeholder {
  text-align: center;
  color: var(--text-secondary);
}

.icon-video {
  width: 48px;
  height: 48px;
  stroke: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.result-actions {
  margin-top: 1.25rem;
}

.cost-summary {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.cost-tag {
  background: #21262d;
  border: 1px solid var(--card-border);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #7ee787;
}

.hidden {
  display: none !important;
}
