:root {
  --bg: #0f0f0f;
  --surface: #1a1a1a;
  --border: #2a2a2a;
  --text: #e0e0e0;
  --muted: #888;
  --accent: #e05c2a;
  --accent2: #c04a1c;
  --green: #4caf7d;
  --red: #e05252;
  --font: 'Segoe UI', system-ui, sans-serif;
  --mono: 'Consolas', 'Courier New', monospace;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  padding-bottom: 60px;
}

.hero {
  background: linear-gradient(135deg, #1a0a00 0%, #0f0f0f 60%);
  border-bottom: 1px solid var(--border);
  padding: 48px 24px 36px;
  text-align: center;
}

.hero h1 {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.hero .sub {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 20px;
}

.card {
  max-width: 780px;
  margin: 28px auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}

.label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.hint {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

textarea {
  width: 100%;
  background: #111;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.9rem;
  padding: 12px;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
}

textarea:focus { border-color: var(--accent); }

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

.field { flex: 1; min-width: 180px; }

.radio-group {
  display: flex;
  gap: 16px;
  padding-top: 4px;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.95rem;
}

.interval-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
}

.interval-row input {
  width: 56px;
  background: #111;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 1rem;
  padding: 6px 8px;
  text-align: center;
  outline: none;
}

.interval-row span { color: var(--muted); font-size: 0.85rem; }

.check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  cursor: pointer;
  padding-top: 4px;
}

select {
  background: #111;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.9rem;
  padding: 4px 8px;
  outline: none;
}

.btn-row {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.btn-primary {
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  padding: 12px 32px;
  transition: background 0.2s;
}

.btn-primary:hover { background: var(--accent2); }
.btn-primary:disabled { background: #555; cursor: not-allowed; }

.btn-danger {
  background: var(--red);
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  padding: 12px 28px;
  transition: background 0.2s;
}

.btn-outline {
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  display: inline-block;
  font-size: 0.9rem;
  padding: 8px 20px;
  text-decoration: none;
  transition: border-color 0.2s;
}

.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.log-card { padding: 0; overflow: hidden; }

.log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge {
  font-size: 0.8rem;
  padding: 3px 10px;
  border-radius: 20px;
  background: #333;
  color: var(--muted);
}

.badge-running { background: #1a3a5c; color: #5bc8fa; }
.badge-done { background: #1a3a2a; color: var(--green); }

#log_box {
  background: #0a0a0a;
  color: #c8c8c8;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.6;
  max-height: 360px;
  overflow-y: auto;
  padding: 16px 20px;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Pliki */
.file-table {
  width: 100%;
  border-collapse: collapse;
}

.file-table th {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 8px 12px;
  text-align: left;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}

.file-table td {
  padding: 12px 12px;
  border-bottom: 1px solid #222;
  font-size: 0.92rem;
  vertical-align: middle;
}

.file-table tr:last-child td { border-bottom: none; }
.file-table tr:hover td { background: #222; }

.fname { word-break: break-word; max-width: 420px; }
.fsize, .fdate { color: var(--muted); white-space: nowrap; }

.btn-dl {
  background: var(--accent);
  border-radius: 6px;
  color: #fff;
  display: inline-block;
  font-size: 1.1rem;
  padding: 4px 12px;
  text-decoration: none;
  transition: background 0.2s;
}

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

.empty {
  color: var(--muted);
  padding: 24px 0;
  text-align: center;
}

.empty a { color: var(--accent); }

.cookie-status-bar {
  border-radius: 6px;
  font-size: .88rem;
  padding: 8px 12px;
  background: #1a1a1a;
  border: 1px solid #333;
  color: #888;
}
.cookie-status-ok  { border-color: #2a4a2a; color: #6ec96e; }
.cookie-status-none { border-color: #333; color: #888; }

.btn-del-cookies {
  background: none;
  border: 1px solid #555;
  border-radius: 4px;
  color: #888;
  cursor: pointer;
  font-size: .78rem;
  margin-left: 10px;
  padding: 2px 8px;
}
.btn-del-cookies:hover { border-color: var(--red); color: var(--red); }

.btn-upload {
  background: #222;
  border: 1px solid #444;
  border-radius: 6px;
  color: #ccc;
  cursor: pointer;
  font-size: .88rem;
  padding: 6px 14px;
  transition: border-color .2s;
  display: inline-block;
}
.btn-upload:hover { border-color: var(--accent); color: var(--accent); }

.info-box code {
  background: #222;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: .85em;
  padding: 1px 5px;
}

.info-toggle {
  background: none;
  border: 1px solid #444;
  border-radius: 50%;
  color: #888;
  cursor: pointer;
  font-size: .75rem;
  font-weight: 700;
  height: 18px;
  line-height: 1;
  margin-left: 6px;
  padding: 0;
  vertical-align: middle;
  width: 18px;
}
.info-toggle:hover { border-color: var(--accent); color: var(--accent); }

.info-box {
  background: #111;
  border: 1px solid #333;
  border-radius: 8px;
  color: #bbb;
  font-size: .88rem;
  line-height: 1.7;
  margin-top: 10px;
  padding: 14px 16px;
}
.info-box strong { color: #e0e0e0; }
.info-box em { color: #f08060; font-style: normal; font-weight: 600; }

@media (max-width: 600px) {
  .hero h1 { font-size: 1.6rem; }
  .row { flex-direction: column; }
  .file-table th:nth-child(2),
  .file-table th:nth-child(3),
  .file-table td:nth-child(2),
  .file-table td:nth-child(3) { display: none; }
}
