:root {
  --bg: #0b0e13;
  --panel: #131822;
  --line: rgba(255, 255, 255, 0.1);
  --text: #eef1f5;
  --dim: #9aa4b2;
  --yellow: #ffd400;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: radial-gradient(120% 90% at 50% 0%, #17202c 0%, var(--bg) 55%);
  color: var(--text); font-family: "Avenir Next", "Helvetica Neue", system-ui, sans-serif;
  min-height: 100vh;
}
header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 28px; border-bottom: 1px solid var(--line);
}
.logo { font-size: 20px; letter-spacing: 0.02em; }
.logo strong { color: var(--yellow); }
.health { font-size: 13px; color: var(--dim); }
.health .bad { color: #ff7a6e; }

.panel { max-width: 860px; margin: 32px auto; padding: 32px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 18px; }
.hidden { display: none !important; }
h1 { font-size: 30px; margin: 0 0 6px; }
h2 { font-size: 24px; margin: 0 0 6px; }
h3 { margin: 0; }
h3 small { color: var(--dim); font-weight: 400; }
.sub { color: var(--dim); margin: 0 0 22px; }

.urlrow { display: flex; gap: 10px; }
.urlrow input { flex: 1; }
input, textarea, select {
  background: #0d1119; color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 14px; font-size: 15px; font-family: inherit; width: 100%;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--yellow); }

button, .primary, .upload-btn, .ghost {
  cursor: pointer; border: none; border-radius: 10px; font-size: 15px; font-weight: 600;
  font-family: inherit; text-decoration: none; display: inline-flex; align-items: center;
  justify-content: center; gap: 8px;
}
.primary { background: var(--yellow); color: #10131a; padding: 12px 22px; }
.primary:hover { filter: brightness(1.08); }
.primary.big { padding: 15px 30px; font-size: 17px; }
.primary[disabled] { opacity: 0.5; cursor: wait; }
.ghost { background: transparent; color: var(--dim); border: 1px solid var(--line); padding: 12px 20px; }
.ghost:hover { color: var(--text); }
.upload-btn { background: #0d1119; border: 1px dashed rgba(255, 255, 255, 0.25); color: var(--dim);
  padding: 14px 22px; }
.upload-btn:hover { color: var(--text); border-color: var(--yellow); }
.upload-btn.small { padding: 9px 16px; font-size: 13px; margin-top: 10px; }

.divider { display: flex; align-items: center; gap: 14px; color: var(--dim); margin: 22px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.status { min-height: 20px; margin-top: 12px; color: var(--dim); font-size: 14px; }
.status.err { color: #ff7a6e; }

.field { display: flex; flex-direction: column; gap: 6px; margin: 14px 0; font-size: 13px; }
.field span { color: var(--dim); letter-spacing: 0.06em; text-transform: uppercase; font-size: 11.5px; }
.field.check { flex-direction: row; align-items: center; }
.field.check input { width: auto; }
.field.check span { text-transform: none; font-size: 14px; color: var(--text); }
.vitals-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }

.photos-head { display: flex; justify-content: space-between; align-items: baseline; margin: 18px 0 10px; }
.hint { color: var(--dim); font-size: 12.5px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.pcard { background: #0d1119; border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  position: relative; cursor: grab; }
.pcard.dragging { opacity: 0.4; }
.pcard img { width: 100%; height: 100px; object-fit: cover; display: block; }
.pcard .angle { width: 100%; border: none; border-top: 1px solid var(--line); border-radius: 0;
  padding: 7px 8px; font-size: 12.5px; background: #0d1119; }
.pcard .rm { position: absolute; top: 6px; right: 6px; background: rgba(0, 0, 0, 0.65); color: #fff;
  width: 24px; height: 24px; border-radius: 50%; font-size: 13px; line-height: 1; }
.pcard .idx { position: absolute; top: 6px; left: 6px; background: var(--yellow); color: #10131a;
  font-size: 11.5px; font-weight: 800; padding: 2px 7px; border-radius: 6px; }

.options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 14px; align-items: end;
  border-top: 1px solid var(--line); margin-top: 24px; padding-top: 8px; }
.uploadrow { display: flex; gap: 12px; flex-wrap: wrap; }

.actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; align-items: center; }

.bar { height: 12px; background: #0d1119; border: 1px solid var(--line); border-radius: 8px;
  overflow: hidden; margin: 20px 0 8px; }
#bar-fill { height: 100%; width: 0%; background: var(--yellow); transition: width 0.6s ease; }
#player { width: 100%; border-radius: 12px; margin-top: 18px; background: #000; }

@media (max-width: 700px) {
  .vitals-grid { grid-template-columns: 1fr 1fr; }
  .options { grid-template-columns: 1fr 1fr; }
}
