:root {
      --op-bg-deep: #020713;
      --op-bg-panel: #051325;
      --op-bg-panel-alt: #071a33;

      --op-text-main: #e5f1ff;
      --op-text-soft: #a0b2d2;
      --op-text-faded: #7d90b2;
      --op-text-bright: #ffffff;

      --op-border-strong: rgba(122, 190, 255, 0.96);
      --op-border-soft: rgba(96, 145, 220, 0.9);

      --op-accent: #3ba7ff;
      --op-accent-soft: rgba(59, 167, 255, 0.24);
      --op-accent-strong: #66d1ff;

      --op-success: #53e0b3;
      --op-warning: #ffd36b;
      --op-danger: #ff6f8a;
    }

    * { box-sizing: border-box; }

    body {
      margin: 0;
      min-height: 100vh;
      background:
        radial-gradient(circle at 10% -10%, rgba(121, 190, 255, 0.28) 0, transparent 55%),
        radial-gradient(circle at 90% -15%, rgba(98, 170, 255, 0.22) 0, transparent 60%),
        linear-gradient(180deg, #020713 0%, #01030b 52%, #000 100%);
      color: var(--op-text-main);
      font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    }

    a { color: inherit; text-decoration: none; }
    a:hover { text-decoration: underline; }

    main { padding: 1.6rem 0 3.5rem; }
    @media (max-width: 575.98px) { main { padding: 1.2rem 0 3rem; } }

    /* Glass panels */
    .op-glass-panel {
      border-radius: 18px;
      background: radial-gradient(circle at top left,
                  rgba(92, 160, 255, 0.32) 0,
                  rgba(5, 15, 32, 0.97) 46%,
                  #040915 100%);
      border: 1px solid var(--op-border-soft);
      box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.97),
        0 24px 48px rgba(5, 20, 48, 0.94),
        inset 0 0 18px rgba(110, 180, 255, 0.15);
      padding: 1.05rem 1.2rem;
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
    }

    .op-glass-panel--alt {
      background: radial-gradient(circle at top right,
                  rgba(111, 187, 255, 0.24) 0,
                  rgba(4, 15, 32, 0.96) 55%,
                  #030712 100%);
    }

    .op-panel-divider {
      height: 1px;
      border-radius: 999px;
      background: linear-gradient(
        90deg,
        rgba(110, 180, 255, 0.08),
        rgba(110, 180, 255, 0.85),
        rgba(110, 180, 255, 0.08)
      );
      margin: 0.55rem 0 0.85rem;
    }

    /* Breadcrumbs */
    .op-breadcrumbs {
      display: flex;
      flex-wrap: wrap;
      gap: 0.35rem;
      align-items: center;
      font-size: 0.78rem;
      color: var(--op-text-faded);
      margin-bottom: 0.9rem;
      letter-spacing: 0.04em;
    }

    .op-breadcrumbs a {
      color: var(--op-text-soft);
      text-decoration: none;
    }

    .op-breadcrumbs a:hover { text-decoration: underline; }

    .op-breadcrumb-sep {
      opacity: 0.75;
    }

    .op-breadcrumb-current {
      color: rgba(230, 244, 255, 0.9);
    }

    /* Thread title (compact) */
    .op-thread-title {
      font-size: clamp(1.35rem, 2.6vw, 1.85rem);
      font-weight: 600;
      color: var(--op-text-bright);
      margin: 0 0 0.25rem;
      line-height: 1.2;
    }

    .op-thread-sub {
      font-size: 0.86rem;
      color: var(--op-text-soft);
      margin: 0;
      max-width: 860px;
    }

    .op-thread-title-wrap {
      margin-bottom: 1rem;
    }

    /* Post / reply cards */
    .op-thread-post { margin-bottom: 0.9rem; }

    .op-thread-post-inner {
      display: grid;
      grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
      gap: 1.05rem;
    }

    @media (max-width: 991.98px) {
      .op-thread-post-inner { grid-template-columns: minmax(0, 1fr); }
    }

    .op-thread-author {
      display: flex;
      flex-direction: column;
      gap: 0.45rem;
      max-width: 260px;
    }

    @media (max-width: 991.98px) {
      .op-thread-author {
        flex-direction: row;
        align-items: center;
        max-width: 100%;
      }
    }

    .op-author-avatar {
      width: 40px;
      height: 40px;
      border-radius: 999px;
      background:
        radial-gradient(circle at 30% 0,
          rgba(148, 206, 255, 0.96) 0,
          rgba(67, 151, 255, 0.98) 40%,
          #020713 100%);
      box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.96),
        0 7px 16px rgba(0, 0, 0, 0.96);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 1.05rem;
      color: #02101f;
      font-weight: 650;
      flex-shrink: 0;
    }

    .op-author-name {
      font-size: 0.9rem;
      font-weight: 520;
      color: var(--op-text-bright);
      line-height: 1.1;
    }

    .op-author-role {
      font-size: 0.76rem;
      color: var(--op-text-soft);
    }

    .op-author-meta {
      font-size: 0.76rem;
      color: var(--op-text-faded);
      line-height: 1.35;
    }

    /* Badges (icons with popups) */
    .op-badges-row {
      display: flex;
      flex-wrap: wrap;
      gap: 0.35rem;
      margin-top: 0.25rem;
    }

    .op-badge-btn {
      width: 30px;
      height: 30px;
      border-radius: 999px;
      border: 1px solid rgba(122, 190, 255, 0.96);
      background: rgba(3, 10, 24, 0.96);
      color: rgba(230, 244, 255, 0.92);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.96),
        0 8px 16px rgba(0, 0, 0, 0.92),
        inset 0 0 10px rgba(110, 180, 255, 0.12);
      transition: 0.14s ease-out;
      position: relative;
    }

    .op-badge-btn:hover {
      border-color: rgba(151, 210, 255, 1);
      transform: translateY(-1px);
      box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.96),
        0 12px 22px rgba(0, 0, 0, 0.96),
        0 0 18px rgba(148, 206, 255, 0.4);
    }

    /* Tooltip/popover styling (Bootstrap overrides) */
    .popover {
      border-radius: 14px;
      border: 1px solid rgba(122, 190, 255, 0.9);
      background: radial-gradient(circle at top left,
                rgba(92, 160, 255, 0.22) 0,
                rgba(4, 12, 26, 0.98) 48%,
                rgba(2, 7, 19, 0.99) 100%);
      box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.96),
        0 22px 44px rgba(0, 0, 0, 0.96),
        0 0 22px rgba(148, 206, 255, 0.25);
      color: var(--op-text-main);
    }

    .popover-header {
      border-bottom: 1px solid rgba(96, 145, 220, 0.55);
      background: transparent;
      color: var(--op-text-bright);
      font-weight: 600;
      font-size: 0.82rem;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      padding: 0.55rem 0.8rem 0.45rem;
      border-top-left-radius: 14px;
      border-top-right-radius: 14px;
    }

    .popover-body {
      padding: 0.6rem 0.8rem 0.8rem;
      font-size: 0.82rem;
      color: var(--op-text-soft);
      line-height: 1.4;
    }

    .bs-popover-auto[data-popper-placement^="top"] > .popover-arrow::after,
    .bs-popover-top > .popover-arrow::after {
      border-top-color: rgba(4, 12, 26, 0.98);
    }

    .bs-popover-auto[data-popper-placement^="bottom"] > .popover-arrow::after,
    .bs-popover-bottom > .popover-arrow::after {
      border-bottom-color: rgba(4, 12, 26, 0.98);
    }

    /* Thread content */
    .op-thread-content { display: flex; flex-direction: column; gap: 0.35rem; }

    .op-thread-post-header {
      display: flex;
      justify-content: space-between;
      gap: 0.6rem;
      align-items: baseline;
      margin-bottom: 0.15rem;
    }

    .op-thread-post-labels {
      display: inline-flex;
      flex-wrap: wrap;
      gap: 0.35rem;
      font-size: 0.76rem;
      color: var(--op-text-faded);
      align-items: center;
    }

    .op-thread-post-time {
      font-size: 0.76rem;
      color: var(--op-text-faded);
      white-space: nowrap;
    }

    .op-thread-post-body {
      font-size: 0.88rem;
      color: var(--op-text-main);
      line-height: 1.6;
    }

    .op-thread-post-body p { margin-bottom: 0.6rem; }
    .op-thread-post-body p:last-child { margin-bottom: 0; }

    .op-thread-post-body code {
      font-size: 0.82rem;
      background: rgba(5, 17, 35, 0.96);
      border-radius: 4px;
      padding: 0.1rem 0.25rem;
    }

    .op-thread-post-body pre {
      font-size: 0.8rem;
      background: rgba(5, 17, 35, 0.96);
      border-radius: 10px;
      padding: 0.6rem 0.75rem;
      overflow-x: auto;
      border: 1px solid rgba(71, 118, 197, 0.96);
      margin: 0.6rem 0;
    }

    .op-thread-post-footer {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 0.6rem;
      margin-top: 0.35rem;
      font-size: 0.78rem;
      color: var(--op-text-faded);
    }

    .op-thread-post-actions {
      display: inline-flex;
      flex-wrap: wrap;
      gap: 0.4rem;
    }

    .op-thread-post-action-btn {
      display: inline-flex;
      align-items: center;
      gap: 0.25rem;
      border-radius: 999px;
      padding: 0.16rem 0.55rem;
      border: 1px solid rgba(63, 103, 180, 0.96);
      background: rgba(3, 10, 24, 0.96);
      color: var(--op-text-soft);
      cursor: pointer;
      font-size: 0.76rem;
      text-decoration: none;
      transition: 0.14s ease-out;
    }

    .op-thread-post-action-btn:hover {
      border-color: rgba(151, 210, 255, 1);
      color: var(--op-text-main);
      box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.96),
        0 10px 20px rgba(0, 0, 0, 0.96);
      text-decoration: none;
    }

    .op-thread-post-meta {
      display: inline-flex;
      flex-wrap: wrap;
      gap: 0.5rem;
      align-items: center;
      justify-content: flex-end;
    }

    .op-thread-post-meta span i {
      font-size: 0.84rem;
      margin-right: 0.12rem;
    }

    @media (max-width: 575.98px) {
      .op-thread-post-footer {
        flex-direction: column;
        align-items: flex-start;
      }
      .op-thread-post-meta { justify-content: flex-start; }
    }

    /* Reply editor */
    .op-reply-panel { margin-top: 1.4rem; }

    .op-reply-label {
      font-size: 0.82rem;
      text-transform: uppercase;
      letter-spacing: 0.13em;
      color: var(--op-text-faded);
      margin-bottom: 0.35rem;
    }

    .op-reply-textarea {
      width: 100%;
      border-radius: 14px;
      border: 1px solid rgba(92, 150, 230, 0.96);
      padding: 0.65rem 0.85rem;
      font-size: 0.9rem;
      background: rgba(3, 10, 24, 0.96);
      color: var(--op-text-main);
      box-shadow:
        inset 0 0 12px rgba(0, 0, 0, 0.9),
        0 0 12px rgba(120, 185, 255, 0.25);
      min-height: 150px;
      resize: vertical;
    }

    .op-reply-textarea:focus {
      outline: none;
      border-color: rgba(151, 210, 255, 1);
      box-shadow:
        inset 0 0 12px rgba(0, 0, 0, 0.9),
        0 0 20px rgba(151, 210, 255, 0.7);
    }

    .op-reply-footer {
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      align-items: center;
      gap: 0.6rem;
      margin-top: 0.6rem;
      font-size: 0.78rem;
      color: var(--op-text-faded);
    }

    .op-reply-actions {
      display: inline-flex;
      flex-wrap: wrap;
      gap: 0.4rem;
      align-items: center;
    }

    .op-btn-primary {
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      border-radius: 999px;
      padding: 0.48rem 1.05rem;
      border: 1px solid rgba(214, 238, 255, 0.98);
      background: linear-gradient(
        135deg,
        rgba(67, 151, 255, 0.45),
        rgba(134, 209, 255, 0.9)
      );
      color: #04101f;
      font-size: 0.82rem;
      font-weight: 600;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      cursor: pointer;
      box-shadow:
        0 9px 20px rgba(0, 0, 0, 0.9),
        0 0 18px rgba(110, 190, 255, 0.5);
      border-width: 1px;
      transition: 0.16s ease-out;
      text-decoration: none;
    }

    .op-btn-primary:hover {
      transform: translateY(-1px);
      box-shadow:
        0 12px 26px rgba(0, 0, 0, 0.96),
        0 0 24px rgba(145, 214, 255, 0.7);
      text-decoration: none;
    }

    .op-btn-primary i { font-size: 0.9rem; }

    .op-btn-outline {
      border-radius: 999px;
      padding: 0.4rem 0.85rem;
      font-size: 0.8rem;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      border: 1px solid rgba(122, 190, 255, 0.96);
      background: rgba(3, 10, 24, 0.98);
      color: var(--op-text-main);
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      cursor: pointer;
      box-shadow:
        0 7px 14px rgba(0, 0, 0, 0.9),
        0 0 12px rgba(110, 190, 255, 0.35);
      transition: 0.16s ease-out;
      text-decoration: none;
    }

    .op-btn-outline:hover {
      border-color: rgba(151, 210, 255, 1);
      transform: translateY(-1px);
      box-shadow:
        0 10px 20px rgba(0, 0, 0, 0.96),
        0 0 18px rgba(148, 206, 255, 0.6);
      text-decoration: none;
    }

    /* Remove sidebar entirely on smaller builds if desired */
    .op-sidebar-wrap { position: sticky; top: 1rem; }
    @media (max-width: 991.98px) { .op-sidebar-wrap { position: static; } }

    /* Compact sidebar: thread info only */
    .op-thread-summary-list {
      list-style: none;
      padding: 0;
      margin: 0;
      font-size: 0.82rem;
      color: var(--op-text-soft);
    }
    .op-thread-summary-list li + li { margin-top: 0.28rem; }