:root { --nav-height: 70px; }

body {
  background: #0b0b19;
  color: #e9e9f3;
  min-height: 100vh;
}

.pc-layout {
  display: flex;
  min-height: calc(100vh - var(--nav-height));
}

/* SIDEBAR */
.pc-sidebar {
  width: 280px;
  background: #0c0c1a;
  border-right: 1px solid #22233a;
  padding: 20px 16px;
  height: calc(100vh - var(--nav-height));
  overflow-y: auto;
  margin-top: 13px;
}
.pc-brand { text-align: center; margin-bottom: 16px; }
.pc-brand img { width: 72px; border-radius: 12px; object-fit: contain; transition: 0.2s; }
.pc-brand img:hover { transform: scale(1.05); }
.pc-brand-name { font-weight: 700; font-size: 16px; color: #fff; margin-top: 8px; }
.pc-section-title { font-size: 12px; font-weight: 700; color: #a9b3d6; text-transform: uppercase; margin-bottom: 8px; }

/* Accordion Sidebar */
.acc-btn {
  width: 100%;
  text-align: left;
  background: #111125;
  color: #fff;
  padding: 12px;
  border: 1px solid #22233a;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  transition: background 0.2s;
}
.acc-btn:hover { background: #14142b; }
.acc-btn.active { background: #365CF5; }
.arrow { transition: transform 0.3s ease; }
.acc-btn.active .arrow { transform: rotate(180deg); }

.acc-panel {
  background: #0c0c1a;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  border-left: 1px solid #22233a;
  border-right: 1px solid #22233a;
  border-bottom: 1px solid #22233a;
  border-radius: 0 0 6px 6px;
}
.acc-panel.open { max-height: 400px; }

.crate-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  border: none;
  margin-bottom: 4px;
  border-radius: 4px;
  background: rgba(255,255,255,0.02);
  color: #e9e9f3;
  transition: background .15s ease, color .15s ease;
}
.crate-btn:hover { background: #21213b; }
.crate-btn.active { background: #365CF5; color: #fff; }

/* MAIN AREA */
.pc-main { flex: 1; padding: 24px; }
.pc-kpi { background: #141427; border-radius: 12px; padding: 14px 16px; margin-bottom: 12px;
  display: flex; justify-content: space-between; align-items: center; }
.pc-search input {
  width: 100%; background: #0c0c1a; border: 1px solid #22233a;
  color: #e9e9f3; padding: 10px 12px; border-radius: 10px; outline: none;
}

/* TABLES (Match share.html) */
.acc-item { background: #161627; border-radius: 4px; margin: 12px 0; overflow: hidden; }
.acc-table { width: 100%; border-collapse: collapse; }
.acc-table th, .acc-table td {
  padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.acc-table th { color: #a9b3d6; text-align: left; }
.acc-table img { height: 24px; }

/* === Table Row Hover Highlight === */
.acc-table tbody tr {
  transition: background 0.15s ease, transform 0.1s ease;
}

.acc-table tbody tr:hover {
  background: rgba(54, 92, 245, 0.15);
}

.money-btn {
  background: transparent; border: none; border-radius: 6px; color: white;
  padding: 4px 8px; cursor: pointer; transition: opacity 0.2s ease;
}
.money-btn:hover { opacity: 0.8; }

/* MODAL */
.modal.hidden { display: none; }
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  display: flex; justify-content: center; align-items: center;
  z-index: 1000;
}
.modal-content {
  background: #141427; color: #fff;
  border-radius: 10px; padding: 20px 24px; width: 400px;
}
.close-btn { float: right; cursor: pointer; font-size: 22px; }
.economy-buttons { display: flex; gap: 10px; margin-bottom: 12px; justify-content: center;}
.econ-btn {
    transition: background 0.3s ease;
    width: 100%;
    background: #0d0d1a;
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
}
.econ-btn.active { background: #365CF5; }
.price-values { margin-top: 10px; }

.arrow.rotated {
  transform: rotate(180deg);
}

.highlight-row {
  background: rgba(255, 255, 255, 0.05);
}

.acc-panel-inner {
  overflow-x: auto;
  max-height: 400px;
}

.acc-panel,
.acc-panel-inner {
  transition: all 0.3s ease;
}

/* ===== Modal Fade Animations ===== */
#priceModal {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#priceModal.show {
  opacity: 1;
  pointer-events: all;
}

#priceModal:not(.hidden) {
  backdrop-filter: blur(2px);
}

/* ===== Sidebar crate buttons (share-style) ===== */
.crate-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.crate-btn {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  background: #111125;
  color: #a9b3d6;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.crate-btn:hover {
  background: #21213b;
}

.crate-btn.active {
  background: #365CF5;
}

/* ===== Search alignment ===== */
.pc-search {
  max-width: 520px;
  margin: 0 0 12px 0;
  text-align: left;
}

/* ===== Accordion Header layout ===== */
.acc-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: #141427;
  border: 1px solid #22233a;
  padding: 10px 14px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  color: #e9e9f3;
}

.acc-btn:hover {
  background: #191935;
}

.acc-count {
  margin-left: auto;
  font-size: 0.9rem;
  color: #a9b3d6;
}

/* ===== Table layout fixes ===== */
.acc-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 6px;
  font-size: 14px;
}

.acc-table th,
.acc-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #22233a;
  text-align: left;
  color: #e9e9f3;
}

.acc-table th {
  font-weight: 600;
  color: #cfd3ff;
}

.acc-table img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 6px;
}

.collections-divider {
  border: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.1); /* subtle line */
  margin: 40px 0; /* space above and below */
}

/* === Accordion Root Scroll Fix === */
#accRoot {
  display: block;
  overflow-y: auto;
  max-height: calc(92vh - 120px); /* adjust offset to match your header height */
  padding-right: 6px;
  scroll-behavior: smooth;
}

#accRoot::-webkit-scrollbar {
  width: 8px;
}
#accRoot::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
}
#accRoot::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

.info-icon {
  margin-left: 6px;
  cursor: pointer;
  font-size: 14px;
  color: #9cb3ff;
  transition: color 0.2s ease;
}

.info-icon:hover {
  color: #ffffff;
}

.global-tooltip {
  position: absolute;
  display: none;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  max-width: 260px;
  line-height: 1.4;
  z-index: 9999;
  pointer-events: none;
  white-space: normal;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.modal-content-price.large {
  width: 90%;
  max-width: 1100px;
  overflow-y: auto;
  background: #1b1b2d;
  color: #fff;
  border-radius: 10px;
  padding: 12px;
}

.modal-body-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(420px, 1.25fr);
  gap: 24px;
  align-items: center;
}

.modal-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  text-align: center;
  padding: 0 !important;
  border-bottom: none !important;
}

.modal-header .close-btn {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: 0;
  color: #ccc;
  font-size: 20px !important;
  line-height: 1;
  width: auto;
  padding: 0;
  cursor: pointer;
  transition: color .2s ease;
}
.modal-header .close-btn:hover {
  color: #b5b5b5;
  background: transparent;
}

.modal-content-price .btn-primary {
  width: 95%;
  padding: 12px;
  background-color: #0d0d1a;
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.modal-content-price .btn-primary:hover {
  background-color: #0a0a12;
}

.pricing-divider {
    background: linear-gradient(to right, transparent, rgb(87 87 87 / 60%), transparent);
    border: 0;
    height: 1px;
    margin: 20px 0 20px 0;
}

.item-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 8px;
}

.item-header img {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  background: transparent;
  margin-bottom: 8px;
}

.item-info h2 {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}
.item-info .item-set {
  font-size: 14px;
  color: #9ca3c9;
  margin-top: 4px;
}
.item-set { color: #a9b3d6; margin-top: 4px; }

.price-values {
  display: flex;
  justify-content: space-between;
  text-align: center;
  margin: 20px 0;
}
.price-values div {
  flex: 1;
  background: #0c0c1a;
  border: 1px solid #22233a;
  border-radius: 8px;
  padding: 10px 0;
}
.price-values label {
  display: block;
  font-size: 12px;
  color: #a9b3d6;
}
.price-values span {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
}

.comment-list {
  background: #0c0c1a;
  border: 1px solid #22233a;
  max-height: 33vh;
  overflow-y: auto;
  overflow-x: hidden;
}
.comment-list div {
  padding: 6px;
}
.comment-list div:last-child { border-bottom: none; }

.comment-input {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  position: relative;
}

.comment-input textarea {
  width: 95%;
  height: 100px;
  max-height: 150px;
  max-width: 95%;
  background: #0c0c1a;
  border: 1px solid #22233a;
  border-radius: 8px;
  color: #e9e9f3;
  padding: 12px 44px 28px 12px;
  resize: none;
  box-sizing: border-box;
  margin-top: 20px;
  position: relative;
}

.comment-input .gate-overlay {
  position: absolute;
  top: 22px;
  width: 95%;
  height: 100px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(25,25,45,.85), rgba(25,25,45,.88));
  color: #cfd3ff;
  font-size: 0.9rem;
  text-align: center;
  pointer-events: none;
  border: 1px dashed rgba(255,255,255,0.12);
}

/* subtle shake for invalid price input */
@keyframes pc-shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}
.shake { animation: pc-shake 350ms ease; }

.comment-input .comment-mute-overlay {
  position: absolute;
  top: 20px;
  width: 95%;
  height: 100px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(45,25,25,.88), rgba(45,25,25,.9));
  color: #ffd9d9;
  text-align: center;
  border: 1px dashed rgba(255, 90, 90, 0.28);
  pointer-events: none;
}
.comment-mute-overlay-inner { padding: 0 12px; line-height: 1.1; font-size: 0.8rem; }
.comment-mute-overlay-inner b { color: #ffe2e2; }

.comment-mute-overlay .eta {
  font-weight: 700; color: #ffe2e2;
}



.char-counter {
  position: absolute;
  right: 12px;
  bottom: 10px;
  font-size: 12px;
  color: #9ca3c9;
  opacity: .85;
  pointer-events: none;
}

.comment-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
}
.comment-actions .btn-primary {
  width: auto;
  padding: 10px 14px;
  background: #365CF5;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}
.btn-primary, .btn-secondary {
  background: #365CF5;
  border: none;
  border-radius: 6px;
  color: #fff;
  padding: 8px 16px;
  cursor: pointer;
  transition: background .2s;
}
.btn-primary:hover { background: #4a73ff; }
.btn-secondary {
  background: #22233a;
}
.btn-secondary:hover { background: #2e2f4a; }

.verified-badge {
  display: inline-block;
  margin-left: 4px;
  font-size: 12px;
  color: #4ade80; /* soft green */
  vertical-align: middle;
}

.econ-tag {
  display: inline-block;
  padding: 2px 8px;
  margin-left: 6px;
  margin-right: 6px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1;
  font-weight: 600;
  background: #0f0f12;
  color: #e5e9f7;
}

/* subtle color accents per economy */
.econ-phoenix  { background: #1e1e21; border-color: #85858517; }
.econ-lynx     { background: #1e1e21; border-color: #85858517; }
.econ-wyvern   { background: #1e1e21; border-color: #85858517; }
.econ-cerberus { background: #1e1e21; border-color: #85858517; }

/* --- Comment Entry Styling --- */
.comment-entry {
  padding: 10px 14px;
  margin-bottom: 10px;
  position: relative;
  transition: background 0.2s ease;
}
.comment-entry:hover {
  background: #161623;
}
.comment-entry b {
  font-size: 0.9rem;
  color: #e8ebf9;
  font-weight: 600;
  padding-right: 6px;
}
.comment-entry small {
  display: block;
  color: #a5a9c2;
  font-size: 12px;
  margin-top: 4px;
}

.modal-comments h3 {
  margin-top: 0 !important;
}

.comment-line { display: flex; align-items: center; flex-wrap: wrap; justify-content: center;}
.comment-text { color: #e5e9f7; font-size: 0.85rem; overflow-wrap: anywhere; word-break: break-word; white-space: pre-wrap;}

/* all inline SVG icons */
.icon { width: 16px; height: 16px; fill: currentColor; }
.icon-verify { color: #52b788; }

/* --- Minecraft Tag --- */
.mc-tag {
    padding: 2px 4px 2px 4px;
    border-radius: 4px;
    gap: 4px;
    border: 1px solid #494949b5;
    display: flex;
    font-size: 12px;
    font-weight: 600;
    color: #e5e9f7;
    opacity: 0.85;
}

.mc-head{
  margin-top: 1px;
  width:16px;
  height:16px;
  image-rendering: pixelated;
  border-radius:3px;
  flex:0 0 auto;
}

.mc-name{
  display:inline-block;
}

/* --- Delete Icon (Admin only) --- */
.comment-delete {
  position: absolute;
  top: 8px;
  right: 10px;
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  background: transparent;
  border: 0;
  color: #e4e6f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  z-index: 5;
  cursor: pointer;
  transition: opacity 0.15s ease, color 0.15s ease;
}
.comment-entry:hover .comment-delete {
  opacity: 1;
}
.comment-delete .icon-trash { width: 16px; height: 16px; }
.comment-delete:hover {
  color: #ff5a5a;
  background: transparent !important;
}

.comment-mute {
  position: absolute;
  right: 30px;
  top: 8px;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: #e4e6f0;
  opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease;
}
.comment-entry:hover .comment-mute { opacity: 1; }
.comment-mute:hover { color: #ff5a5a; }

.comment-mute:disabled { opacity: 0.25; cursor: not-allowed; }

.comment-mute .icon-mute {
  width: 16px;
  height: 16px;
}

/* Small layout for the modal body fields */
.mute-modal {
  display: grid;
  gap: 12px;
  max-width: 720px;
  margin: 0 auto;
  text-align: left;
}
.mute-modal .mute-row {
  font-size: 0.85rem;
}
.mute-modal .mute-user-line { text-align: left; }
.mute-modal .mute-row label { display:block; margin-bottom: 4px; color:#a9b3d6; }
.mute-modal select, .mute-modal textarea {
  resize: none;
  width: 130%;
  background: #1f2332;
  color: #e7e9f3;
  border: 1px solid #2c3146;
  border-radius: 8px;
  padding: 8px 10px;
}

.muted-badge {
  display: inline-flex;
  align-items: center;
  margin-right: 6px;
  color: #ff6b6b;
  font-weight: 600;
  font-size: 0.8rem;
}
.muted-badge .icon-mute { width: 16px; height: 16px; }

/* Community Price card */
.ins-card {
    margin-top: 14px;
    padding: 14px;
    border-radius: 8px;
    background: #0c0c1a;
    border: 1px solid #22233a;
}
.ins-title{
  font-weight:600;
  margin-bottom:8px;
  display:flex;
  align-items:center;
  gap:8px;
}
.badge{
  font-size:.75rem;
  padding:2px 6px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  text-transform:capitalize;
}
.badge.high   { background: rgba(46,204,113,.18); }
.badge.medium { background: rgba(241,196,15,.18); }
.badge.low    { background: rgba(231,76,60,.18); }

.ins-value{ font-size:0.9rem; margin:6px 0; }
.ins-sub  { opacity:.85; font-size:.9rem; margin-top:4px; margin-bottom: 8px; }

.ins-caption {
  font-size: 12px;
  color: #a9b3d6;
  margin-bottom: 8px;
}

.ins-row {
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.ins-updated {
  font-size: 12px;
  color: #8e97b6;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.btn-ghost-sm {
    transition: background 0.2s ease;
    padding: 6px 10px;
    border-radius: 4px;
    background: transparent;
    border: 1px solid #212121;
    color: #dfe3f0;
    cursor: pointer;
}
.btn-ghost-sm:hover {
    background: #141425;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-right: 6px !important;
  padding-top: 10px;
  padding-bottom: 0 !important;
  margin-top: 16px;
  border-top: none !important;
}

.modal-footer .btn-secondary {
    font-size: 0.85rem;
    width: auto !important;
    background: #0d0d1a;
    color: #fff;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.modal-footer .btn-secondary:hover {
  background: #0a0a12;
}

/* Pagination footer inside modal comment section */
#commentList .pc-pager-wrap {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: center;
}
.pc-pager { display: inline-flex; gap: 6px; align-items: center; background: transparent; }
.pc-page-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: #dfe3f0;
  cursor: pointer;
}
.pc-page-btn[disabled] { opacity: 0.4; cursor: default; }
.pc-page-btn.active {
  background: rgba(82, 130, 255, 0.18);
  border-color: rgba(82,130,255,0.35);
}
.pc-ellipsis { padding: 0 4px; opacity: 0.7; }

@media (max-width: 980px) {
  .modal-body-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .modal-content-price.large .modal-comments .comment-list {
    max-height: 46vh;
  }
}

/* --- Settings row under CRATES --- */
.pc-settings-row {
  display: flex;
  justify-content: center;
  margin: 10px 0 6px;
}

.pc-settings-btn {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  background: #111125;
  color: #a9b3d6;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;


  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.pc-settings-btn:hover {
  background: #21213b;
}

.pc-settings-btn.active {
  background: #365CF5;
  color: #fff;
}

.pc-settings-btn .pc-gear {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  opacity: 0.95;
  color: currentColor;
}

.pc-settings-btn:hover .pc-gear .spin {
  transform: rotate(180deg);
  transform-origin: 12px 12px;
  transition: transform .5s cubic-bezier(.2,.8,.2,1);
}

.pc-settings-label {
  line-height: 1;
}

/* --- Settings modal --- */
.pc-settings-overlay {
  position:fixed; inset:0; display:grid; place-items:center; z-index:9998;
  background:rgba(0,0,0,.55); opacity:0; pointer-events:none;
  transition:opacity .2s ease;
}
.pc-settings-overlay.show { opacity:1; pointer-events:auto; }
.pc-settings-card {
  width:520px; max-width:calc(100vw - 32px);
  background:#0c0c1a; color:#e7e9f3;
  border-radius:14px; overflow:hidden; transform: translateY(10px); opacity:0;
  box-shadow:0 10px 30px rgba(0,0,0,.35);
  transition: transform .22s ease, opacity .22s ease;
}
.pc-settings-overlay.show .pc-settings-card { transform: translateY(0); opacity:1; }

.pc-settings-header {
  display:flex; justify-content:space-between; align-items:center;
  padding:14px 16px;
}
.pc-settings-header h3 { margin:0; font-size:1.05rem; }
.pc-settings-close {
  background:transparent; border:0; color:#cfd3ff; font-size:22px; cursor:pointer;
  transition:color .15s ease;
}
.pc-settings-close:hover { color:#ffffff; }

.pc-settings-body { padding:8px 16px; }
.pc-settings-section { padding:12px 0; }
.pc-settings-section:last-child { border-bottom:0; }
.pc-setting-line { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.pc-setting-title {
    font-weight: 700;
    color: #a9b3d6;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.pc-settings-footer {
  display:flex; justify-content:flex-end; gap:8px; padding:12px 16px;
  border-top:1px solid #22233a;
}
.btn-ghost { background:#22233a; color:#fff; border:0; border-radius:8px; padding:8px 14px; cursor: pointer; }
.btn-primary { background:#365cf5; color:#fff; border:0; border-radius:8px; padding:8px 14px; }
.btn-ghost:hover { background:#2a2d46; } .btn-primary:hover { background:#2d51ed; }

.pc-note { opacity:.7; }

/* radio row only visible when switch is on */
.pc-radio-row {
  display:none; gap:14px; margin-top:10px; font-size:.95rem; justify-content: center;
}
.pc-radio-row.show { display:flex; }

/* ===== Settings panel - "toggle-categories" inspired skin ===== */
.pc-settings-modern {
  border-radius: 10px;
}

.pc-settings-modern .pc-settings-section {
  margin: 0 0 10px 0;
  background: #14162a;
  border-radius: 10px;
  overflow: hidden;
}

/* Section header row */
.pc-settings-modern .pc-setting-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  font-weight: 600;
}

/* Subtext */
.pc-settings-modern .pc-note {
  display: block;
  opacity: .75;
  padding: 10px 14px 12px 14px;
  border-top: 1px solid #22233a;
}

/* Economy radio row (shown when auto-select is ON) */
.pc-settings-modern #pc-econ-choices {
  padding: 12px 14px 16px 14px;
  border-top: 1px solid #22233a;
}

/* === Toggle re-skin (works with your existing <label class="pc-toggle"><input>... ) === */
.pc-settings-modern .pc-toggle {
  --h: 18px;
  --pad: 2px;
  --w: calc(1.8 * var(--h));
  --r: calc(var(--h) / 2 + var(--pad));
  position: relative;
  width: var(--w);
  height: var(--h);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.pc-settings-modern .pc-toggle input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
}

.pc-settings-modern .pc-toggle .toggle-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.pc-settings-modern .pc-toggle .toggle-svg .trk {
  fill: #2a2f4a;
  transition: fill .18s ease;
}

.pc-settings-modern .pc-toggle .toggle-svg .knob {
  fill: #dadff9;
  transition: transform .18s ease, fill .18s ease;
}

.pc-settings-modern .pc-toggle input:checked ~ .toggle-svg .trk {
  fill: #2e6ddd;
}

.pc-settings-modern .pc-toggle input:checked ~ .toggle-svg .knob {
  transform: translateX(40px);
  fill: #fff;
}

/* Optional glyph (you already have <span class="toggle-glyph">) */
.pc-settings-modern .pc-toggle .toggle-glyph { display:none; }

/* Make the modal header/foot match the style */
.pc-settings .pc-settings-footer {
  border-top: 1px solid #22233a;
}

/* Radio labels inside #pc-econ-choices */
.pc-settings-modern #pc-econ-choices label {
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}

/* ----- Toggle Switch (animated) ----- */
.pc-toggle {
  --off-bg: #ff7a7a;          /* disabled track color (soft red) */
  --on-bg:  #6efad3;          /* enabled track color (mint green) */
  --knob:   #ffffff;          /* knob color */
  --knob-shadow: 0 2px 6px rgba(0,0,0,.25);
  --ring: 0 0 0 0 rgba(99, 125, 255, 0); /* focus ring */

  position: relative;
  display: inline-grid;
  place-items: center;
  width: 80px;
  height: 40px;
  cursor: pointer;
  user-select: none;
}

.pc-toggle input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  margin: 0;
}

/* the SVG sits directly after the input in your markup */
.pc-toggle .toggle-svg {
  display: block;
  width: 80px;
  height: 40px;
}

/* track */
.pc-toggle .toggle-svg .trk {
  fill: var(--off-bg);
  transition: fill .22s ease, filter .22s ease;
}

/* knob */
.pc-toggle .toggle-svg .knob {
  fill: var(--knob);
  filter: drop-shadow(var(--knob-shadow));
  transform: translateX(0);          /* off position (cx=20) */
  transition: transform .24s cubic-bezier(.22,.61,.36,1), filter .2s ease;
}

/* glyph (dots/check) that rides with the knob */
.pc-toggle .toggle-glyph {
  position: absolute;
  left: 10px;                /* aligns with knob's left when OFF */
  top: 8px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  pointer-events: none;
  transform: translateX(0);
  transition: transform .24s cubic-bezier(.22,.61,.36,1), color .2s ease, opacity .2s ease;
  color: rgba(80, 100, 140, .9);
  font-size: 14px;
  line-height: 1;
}

.pc-toggle .toggle-glyph::before {
  content: '•••';            /* off-state dots */
  letter-spacing: 2px;
  opacity: .8;
}

/* focus ring for accessibility */
.pc-toggle input:focus-visible + .toggle-svg {
  outline: none;
}
.pc-toggle input:focus-visible + .toggle-svg .trk {
  filter: drop-shadow(0 0 0 rgba(0,0,0,0));
}
.pc-toggle:has(input:focus-visible) {
  box-shadow: 0 0 0 3px rgba(99,125,255,.25);
  border-radius: 999px;
}

/* ---- ON (checked) state ---- */
.pc-toggle input:checked + .toggle-svg .trk {
  fill: var(--on-bg);
}
.pc-toggle input:checked + .toggle-svg .knob {
  transform: translateX(40px); /* slide knob from cx=20 to ~60 */
}
.pc-toggle input:checked ~ .toggle-glyph {
  transform: translateX(40px);
  color: rgba(20, 85, 70, .95);
}
.pc-toggle input:checked ~ .toggle-glyph::before {
  content: '✓';              /* on-state checkmark */
  font-weight: 700;
  letter-spacing: 0;
  opacity: .95;
}

/* optional: slight press effect */
.pc-toggle:active .toggle-svg .knob {
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.25));
}

/* ===== Settings panel subrow spacing (nested controls) */
.pc-setting-subrow { 
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255,255,255,0.06);
}
.pc-setting-line.sub {
  margin-top: 0;
}

/* Title above the slider */
.pc-duration-title {
  text-align: center;
  font-weight: 700;
  margin: 14px 0 10px;
}

/* Ticks under the slider */
.pc-ticks {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  font-size: 0.9rem;
  opacity: 0.85;
  padding: 0 4px;
}

/* Make slider full width within the card */
.pc-duration-wrap {
  padding: 8px 6px 4px;
}
.pc-duration-slider {
  width: 100%;
  display: block;
}

/* ===================== Windows-10 style slider ===================== */
/* Scoped so it only affects this panel */
.pc-settings-modern input[type="range"] {
  font-size: 1rem;
  width: 100%;
  color: #3a86ff;                /* knob & progress color (dark theme) */
  --thumb-height: 1.375em;
  --thumb-width: 0.5em;
  --track-height: 0.125em;
  --track-color: rgba(255,255,255,0.12);
  --brightness-hover: 180%;
  --brightness-down: 80%;
  --clip-edges: 0.0125em;
  background: transparent;
  position: relative;
  overflow: hidden;
}
.pc-settings-modern input[type="range"]:disabled {
  filter: grayscale(1);
  opacity: .35;
  cursor: not-allowed;
}

/* WebKit */
.pc-settings-modern input[type="range"],
.pc-settings-modern input[type="range"]::-webkit-slider-runnable-track,
.pc-settings-modern input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  transition: all ease 100ms;
  height: var(--thumb-height);
}
.pc-settings-modern input[type="range"]::-webkit-slider-thumb {
  --thumb-radius: calc((var(--thumb-height) * 0.5) - 1px);
  --clip-top: calc((var(--thumb-height) - var(--track-height)) * 0.5 - 0.5px);
  --clip-bottom: calc(var(--thumb-height) - var(--clip-top));
  --clip-further: calc(100% + 1px);
  --box-fill: calc(-100vmax - var(--thumb-width, var(--thumb-height))) 0 0 100vmax currentColor;
  width: var(--thumb-width, var(--thumb-height));
  background: linear-gradient(currentColor 0 0) scroll no-repeat left center /
              50% calc(var(--track-height) + 1px);
  background-color: currentColor;
  box-shadow: var(--box-fill);
  border-radius: var(--thumb-width, var(--thumb-height));
  filter: brightness(100%);
  clip-path: polygon(
    100% -1px,
    var(--clip-edges) -1px,
    0 var(--clip-top),
    -100vmax var(--clip-top),
    -100vmax var(--clip-bottom),
    0 var(--clip-bottom),
    var(--clip-edges) 100%,
    var(--clip-further) var(--clip-further)
  );
  cursor: grab;
}
.pc-settings-modern input[type="range"]:active::-webkit-slider-thumb { cursor: grabbing; filter: brightness(var(--brightness-down)); }
.pc-settings-modern input[type="range"]:hover::-webkit-slider-thumb { filter: brightness(var(--brightness-hover)); }
.pc-settings-modern input[type="range"]::-webkit-slider-runnable-track {
  background: linear-gradient(var(--track-color) 0 0) scroll no-repeat center /
              100% calc(var(--track-height) + 1px);
  border-radius: var(--track-height);
}

/* Firefox */
.pc-settings-modern input[type="range"],
.pc-settings-modern input[type="range"]::-moz-range-track,
.pc-settings-modern input[type="range"]::-moz-range-thumb {
  appearance: none;
  transition: all ease 100ms;
  height: var(--thumb-height);
}
.pc-settings-modern input[type="range"]::-moz-range-thumb {
  background: currentColor;
  border: 0;
  width: var(--thumb-width, var(--thumb-height));
  border-radius: var(--thumb-width, var(--thumb-height));
  cursor: grab;
}
.pc-settings-modern input[type="range"]:active::-moz-range-thumb { cursor: grabbing; }
.pc-settings-modern input[type="range"]::-moz-range-track {
  width: 100%;
  background: var(--track-color);
}
.pc-settings-modern input[type="range"]::-moz-range-progress {
  appearance: none;
  background: currentColor;
  transition-delay: 30ms;
}
.pc-settings-modern input[type="range"]::-moz-range-track,
.pc-settings-modern input[type="range"]::-moz-range-progress {
  height: calc(var(--track-height) + 1px);
  border-radius: var(--track-height);
}

#pc-settings-btn.crate-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  background: #111125;
  color: #a9b3d6;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

#pc-settings-btn.crate-btn:hover { background: #21213b; }
#pc-settings-btn.crate-btn:active { background: #1b1b34; }

#pc-settings-btn .pc-gear {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: currentColor;
  transition: transform .25s ease;
}

#pc-settings-btn .pc-settings-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}