/* HUD page CSS — brand tokens/chrome from docs CDN. Local: layout + dashboard widgets. */

body.hud {
  padding: 0;
}

.container {
  position: relative;
  z-index: 1;
  max-width: 1480px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 32px 48px;
}

@media (max-width: 900px) {
  .container {
    padding: 24px 18px 40px;
  }
}


.subtitle {
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 720px;
  line-height: 1.5;
  margin: -8px 0 10px;
}

.subtitle strong {
  color: var(--primary);
  font-weight: 600;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 28px;
  padding: 6px 12px;
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 225, 175, 0.35);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--primary);
}

.status-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(0, 225, 175, 0.55);
}

.grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 1100px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 800px) and (max-width: 1099px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 799px) {
  .grid { grid-template-columns: 1fr; }
}

.card {
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 18px;
  position: relative;
  overflow: visible;
  min-width: 0;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.card::before {
  display: none;
}

.card:hover {
  border-color: var(--glass-border-hover);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: none;
}

.card.full { grid-column: 1 / -1; }

.card h2 {
  font-family: var(--font-title);
  font-style: italic;
  font-weight: 500;
  font-size: 1.25rem;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.card h2::before {
  content: "";
  width: 3px;
  height: 1.1em;
  background: var(--primary);
  border-radius: 2px;
  flex-shrink: 0;
}

.card-description {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 16px;
  line-height: 1.45;
}

.form-group {
  margin-bottom: 14px;
}

label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

input[type="text"],
input[type="number"],
.sound-select {
  width: 100%;
  padding: 11px 13px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.92rem;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="text"]:focus,
input[type="number"]:focus,
.sound-select:focus {
  outline: none;
  border-color: rgba(0, 225, 175, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 225, 175, 0.12);
}

input[type="range"] {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 0 3px rgba(0, 225, 175, 0.18);
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.volume-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
  align-items: start;
}

.volume-control {
  display: flex;
  flex-direction: column;
}

.volume-label {
  display: block;
  text-align: center;
  margin-top: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  min-height: 20px;
  font-family: var(--mono);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

button {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: none;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
  letter-spacing: 0.02em;
  line-height: 1.25;
  white-space: nowrap;
}

button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: var(--ink);
  box-shadow: none;
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.05);
  transform: none;
}

.btn-primary:active {
  transform: none;
}

.btn-secondary {
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  border: 1px solid var(--glass-border);
}

.btn-secondary:hover:not(:disabled) {
  border-color: rgba(0, 225, 175, 0.4);
  background: rgba(0, 225, 175, 0.08);
  color: var(--primary);
}

.url-section {
  margin-top: 18px;
}

.url-section h3 {
  font-family: var(--font-title);
  font-style: italic;
  font-weight: 500;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.url-section h3::before {
  content: "→";
  color: var(--primary);
  font-style: normal;
  font-family: var(--font);
}

.url-item {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
  align-items: center;
}

.url-link {
  flex: 1;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.78rem;
  font-family: var(--mono);
  word-break: break-all;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.url-link:hover {
  border-color: rgba(0, 225, 175, 0.45);
  background: rgba(0, 225, 175, 0.06);
}

.btn-copy {
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--glass-border-hover);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
  flex: 0 0 auto;
}

.btn-copy:hover {
  border-color: rgba(0, 225, 175, 0.5);
  color: var(--primary);
  background: rgba(0, 225, 175, 0.08);
  transform: none;
}

.info-box {
  background: transparent;
  border: none;
  border-left: 2px solid rgba(0, 225, 175, 0.4);
  border-radius: 0;
  padding: 2px 0 2px 12px;
  margin-top: 14px;
}

.info-box code {
  background: rgba(0, 0, 0, 0.35);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--primary);
  font-size: 0.78rem;
  font-family: var(--mono);
}

.info-box p {
  margin-bottom: 6px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.8rem;
  font-weight: 400;
}

.info-box p:last-child {
  margin-bottom: 0;
}

.hint {
  margin-top: 8px;
  font-size: 0.8rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.52);
}

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

  .volume-grid {
    grid-template-columns: 1fr;
  }

  .btn-group {
    flex-direction: row;
  }

  .btn-group button {
    white-space: normal;
  }

  .url-item {
    flex-direction: column;
  }

  .btn-copy {
    width: 100%;
  }
}

.chat-popouts { display: flex; gap: 10px; align-items: center; }
.chat-btn {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  padding: 6px;
}
.chat-btn img {
  width: 22px;
  height: 22px;
  display: block;
}
.chat-btn:hover {
  transform: none;
  border-color: var(--glass-border-hover);
  background: rgba(255, 255, 255, 0.08);
}
.chat-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.chat-all { font-size: 0.85rem; color: var(--muted); font-weight: 700; }

.sound-library-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 12px;
  align-items: start;
}

.sound-panel,
.sound-editor,
.assignment-sequence {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 12px;
}

.sound-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.sound-panel > .panel-title {
  margin: 0;
  padding: 12px 14px;
  min-height: 44px;
}

.sound-panel > .collapsible-content {
  padding: 0 14px 14px;
  flex-direction: column;
  gap: 12px;
}

.panel-title {
  font-family: var(--font-title);
  font-style: italic;
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  line-height: 1;
}

.panel-title::before {
  content: "";
  width: 3px;
  height: 14px;
  background: var(--primary);
  border-radius: 2px;
  flex-shrink: 0;
}

.panel-title .chev {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  width: 18px;
  height: 18px;
  font-size: 16px;
  line-height: 1;
  color: var(--muted);
  font-style: normal;
  font-family: var(--font);
}

.subsection-title {
  font-family: var(--font-title);
  font-style: italic;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

.sound-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300e1af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
}

.sound-select option {
  background: #12151c;
  color: var(--text);
  padding: 8px;
}

.sound-editor {
  background: rgba(122, 83, 221, 0.06);
}

.variant-group { margin-bottom: 14px; }
.variant-group-title {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.variant-group-row { display: block; }
.variant-group-title .chev {
  font-size: 12px;
  color: var(--muted);
  display: inline-block;
  width: 14px;
  height: 14px;
  text-align: center;
}

.collapsible-content { display: none; }
.panel-title[aria-expanded="true"] + .collapsible-content { display: block; }
.sound-panel > .panel-title[aria-expanded="true"] + .collapsible-content { display: flex; }

.variant-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.variant-label {
  font-size: 0.88rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.variant-toggle { position: relative; display: inline-block; width: 44px; height: 24px; }
.variant-toggle input { opacity: 0; width: 0; height: 0; }
.variant-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.08);
  transition: .2s;
  border-radius: 999px;
}
.variant-slider:before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  background-color: white;
  border-radius: 50%;
  transition: .2s;
}
.variant-toggle input:checked + .variant-slider {
  background-color: rgba(0, 225, 175, 0.28);
}
.variant-toggle input:checked + .variant-slider:before {
  transform: translateX(20px);
  background-color: var(--primary);
}

#fromsoft-variants-list { overflow: visible; }
#fromsoft-variants-list .variant-group { margin-bottom: 8px; }

.assignment-sequence {
  min-height: 140px;
  background: rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: auto;
}

.sequence-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.sequence-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--glass-border-hover);
}
.sequence-item-icon { font-size: 18px; opacity: 0.7; }
.sequence-item-content { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.sequence-item-label { font-size: 0.88rem; font-weight: 600; color: var(--text); }
.sequence-item-value {
  font-size: 0.78rem;
  color: var(--muted);
  font-family: var(--mono);
}
.sequence-item-remove {
  padding: 6px 10px;
  background: rgba(224, 122, 122, 0.1);
  border: 1px solid rgba(224, 122, 122, 0.25);
  border-radius: 6px;
  color: var(--bad);
  font-size: 0.78rem;
  cursor: pointer;
}
.sequence-item-remove:hover {
  background: rgba(224, 122, 122, 0.18);
}

.assignment-sequence button,
.assignment-sequence .btn-primary,
.assignment-sequence .btn-secondary,
.assignment-sequence .sound-select,
.assignment-sequence input[type="number"],
.assignment-sequence input[type="text"] {
  flex: 0 0 auto;
  height: 34px;
  min-height: 34px;
  max-height: 34px;
  padding: 0 10px;
  font-size: 0.8rem;
  line-height: 1;
  border-radius: 8px;
  box-sizing: border-box;
}

.assignment-sequence .sound-select {
  flex: 1 1 auto;
  min-width: 0;
  padding-right: 28px;
}

.assignment-sequence .assignment-pause-input {
  width: 96px;
  flex: 0 0 96px;
}

.assignment-phase-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.assignment-phase-header strong {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 700;
}

.assignment-add-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.assignment-pause-label {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}

.assignment-sequence .sequence-item {
  gap: 8px;
  padding: 8px 10px;
  margin: 0;
  align-items: center;
}

#test-assignment { display: none !important; }

.divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--glass-border), transparent);
  margin: 18px 0;
}

@media (max-width: 1200px) {
  .sound-library-grid { grid-template-columns: 1fr; }
}
