:root {
  --bg: #0e0e0f;
  --panel: #151517;
  --border: #26262a;
  --text: #e6e6e6;
  --muted: #9a9a9a;
  --accent: #3b82f6;
}
/* =========================
   THEMES
   ========================= */

/* 💜 NEON */
[data-theme="neon"] {
  --bg: #0a0014;
  --panel: #140028;
  --border: #3b0764;
  --text: #f5d0fe;
  --muted: #c084fc;
  --accent: #e879f9;
}

/* 🌿 MATRIX / HACKER */
[data-theme="matrix"] {
  --bg: #000000;
  --panel: #020202;
  --border: #003300;
  --text: #00ff9c;
  --muted: #00aa66;
  --accent: #00ff9c;
}

/* 🔥 SOLARIZED DARK */
[data-theme="solar"] {
  --bg: #002b36;
  --panel: #073642;
  --border: #586e75;
  --text: #eee8d5;
  --muted: #93a1a1;
  --accent: #b58900;
}

/* =========================
   RESET + BASE
   ========================= */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
}

/* =========================
   NAVBAR
   ========================= */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #0b0b0c;
  border-bottom: 1px solid var(--border);
  padding: 10px 18px;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-left,
.nav-right {
  display: flex;
  gap: 14px;
  align-items: center;
}

.nav-item {
  color: var(--text);
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-item:hover {
  background: var(--panel);
}

.icon {
  font-size: 15px;
}

/* =========================
   CONTAINER
   ========================= */
.container {
  max-width: 1100px;
  margin: auto;
  padding: 20px;
}

/* =========================
   GRID LAYOUT
   ========================= */
.grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 24px;
  align-items: start;
}

/* =========================
   LEFT (EDITOR)
   ========================= */
.left textarea {
  width: 100%;
  min-height: 320px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 14px;
  resize: vertical;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px var(--border);
}

/* =========================
   RIGHT (SIDEBAR)
   ========================= */
.right {
  background: linear-gradient(180deg, #161618, #121214);
  border: 1px solid var(--border);
  padding: 14px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}
/* =========================
   ANIMATED SIDEBAR BORDER
   ========================= */
.right {
  position: relative;
  overflow: hidden;
}

.right::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
  padding: 1px;
  background: linear-gradient(
    120deg,
    transparent,
    var(--accent),
    transparent
  );
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  animation: borderFlow 8s linear infinite;
  pointer-events: none;
}

@keyframes borderFlow {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

/* =========================
   FORM ELEMENTS
   ========================= */
input[type="text"],
textarea,
select {
  width: 100%;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 8px 10px;
  border-radius: 6px;
}

button {
  background: var(--accent);
  border: none;
  color: #fff;
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 8px;
}

button.secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
/* =========================
   ANIMATED DARK BACKGROUND
   ========================= */
body {
  background:
    radial-gradient(1200px 800px at 10% 10%, rgba(59,130,246,0.08), transparent),
    radial-gradient(1000px 700px at 90% 20%, rgba(168,85,247,0.08), transparent),
    radial-gradient(900px 600px at 50% 90%, rgba(34,197,94,0.06), transparent),
    var(--bg);
  animation: bgFloat 18s ease-in-out infinite alternate;
}

@keyframes bgFloat {
  0% {
    background-position:
      0% 0%,
      100% 0%,
      50% 100%;
  }
  100% {
    background-position:
      10% 20%,
      90% 10%,
      40% 80%;
  }
}

/* =========================
   OPTIONS ROW
   ========================= */
.options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 12px 0 18px;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

/* =========================
   SEARCH
   ========================= */
.search-form {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
}

.search-form input {
  flex: 1;
}

/* =========================
   LATEST LIST
   ========================= */
.latest li {
  list-style: none;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

/* =========================
   PASTE VIEW
   ========================= */
.paste-box {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: 6px;
  overflow-x: auto;
}

.meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}

/* Links inside paste */
.paste-box a {
  color: var(--accent);
  text-decoration: underline;
  word-break: break-all;
}

.paste-box a:hover {
  opacity: 0.85;
}

/* Inline code */
code {
  background: #111;
  padding: 2px 6px;
  border-radius: 4px;
}

/* =========================
   IMAGE PREVIEW
   ========================= */
.img-preview {
  margin: 10px 0;
}

.img-preview img {
  max-width: 100%;
  border-radius: 6px;
  border: 1px solid var(--border);
}

/* =========================
   YOUTUBE EMBED (FIXED)
   ========================= */
.yt {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 12px 0;
}

.yt iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 6px;
}

/* =========================
   CODE BLOCK SAFETY
   ========================= */
.paste-box pre {
  white-space: pre-wrap;
  word-break: break-word;
}
.latest li.pinned a {
  color: #facc15;
  font-weight: bold;
}
.rainbow-link {
  font-weight: 600;
  text-decoration: none;
}

.rainbow-link span {
  display: inline-block;
  animation: glow 2.5s infinite alternate;
}

@keyframes glow {
  from {
    text-shadow:
      0 0 3px currentColor,
      0 0 6px currentColor;
  }
  to {
    text-shadow:
      0 0 6px currentColor,
      0 0 12px currentColor;
  }
}
.pagination {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.pagination a {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.pagination a:hover {
  background: var(--panel);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

.container,
.navbar {
  position: relative;
  z-index: 1;
}

/* =========================
   FLOATING GLOW — PINNED PASTES
   ========================= */
.latest li.pinned {
  position: relative;
  padding-left: 4px;
  z-index: 1;
}

.latest li.pinned::before {
  content: "";
  position: absolute;
  inset: -6px -8px;
  background:
    radial-gradient(
      120px 40px at 10% 50%,
      color-mix(in srgb, var(--accent) 35%, transparent),
      transparent 70%
    );
  filter: blur(14px);
  opacity: 0.7;
  z-index: -1;
  animation: pinnedGlow 6s ease-in-out infinite alternate;
  border-radius: 8px;
  pointer-events: none;
}

@keyframes pinnedGlow {
  0% {
    transform: translateY(0px);
    opacity: 0.55;
  }
  100% {
    transform: translateY(-4px);
    opacity: 0.9;
  }
}
@media (prefers-reduced-motion: reduce) {
  .latest li.pinned::before,
  .right::before {
    animation: none;
  }
}

/* =========================
   MOBILE
   ========================= */
@media (max-width: 768px) {

  body {
    font-size: 14px;
  }

  .container {
    padding: 12px;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .left textarea {
    min-height: 220px;
  }

  .left {
    order: 1;
  }

  .right {
    order: 2;
  }

  .search-form {
    flex-direction: column;
  }

  .search-form button,
  button,
  select {
    width: 100%;
  }

  .options {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .navbar {
    flex-wrap: wrap;
    gap: 8px;
  }

  .nav-right {
    width: 100%;
    justify-content: space-between;
  }
}
