@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css");

@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&display=swap");

/* New Social Reddit Image Viewer — WordPress-scoped */
.nsriv {width: 100vw;
  max-width: none;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: -8px;
--nsriv-ink: #f7f4ef;
  --nsriv-muted: #b8aea3;
  --nsriv-dim: #8a8178;
  --nsriv-panel: rgba(28, 24, 22, 0.88);
  --nsriv-panel-soft: rgba(255, 248, 240, 0.06);
  --nsriv-line: rgba(255, 140, 66, 0.28);
  --nsriv-accent: #ff5c1a;
  --nsriv-accent-deep: #e0450a;
  --nsriv-accent-soft: rgba(255, 92, 26, 0.16);
  --nsriv-cool: #3ecfbf;
  --nsriv-cool-deep: #259e91;
  --nsriv-danger: #ff6b7a;
  --nsriv-success: #3dd68c;
  --nsriv-radius: 18px;
  --nsriv-shadow: 0 18px 42px rgba(8, 4, 2, 0.38);
  --nsriv-font: "Outfit", "Segoe UI", sans-serif;
  --nsriv-gap: 14px;
  --nsriv-pad: 14px;

  box-sizing: border-box !important;
  font-family: var(--nsriv-font);
  color: var(--nsriv-ink);
  line-height: 1.5;
  display: block;
  min-width: 0 !important;
  background:
    radial-gradient(ellipse 70% 48% at 14% 0%, rgba(255, 92, 26, 0.28), transparent 58%),
    radial-gradient(ellipse 55% 40% at 92% 8%, rgba(62, 207, 191, 0.12), transparent 52%),
    linear-gradient(158deg, #14110f 0%, #221a16 42%, #2c1e18 100%);
  position: relative;
  isolation: isolate;
  text-align: left;
  overflow-x: hidden !important;
  overflow-wrap: anywhere;
  word-wrap: break-word;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.nsriv *,
.nsriv *::before,
.nsriv *::after {
  box-sizing: border-box;
}

.nsriv :where(h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, figcaption, label, span) {
  margin: 0;  border: 0;
  font-weight: inherit;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-wrap: break-word;
}

.nsriv h3 { color: var(--nsriv-ink) !important; }
.nsriv h2 { color: var(--nsriv-ink) !important; }
.nsriv :where(ul, ol) {
  list-style: none;
}

.nsriv img,
.nsriv video {
  max-width: 100%;
  height: auto;
  display: block;
  border: 0;
}

.nsriv a {
  color: var(--nsriv-cool);
  text-decoration: none;
}

.nsriv a:hover {
  text-decoration: underline;
}

.nsriv-shell {width: 100%; max-width: min(1200px, 100%); margin-left: auto; margin-right: auto; padding: 65px clamp(8px, 2vw, 16px); min-width: 0; 
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: var(--nsriv-gap);
  min-width: 0;
  container-type: inline-size;
  container-name: nsriv;
}

/* ——— Tool / hero ——— */
.nsriv-hero {
  background: var(--nsriv-panel);
  border: 1px solid var(--nsriv-line);
  border-radius: var(--nsriv-radius);
  box-shadow: var(--nsriv-shadow);
  padding: clamp(18px, 3.5vw, 28px) clamp(14px, 3vw, 22px);
  text-align: center;
  backdrop-filter: blur(14px);
  animation: nsriv-rise 0.45s ease both;
}

.nsriv-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 92, 26, 0.95), rgba(255, 140, 66, 0.75));
  box-shadow:
    0 10px 24px rgba(255, 92, 26, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 1.45rem;
}

.nsriv .nsriv-hero__title {
  font-size: clamp(1.35rem, 5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.2;
  margin: 0 0 8px;
  color: var(--nsriv-ink) !important;
}

.nsriv-hero__mark {
  color: var(--nsriv-accent);
  background-image: linear-gradient(90deg, var(--nsriv-accent), #ff9a4a);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 100% 3px;
  padding-bottom: 2px;
}

.nsriv .nsriv-hero__lead {
  max-width: 36rem;
  margin: 0 auto 20px;
  color: var(--nsriv-muted);
  font-size: clamp(0.9rem, 2.4vw, 1rem);
  line-height: 1.55;
}

.nsriv-tool {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  background: var(--nsriv-panel-soft);
  border: 1px solid rgba(255, 248, 240, 0.08);
  border-radius: 14px;
  padding: clamp(12px, 2.4vw, 16px);
}

.nsriv .nsriv-tool__label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--nsriv-muted);
}

.nsriv-field {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.nsriv .nsriv-field__input {
  width: 100%;
  min-width: 0 !important;
  height: 52px;
  min-height: 52px;
  padding: 0 52px 0 16px !important;
  border: 1px solid rgba(255, 248, 240, 0.12) !important;
  border-radius: 12px;
  background: rgba(10, 8, 7, 0.55) !important;
  color: var(--nsriv-ink) !important;
  font-family: var(--nsriv-font);
  font-size: 16px !important;
  font-weight: 500;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nsriv .nsriv-field__input::placeholder {
  color: var(--nsriv-dim);
}

.nsriv .nsriv-field__input:focus {
  border-color: rgba(255, 92, 26, 0.55) !important;
  background: rgba(10, 8, 7, 0.72) !important;
  box-shadow: 0 0 0 3px var(--nsriv-accent-soft);
}

.nsriv .nsriv-field__paste {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0 !important;
  border-radius: 10px;
  background: transparent !important;
  color: var(--nsriv-muted) !important;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
}

.nsriv .nsriv-field__paste:hover {
  color: var(--nsriv-accent) !important;
  background: var(--nsriv-accent-soft) !important;
}

.nsriv .nsriv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 50px;
  min-height: 50px;
  padding: 0 18px !important;
  border: 0 !important;
  border-radius: 12px;
  font-family: var(--nsriv-font);
  font-size: 0.98rem !important;
  font-weight: 700 !important;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, background 0.2s ease;
  white-space: nowrap;
  user-select: none;
  text-decoration: none;
  appearance: none;
  -webkit-appearance: none;
  touch-action: manipulation;
}

.nsriv .nsriv-btn--primary {
  background: linear-gradient(135deg, var(--nsriv-accent) 0%, #ff7a3d 100%) !important;
  color: #fff !important;
  box-shadow: 0 10px 22px rgba(255, 92, 26, 0.32);
}

.nsriv .nsriv-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(255, 92, 26, 0.4);
}

.nsriv .nsriv-btn--primary:active {
  transform: translateY(0);
  opacity: 0.94;
}

.nsriv .nsriv-btn:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none !important;
}

.nsriv .nsriv-btn--ghost {
  background: rgba(255, 248, 240, 0.06) !important;
  color: var(--nsriv-ink) !important;
  border: 1px solid rgba(255, 248, 240, 0.12) !important;
}

.nsriv .nsriv-btn--ghost:hover {
  background: rgba(255, 248, 240, 0.1) !important;
  transform: translateY(-1px);
}

.nsriv .nsriv-btn--cool {
  background: linear-gradient(135deg, var(--nsriv-cool), var(--nsriv-cool-deep)) !important;
  color: #041716 !important;
}

.nsriv .nsriv-btn i {
  font-size: 0.95em;
}

.nsriv-alert {
  display: none;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.4;
}

.nsriv-alert.is-visible {
  display: flex;
}

.nsriv-alert--error {
  background: rgba(255, 107, 122, 0.12);
  border: 1px solid rgba(255, 107, 122, 0.35);
  color: #ffb4bc;
}

.nsriv-alert--ok {
  background: rgba(61, 214, 140, 0.12);
  border: 1px solid rgba(61, 214, 140, 0.35);
  color: #9aecc0;
}

.nsriv-hint {
  font-size: 0.8rem;
  color: var(--nsriv-dim);
  text-align: center;
}

/* ——— Skeleton ——— */
.nsriv-skeleton {
  display: none;
  background: var(--nsriv-panel);
  border: 1px solid var(--nsriv-line);
  border-radius: var(--nsriv-radius);
  padding: var(--nsriv-pad);
  box-shadow: var(--nsriv-shadow);
}

.nsriv-skeleton.is-active {
  display: block;
  animation: nsriv-rise 0.35s ease both;
}

.nsriv-sk {
  background: linear-gradient(
    90deg,
    rgba(255, 248, 240, 0.06) 0%,
    rgba(255, 140, 66, 0.14) 50%,
    rgba(255, 248, 240, 0.06) 100%
  );
  background-size: 200% 100%;
  animation: nsriv-shimmer 1.2s ease infinite;
  border-radius: 10px;
}

.nsriv-skeleton__preview {
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 280px;
  margin-bottom: 14px;
}

.nsriv-skeleton__line {
  height: 14px;
  margin-bottom: 10px;
}

.nsriv-skeleton__line--lg { width: 72%; }
.nsriv-skeleton__line--md { width: 48%; }
.nsriv-skeleton__line--sm { width: 32%; height: 12px; }

/* ——— Result ——— */
.nsriv-result {
  display: none;
  animation: nsriv-rise 0.45s ease both;
}

.nsriv-result.is-visible {
  display: block;
}

.nsriv-panel {
  background: var(--nsriv-panel);
  border: 1px solid var(--nsriv-line);
  border-radius: var(--nsriv-radius);
  box-shadow: var(--nsriv-shadow);
  padding: clamp(14px, 3vw, 20px);
  backdrop-filter: blur(14px);
}

.nsriv-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.nsriv .nsriv-meta__title {
  font-size: clamp(1.05rem, 3.2vw, 1.35rem);
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--nsriv-ink) !important;
}

.nsriv-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nsriv-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 248, 240, 0.06);
  border: 1px solid rgba(255, 248, 240, 0.1);
  color: var(--nsriv-muted);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
}

.nsriv-chip i {
  color: var(--nsriv-accent);
  font-size: 0.85em;
}

.nsriv-chip--type {
  background: var(--nsriv-accent-soft);
  border-color: rgba(255, 92, 26, 0.35);
  color: #ffc4a8;
}

.nsriv-featured {
  position: relative;
  margin-bottom: 16px;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 248, 240, 0.08);
  min-height: 180px;
}

.nsriv-featured__media {
  width: 100%;
  max-height: min(62vh, 520px);
  object-fit: contain;
  margin-left: auto; margin-right: auto;
  background: #0a0807;
  cursor: zoom-in;
}

.nsriv-featured__media--video {
  cursor: default;
}

.nsriv-featured__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  background: linear-gradient(180deg, transparent, rgba(8, 4, 2, 0.85));
}

.nsriv-featured__actions .nsriv-btn {
  flex: 1 1 140px;
  height: 44px;
  min-height: 44px;
  font-size: 0.9rem !important;
}

.nsriv-section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--nsriv-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nsriv-section-label span {
  color: var(--nsriv-dim);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

.nsriv-media-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@container nsriv (min-width: 560px) {
  .nsriv-media-list {
    grid-template-columns: 1fr 1fr;
  }
}

.nsriv-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 248, 240, 0.04);
  border: 1px solid rgba(255, 248, 240, 0.08);
  min-width: 0;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.nsriv-card:hover {
  border-color: rgba(255, 92, 26, 0.35);
  transform: translateY(-1px);
}

.nsriv-card__thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 10px;
  background: #0a0807;
  cursor: zoom-in;
}

.nsriv-card__thumb--video {
  object-fit: contain;
  background: #000;
  cursor: default;
}

.nsriv-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.nsriv-card__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.nsriv-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nsriv-card__actions .nsriv-btn {
  flex: 1 1 auto;
  height: 40px;
  min-height: 40px;
  font-size: 0.84rem !important;
}

.nsriv-empty {
  display: none;
  text-align: center;
  padding: 28px 16px;
  color: var(--nsriv-muted);
}

.nsriv-empty.is-visible {
  display: block;
}

.nsriv-empty i {
  display: block;
  font-size: 2rem;
  margin: 0 auto 10px;
  opacity: 0.45;
  color: var(--nsriv-accent);
}

.nsriv-empty p {
  max-width: 34ch;
  margin-left: auto; margin-right: auto;
  font-size: 0.92rem;
  line-height: 1.55;
}

/* ——— Modal ——— */
.nsriv-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6, 4, 3, 0.86);
  backdrop-filter: blur(8px);
}

.nsriv-modal.is-open {
  display: flex;
  animation: nsriv-fade 0.2s ease both;
}

.nsriv-modal__dialog {
  position: relative;
  max-width: min(960px, 100%);
  max-height: 90vh;
  overflow: auto;
}

.nsriv-modal__media {
  max-height: 82vh;
  width: auto;
  margin-left: auto; margin-right: auto;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.nsriv .nsriv-modal__close {
  position: absolute;
  top: -8px;
  right: -8px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0 !important;
  border-radius: 999px;
  background: rgba(20, 16, 14, 0.92) !important;
  color: #fff !important;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

@keyframes nsriv-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes nsriv-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes nsriv-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

@media (max-width: 480px) {
  .nsriv-featured__actions .nsriv-btn,
  .nsriv-card__actions .nsriv-btn {
    flex: 1 1 100%;
  }
}

/* --- Codex CSS updates --- */
/* New Social Reddit Image Viewer — WordPress-scoped */
.nsriv {
  width: 100vw;
  max-width: none;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: -8px;
  --nsriv-ink: #fbfbfd;
  --nsriv-muted: #c7cbd6;
  --nsriv-dim: #8e95a6;
  --nsriv-panel: rgba(18, 22, 34, 0.82);
  --nsriv-panel-soft: rgba(255, 255, 255, 0.075);
  --nsriv-line: rgba(255, 255, 255, 0.14);
  --nsriv-accent: #ff4f87;
  --nsriv-accent-deep: #7c3aed;
  --nsriv-accent-soft: rgba(255, 79, 135, 0.16);
  --nsriv-cool: #33d6c2;
  --nsriv-cool-deep: #0f9f90;
  --nsriv-danger: #ff6b7a;
  --nsriv-success: #38d996;
  --nsriv-radius: 20px;
  --nsriv-shadow: 0 24px 70px rgba(4, 8, 22, 0.44);
  --nsriv-font: "Outfit", "Segoe UI", Arial, sans-serif;
  --nsriv-gap: 16px;
  --nsriv-pad: 16px;

  box-sizing: border-box !important;
  font-family: var(--nsriv-font);
  color: var(--nsriv-ink);
  line-height: 1.5;
  display: block;
  min-width: 0 !important;
  background:
    radial-gradient(ellipse 70% 44% at 12% -4%, rgba(255, 79, 135, 0.28), transparent 58%),
    radial-gradient(ellipse 58% 42% at 92% 5%, rgba(51, 214, 194, 0.18), transparent 54%),
    radial-gradient(ellipse 45% 36% at 48% 100%, rgba(124, 58, 237, 0.22), transparent 58%),
    linear-gradient(145deg, #0b1020 0%, #141827 48%, #171021 100%);
  position: relative;
  isolation: isolate;
  text-align: left;
  overflow-x: hidden !important;
  overflow-wrap: anywhere;
  word-wrap: break-word;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.nsriv *,
.nsriv *::before,
.nsriv *::after {
  box-sizing: border-box;
}

.nsriv :where(h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, figcaption, label, span) {
  margin: 0;
  border: 0;
  font-weight: inherit;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-wrap: break-word;
}

.nsriv h3 {
  color: var(--nsriv-ink) !important;
}

.nsriv h2 {
  color: var(--nsriv-ink) !important;
}

.nsriv :where(ul, ol) {
  list-style: none;
}

.nsriv img,
.nsriv video {
  max-width: 100%;
  height: auto;
  display: block;
  border: 0;
}

.nsriv a {
  color: var(--nsriv-cool);
  text-decoration: none;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.nsriv a:hover {
  color: #74efe2;
  text-decoration: underline;
}

.nsriv .fa-solid,
.nsriv .fa-regular,
.nsriv .fa-brands,
.nsriv .fa-clipboard,
.nsriv .fa-image,
.nsriv .fa-magnifying-glass,
.nsriv .fa-reddit-alien,
.nsriv .fa-xmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  min-width: 1em;
  height: 1em;
  font-style: normal;
  font-variant: normal;
  line-height: 1;
  text-rendering: auto;
}

.nsriv .fa-solid,
.nsriv .fa-regular {
  font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", Arial, sans-serif;
  font-weight: 900;
}

.nsriv .fa-brands {
  font-family: "Font Awesome 6 Brands", "Font Awesome 5 Brands", Arial, sans-serif;
  font-weight: 400;
}

.nsriv .fa-clipboard::before {
  content: "\f328";
}

.nsriv .fa-image::before {
  content: "\f03e";
}

.nsriv .fa-magnifying-glass::before {
  content: "\f002";
}

.nsriv .fa-reddit-alien::before {
  content: "\f281";
}

.nsriv .fa-xmark::before {
  content: "\f00d";
}

.nsriv-shell {
  width: 100%;
  max-width: min(1180px, 100%);
  margin-left: auto;
  margin-right: auto;
  padding: clamp(28px, 6vw, 64px) clamp(14px, 3vw, 22px);
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: var(--nsriv-gap);
  min-width: 0;
  container-type: inline-size;
  container-name: nsriv;
}

/* ——— Tool / hero ——— */
.nsriv-hero {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.045)),
    var(--nsriv-panel);
  border: 1px solid var(--nsriv-line);
  border-radius: var(--nsriv-radius);
  box-shadow: var(--nsriv-shadow);
  padding: clamp(18px, 4vw, 34px);
  text-align: center;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: nsriv-rise 0.45s ease both;
}

.nsriv-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 79, 135, 0.98), rgba(124, 58, 237, 0.88) 55%, rgba(51, 214, 194, 0.82));
  box-shadow:
    0 16px 34px rgba(255, 79, 135, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
  color: #fff;
  font-size: 1.35rem;
}

.nsriv .nsriv-hero__title {
  font-size: clamp(1.55rem, 3.2vw, 2.15rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.18;
  margin: 0 0 10px;
  color: var(--nsriv-ink) !important;
  text-transform: capitalize !important;
}

.nsriv-hero__mark {
  color: #fff;
  background-image: linear-gradient(90deg, var(--nsriv-accent), var(--nsriv-cool));
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 100% 3px;
  padding-bottom: 3px;
}

.nsriv .nsriv-hero__lead {
  max-width: 42rem;
  margin: 0 auto 22px;
  color: var(--nsriv-muted);
  font-size: clamp(0.95rem, 1.8vw, 1.05rem);
  line-height: 1.6;
  text-transform: capitalize !important;
}

.nsriv-tool {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.045)),
    var(--nsriv-panel-soft);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: clamp(14px, 2.4vw, 18px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.nsriv .nsriv-tool__label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--nsriv-muted);
}

.nsriv-field {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 760px;
  min-width: 0;
  margin-left: auto;
  margin-right: auto;
}

.nsriv .nsriv-field__input {
  width: 100%;
  max-width: 100%;
  min-width: 0 !important;
  height: 54px !important;
  min-height: 54px !important;
  max-height: 58px !important;
  padding: 0 54px 0 18px !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 14px;
  background: rgba(8, 12, 24, 0.72) !important;
  color: var(--nsriv-ink) !important;
  font-family: var(--nsriv-font);
  font-size: 16px !important;
  font-weight: 600;
  line-height: 54px !important;
  outline: none;
  resize: none;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 24px rgba(0, 0, 0, 0.16);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nsriv .nsriv-field__input::placeholder {
  color: var(--nsriv-dim);
}

.nsriv .nsriv-field__input:focus {
  border-color: rgba(51, 214, 194, 0.7) !important;
  background: rgba(8, 12, 24, 0.86) !important;
  box-shadow:
    0 0 0 4px rgba(51, 214, 194, 0.14),
    0 14px 30px rgba(0, 0, 0, 0.2);
}

.nsriv .nsriv-field__paste {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0 !important;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06) !important;
  color: var(--nsriv-muted) !important;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
}

.nsriv .nsriv-field__paste:hover {
  color: #fff !important;
  background: linear-gradient(135deg, rgba(255, 79, 135, 0.22), rgba(51, 214, 194, 0.18)) !important;
  transform: translateY(-50%) scale(1.03);
}

.nsriv .nsriv-field__paste:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(51, 214, 194, 0.22);
}

.nsriv .nsriv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  max-width: 760px;
  height: 50px;
  min-height: 50px;
  padding: 0 18px !important;
  border: 0 !important;
  border-radius: 14px;
  font-family: var(--nsriv-font);
  font-size: 0.96rem !important;
  font-weight: 800 !important;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
  user-select: none;
  text-decoration: none;
  appearance: none;
  -webkit-appearance: none;
  touch-action: manipulation;
  margin-left: auto;
  margin-right: auto;
}

.nsriv .nsriv-btn--primary {
  background: linear-gradient(135deg, var(--nsriv-accent) 0%, var(--nsriv-accent-deep) 58%, #2563eb 100%) !important;
  color: #fff !important;
  box-shadow:
    0 16px 34px rgba(124, 58, 237, 0.28),
    0 8px 22px rgba(255, 79, 135, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.nsriv .nsriv-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 20px 42px rgba(124, 58, 237, 0.34),
    0 12px 28px rgba(255, 79, 135, 0.26);
}

.nsriv .nsriv-btn--primary:active {
  transform: translateY(0);
  opacity: 0.96;
}

.nsriv .nsriv-btn:focus-visible {
  outline: 0;
  box-shadow:
    0 0 0 4px rgba(51, 214, 194, 0.18),
    0 16px 34px rgba(124, 58, 237, 0.28);
}

.nsriv .nsriv-btn:disabled {
  opacity: 0.58;
  cursor: wait;
  transform: none !important;
}

.nsriv .nsriv-btn--ghost {
  background: rgba(255, 255, 255, 0.075) !important;
  color: var(--nsriv-ink) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.nsriv .nsriv-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.115) !important;
  border-color: rgba(51, 214, 194, 0.28) !important;
  transform: translateY(-1px);
}

.nsriv .nsriv-btn--cool {
  background: linear-gradient(135deg, var(--nsriv-cool), var(--nsriv-cool-deep)) !important;
  color: #041716 !important;
  box-shadow: 0 14px 28px rgba(51, 214, 194, 0.24);
}

.nsriv .nsriv-btn i {
  font-size: 0.95em;
}

.nsriv-alert {
  display: none;
  align-items: flex-start;
  gap: 9px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.45;
}

.nsriv-alert.is-visible {
  display: flex;
}

.nsriv-alert--error {
  background: rgba(255, 107, 122, 0.14);
  border: 1px solid rgba(255, 107, 122, 0.38);
  color: #ffc2c8;
  box-shadow: 0 12px 24px rgba(255, 107, 122, 0.08);
}

.nsriv-alert--ok {
  background: rgba(56, 217, 150, 0.14);
  border: 1px solid rgba(56, 217, 150, 0.38);
  color: #aaf4d0;
  box-shadow: 0 12px 24px rgba(56, 217, 150, 0.08);
}

.nsriv-hint {
  font-size: 0.82rem;
  color: var(--nsriv-dim);
  text-align: center;
}

/* ——— Skeleton ——— */
.nsriv-skeleton {
  display: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04)),
    var(--nsriv-panel);
  border: 1px solid var(--nsriv-line);
  border-radius: var(--nsriv-radius);
  padding: var(--nsriv-pad);
  box-shadow: var(--nsriv-shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.nsriv-skeleton.is-active {
  display: block;
  animation: nsriv-rise 0.35s ease both;
}

.nsriv-sk {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.065) 0%,
    rgba(51, 214, 194, 0.14) 38%,
    rgba(255, 79, 135, 0.14) 56%,
    rgba(255, 255, 255, 0.065) 100%
  );
  background-size: 220% 100%;
  animation: nsriv-shimmer 1.15s ease infinite;
  border-radius: 12px;
}

.nsriv-skeleton__preview {
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 280px;
  margin-bottom: 14px;
}

.nsriv-skeleton__line {
  height: 14px;
  margin-bottom: 10px;
}

.nsriv-skeleton__line--lg {
  width: 72%;
}

.nsriv-skeleton__line--md {
  width: 48%;
}

.nsriv-skeleton__line--sm {
  width: 32%;
  height: 12px;
}

/* ——— Result ——— */
.nsriv-result {
  display: none;
  animation: nsriv-rise 0.45s ease both;
}

.nsriv-result.is-visible {
  display: block;
}

.nsriv-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.04)),
    var(--nsriv-panel);
  border: 1px solid var(--nsriv-line);
  border-radius: var(--nsriv-radius);
  box-shadow: var(--nsriv-shadow);
  padding: clamp(15px, 3vw, 22px);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.nsriv-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.nsriv .nsriv-meta__title {
  font-size: clamp(1.08rem, 2.6vw, 1.35rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.32;
  color: var(--nsriv-ink) !important;
  text-transform: capitalize !important;
}

.nsriv-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nsriv-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--nsriv-muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
}

.nsriv-chip i {
  color: var(--nsriv-cool);
  font-size: 0.85em;
}

.nsriv-chip--type {
  background: linear-gradient(135deg, rgba(255, 79, 135, 0.2), rgba(124, 58, 237, 0.16));
  border-color: rgba(255, 79, 135, 0.36);
  color: #ffd3df;
}

.nsriv-featured {
  position: relative;
  margin-bottom: 16px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(3, 7, 18, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.11);
  min-height: 180px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nsriv-featured__media {
  width: 100%;
  max-height: min(62vh, 520px);
  object-fit: contain;
  margin-left: auto;
  margin-right: auto;
  background: #060914;
  cursor: zoom-in;
}

.nsriv-featured__media--video {
  cursor: default;
}

.nsriv-featured__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px;
  background: linear-gradient(180deg, transparent, rgba(3, 7, 18, 0.9));
}

.nsriv-featured__actions .nsriv-btn {
  flex: 1 1 140px;
  height: 44px;
  min-height: 44px;
  font-size: 0.9rem !important;
}

.nsriv-section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--nsriv-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nsriv-section-label span {
  color: var(--nsriv-dim);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}

.nsriv-media-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@container nsriv (min-width: 560px) {
  .nsriv-media-list {
    grid-template-columns: 1fr 1fr;
  }
}

.nsriv-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.105);
  min-width: 0;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.nsriv-card:hover {
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(51, 214, 194, 0.34);
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
}

.nsriv-card__thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 13px;
  background: #060914;
  cursor: zoom-in;
}

.nsriv-card__thumb--video {
  object-fit: contain;
  background: #000;
  cursor: default;
}

.nsriv-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.nsriv-card__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.nsriv-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nsriv-card__actions .nsriv-btn {
  flex: 1 1 auto;
  height: 42px;
  min-height: 42px;
  font-size: 0.86rem !important;
}

.nsriv-empty {
  display: none;
  text-align: center;
  padding: 30px 16px;
  color: var(--nsriv-muted);
}

.nsriv-empty.is-visible {
  display: block;
}

.nsriv-empty i {
  display: block;
  font-size: 2rem;
  margin: 0 auto 10px;
  opacity: 0.7;
  color: var(--nsriv-cool);
}

.nsriv-empty p {
  max-width: 34ch;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.94rem;
  line-height: 1.58;
}

/* ——— Modal ——— */
.nsriv-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(3, 7, 18, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.nsriv-modal.is-open {
  display: flex;
  animation: nsriv-fade 0.2s ease both;
}

.nsriv-modal__dialog {
  position: relative;
  max-width: min(960px, 100%);
  max-height: 90vh;
  overflow: auto;
}

.nsriv-modal__media {
  max-height: 82vh;
  width: auto;
  margin-left: auto;
  margin-right: auto;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.56);
}

.nsriv .nsriv-modal__close {
  position: absolute;
  top: -8px;
  right: -8px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 0 !important;
  border-radius: 999px;
  background: rgba(18, 22, 34, 0.94) !important;
  color: #fff !important;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.42);
  transition: transform 0.2s ease, background 0.2s ease;
}

.nsriv .nsriv-modal__close:hover {
  background: linear-gradient(135deg, var(--nsriv-accent), var(--nsriv-accent-deep)) !important;
  transform: scale(1.04);
}

@keyframes nsriv-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes nsriv-fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes nsriv-shimmer {
  0% {
    background-position: 100% 0;
  }

  100% {
    background-position: -100% 0;
  }
}

@media (max-width: 768px) {
  .nsriv {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .nsriv-shell {
    padding: 28px 14px;
    gap: 14px;
  }

  .nsriv-hero {
    padding: 20px 14px;
    border-radius: 18px;
  }

  .nsriv-brand {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    font-size: 1.2rem;
  }

  .nsriv .nsriv-hero__title {
    font-size: clamp(1.35rem, 6vw, 1.7rem);
    line-height: 1.22;
  }

  .nsriv .nsriv-hero__lead {
    font-size: 0.95rem;
    margin-bottom: 18px;
  }

  .nsriv-tool {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 11px;
    padding: 14px;
  }

  .nsriv-field,
  .nsriv .nsriv-btn {
    width: 100%;
    max-width: 100%;
  }

  .nsriv .nsriv-field__input {
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    line-height: 52px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  .nsriv-panel,
  .nsriv-skeleton {
    border-radius: 18px;
    padding: 14px;
  }

  .nsriv-featured__actions,
  .nsriv-card__actions {
    flex-direction: column;
  }

  .nsriv-featured__actions .nsriv-btn,
  .nsriv-card__actions .nsriv-btn {
    width: 100%;
    max-width: 100%;
    flex: 0 0 auto;
  }

  .nsriv-section-label {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

@media (max-width: 480px) {
  .nsriv-shell {
    padding: 22px 10px;
  }

  .nsriv-hero {
    padding: 18px 12px;
  }

  .nsriv .nsriv-hero__title {
    font-size: 1.35rem;
  }

  .nsriv .nsriv-hero__lead {
    font-size: 0.92rem;
  }

  .nsriv-tool {
    padding: 12px;
  }

  .nsriv .nsriv-btn {
    height: 48px;
    min-height: 48px;
    font-size: 0.92rem !important;
  }

  .nsriv-featured__actions .nsriv-btn,
  .nsriv-card__actions .nsriv-btn {
    flex: 1 1 100%;
  }

  .nsriv-featured {
    min-height: 150px;
  }

  .nsriv-modal {
    padding: 12px;
  }

  .nsriv .nsriv-modal__close {
    top: 8px;
    right: 8px;
  }
}