* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  color: #f4f7ff;
  background:
    radial-gradient(1100px 520px at 8% -8%, rgba(91, 140, 255, 0.42), transparent 55%),
    radial-gradient(900px 480px at 108% 4%, rgba(255, 79, 216, 0.32), transparent 52%),
    radial-gradient(780px 420px at 50% 118%, rgba(46, 230, 166, 0.2), transparent 55%),
    linear-gradient(165deg, #070b18 0%, #15102c 48%, #081525 100%);
}
.wrap { max-width: 720px; margin: 36px auto; padding: 0 16px; }
.home-layout { display: block; }
.poster-form .field { min-width: 0; }
.credit-title {
  display: block;
  text-align: center;
  margin: 0 0 22px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  background: linear-gradient(90deg, #6ea8ff, #ff5de3, #ffd166, #3ef0b5);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.card {
  background: linear-gradient(180deg, rgba(28, 34, 58, 0.94), rgba(16, 20, 38, 0.94));
  border: 1px solid rgba(140, 175, 255, 0.28);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 18px 50px rgba(8, 12, 28, 0.45);
}
h1 { margin: 0 0 8px; font-size: 28px; color: #ffffff; }
.sub { margin: 0 0 20px; color: #b9c4de; }
label { display: block; margin: 14px 0 6px; color: #d5def3; font-size: 14px; }
input[type="url"], input[type="text"], input[type="file"] {
  width: 100%;
  background: #10162a;
  color: #f4f7ff;
  border: 1px solid rgba(140, 175, 255, 0.32);
  border-radius: 10px;
  padding: 12px 14px;
}
input[type="url"]:focus, input[type="text"]:focus, input[type="file"]:focus {
  outline: none;
  border-color: #7eb0ff;
  box-shadow: 0 0 0 3px rgba(91, 140, 255, 0.22);
}
input.wide { min-height: 52px; font-size: 18px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.choice {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  background: #10162a;
  border: 1px solid rgba(140, 175, 255, 0.28);
  border-radius: 999px;
  padding: 8px 12px;
  color: #e8eeff;
}
button {
  margin-top: 20px;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  background: linear-gradient(90deg, #4f8cff, #7a5cff);
  color: white;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(79, 140, 255, 0.32);
}
button:hover { filter: brightness(1.08); }
.fail {
  background: linear-gradient(90deg, #4a1724, #3a1717);
  color: #ffc2c8;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 120, 140, 0.28);
}
.ok { color: #7ff0b8; }
.jobs { margin-top: 20px; display: grid; gap: 8px; }
.job {
  display: flex;
  justify-content: space-between;
  color: inherit;
  text-decoration: none;
  background: linear-gradient(180deg, rgba(28, 34, 58, 0.94), rgba(16, 20, 38, 0.94));
  border: 1px solid rgba(140, 175, 255, 0.24);
  border-radius: 12px;
  padding: 12px 14px;
}
.status { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.status.uploaded, .status.ready, .status.draft { color: #7ff0b8; }
.status.failed { color: #ffb4b4; }
.status.running, .status.queued, .status.pending { color: #ffd166; }
.status.partial { color: #ffd166; }
.logs { color: #c9d3ea; }
.back a { color: #9eb6ff; text-decoration: none; }
.chan { border-top: 1px solid rgba(140, 175, 255, 0.18); padding: 12px 0; }
.head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.connects { display: flex; align-items: center; gap: 10px; }
.fb-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #1877f2;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 26px;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(24, 119, 242, 0.45);
}
.fb-icon.connected { width: 28px; height: 28px; font-size: 16px; border-radius: 8px; }
.fb-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #10162a;
  border: 1px solid rgba(140, 175, 255, 0.28);
  border-radius: 999px;
  padding: 6px 10px;
}
.fb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  width: auto;
  min-width: 148px;
  background: linear-gradient(90deg, #1877f2, #4f8cff);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 12px 18px;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(24, 119, 242, 0.4);
}
.ask {
  background: linear-gradient(90deg, #15284a, #1a1a48);
  color: #d6e8ff;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
  border: 1px solid rgba(126, 176, 255, 0.28);
}
.linkish { margin: 0; width: auto; background: transparent; color: #9eb6ff; padding: 0; font-size: 12px; box-shadow: none; }
.pages { display: grid; gap: 10px; }
.page {
  width: 100%;
  text-align: left;
  background: #10162a;
  border: 1px solid rgba(140, 175, 255, 0.32);
  color: #f4f7ff;
  display: grid;
  gap: 4px;
  box-shadow: none;
}
.page span { color: #b9c4de; font-size: 12px; }
code { color: #7ff0b8; word-break: break-all; }
.arch-link { color: #8ec0ff; text-decoration: none; border-bottom: 1px dotted #8ec0ff; }
.job strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 12px; }
.fb-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
@media (min-width: 900px) {
  .wrap { max-width: 1120px; }
  .home-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.85fr);
    gap: 20px;
    align-items: start;
  }
  .poster-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 18px;
  }
  .poster-form .row,
  .poster-form button {
    grid-column: 1 / -1;
  }
  .jobs { margin-top: 0; }
}
@media (max-width: 640px) {
  .wrap { margin: 16px auto; padding: 0 12px; }
  .card { padding: 18px; border-radius: 12px; }
  h1 { font-size: 22px; }
  .credit-title { font-size: 16px; letter-spacing: 0.16em; }
  .head { flex-direction: column; align-items: stretch; }
  .connects { width: 100%; }
  .fb-btn { width: 100%; min-height: 48px; }
  .fb-chip { flex-wrap: wrap; width: 100%; }
  .fb-chip span { max-width: none; }
  .row { flex-direction: column; }
  .choice { width: 100%; min-height: 44px; }
  input[type="url"], input[type="text"], input[type="file"], input.wide {
    font-size: 16px;
    min-height: 48px;
  }
  button { min-height: 48px; }
  .job { gap: 8px; align-items: flex-start; }
  .job strong { white-space: normal; }
}
