/* =========================================================
   Sonix Studio Reskin for YouTube/SoundCloud Downloader
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@600;700;800&family=Exo+2:wght@400;600;700;800&display=swap');

:root {
  --bg: #111;
  --panel: #222;
  --ink: #eee;
  --muted: #bbb;
  --border: #444;

  --accent: #ff33cc;
  --accent-ghost: #ff33cc33;

  --btn-bg: #333;
  --btn-bg-hover: #3a3a3a;
  --btn-border: #555;

  --success: #2e7d32;
  --danger: #c0392b;
  --warning: #f1c40f;
}

* { 
  box-sizing: border-box; 
}

html, body { 
  height: 100%; 
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 'Exo 2', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 28px 16px;
  text-align: center;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(980px, 100%);
}

.logo {
  width: 56px; 
  height: 56px; 
  object-fit: contain;
  filter: drop-shadow(0 2px 12px var(--accent-ghost));
}

.brand h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: .4px;
  font-family: 'Orbitron', 'Exo 2', sans-serif;
}

.tag {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

/* Card panels */
.card {
  width: min(980px, 100%);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  box-shadow: inset 0 0 0 2px var(--accent),
              0 10px 30px rgba(0,0,0,.35);
}

/* Meta + status chips */
.meta {
  display: flex; 
  justify-content: space-between; 
  align-items: center;
  margin-bottom: 10px;
}

.meta a { 
  color: var(--accent); 
  text-decoration: none; 
}

.status span {
  padding: 4px 8px; 
  border-radius: 999px;
  font-size: 12px; 
  margin-left: 6px;
}

.ok { 
  background: #103810; 
  color: #a6f5a6; 
  border: 1px solid #1e6f1e; 
}

.warn { 
  background: #2a2233; 
  color: #e1c7ff; 
  border: 1px solid #3b2f4c; 
}

.bad { 
  background: #3a1010; 
  color: #f5a6a6; 
  border: 1px solid #6f1e1e; 
}

/* Inputs */
.label { 
  display: block; 
  margin: 8px 0 6px; 
  color: var(--muted); 
  text-align: left;
}

textarea {
  width: 100%; 
  min-height: 220px; 
  resize: vertical;
  background: #1b1b1b; 
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 12px; 
  padding: 12px; 
  outline: none;
  font-family: 'Exo 2', monospace;
}

textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-ghost);
}

input[type="text"],
select {
  transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
select:focus {
  outline: none;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px var(--accent-ghost);
}

/* Controls + buttons */
.controls {
  display: flex; 
  flex-wrap: wrap; 
  gap: 12px;
  align-items: center; 
  margin-top: 12px;
}

.check {
  display: flex; 
  align-items: center; 
  gap: 6px; 
  color: var(--muted);
}

.btn {
  margin-left: auto;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  color: var(--ink);
  font-family: 'Exo 2', sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, transform .04s, opacity .15s;
}

.btn:hover:not(:disabled) { 
  background: var(--btn-bg-hover); 
}

.btn:active:not(:disabled) { 
  transform: translateY(1px); 
}

.btn:disabled { 
  opacity: .6; 
  cursor: not-allowed; 
}

/* Logs */
.stack { 
  margin-top: 14px; 
}

.log {
  white-space: pre-wrap; 
  min-height: 120px; 
  padding: 10px;
  background: #000; 
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: 'Exo 2', monospace;
  color: #0f0;
}

audio { 
  width: 100%; 
  margin-top: 10px; 
}

.pubnote { 
  opacity: .85; 
  margin-top: 6px; 
}

.foot { 
  opacity: .65; 
  font-size: 12px; 
}

/* Log list styling */
.loglist { 
  list-style: none; 
  margin: 0; 
  padding: 0;
  background: #0a0a0a;
  border: 1px solid var(--border);
  border-radius: 8px;
  min-height: 60px;
}

.logline {
  display: flex; 
  gap: 10px; 
  align-items: flex-start;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
}

.logline:last-child { 
  border-bottom: 0; 
}

.log-emoji { 
  width: 22px; 
  text-align: center; 
  opacity: .95; 
}

.log-text { 
  flex: 1; 
  opacity: .95;
  text-align: left;
  word-break: break-word;
}

.logline.err { 
  background: #3a1010; 
  border-color: #6f1e1e; 
}

.logline.warn { 
  background: #2a2233; 
  border-color: #3b2f4c; 
}

/* Progress bar */
.progress-container {
  background: var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.progress-bar {
  height: 16px;
  background: linear-gradient(90deg, var(--accent), #ff66dd);
  transition: width 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  body {
    padding: 16px 12px;
  }
  
  .card {
    padding: 14px;
  }
  
  .site-header {
    justify-content: center;
  }
  
  .logo {
    height: 80px !important;
    width: auto !important;
  }
}
