:root {
  color-scheme: dark;
  --mag-page: #0d1117;
  --mag-card: rgba(22, 29, 40, 0.72);
  --mag-panel: rgba(22, 29, 40, 0.88);
  --mag-tint: rgba(255, 77, 157, 0.1);
  --mag-line: rgba(148, 176, 204, 0.14);
  --mag-line-strong: rgba(148, 176, 204, 0.26);
  --mag-ink: #eaf6ff;
  --mag-body: #c9d7e6;
  --mag-sub: #8fa3b8;
  --mag-muted: #6d7f94;
  --mag-accent: #ff4d9d;
  --mag-accent-hover: #ff7ab5;
  --mag-accent-deep: #e03585;
  --mag-chip: #1b2433;
  --mag-chip-hover: #243044;
  --mag-accent-ink: #0d1117;
  --neon-cyan: #22d3ee;
  --neon-pink: #ff4d9d;
  --mag-serif: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --mag-sans: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
}

body {
  font-family: var(--mag-sans);
  background:
    radial-gradient(90rem 50rem at 18% -12%, rgba(34, 211, 238, 0.05), rgba(13, 17, 23, 0) 60%),
    radial-gradient(80rem 46rem at 88% 112%, rgba(255, 77, 157, 0.06), rgba(13, 17, 23, 0) 58%),
    #7f25b3;
  min-height: 100vh;
  color: var(--mag-body);
  overflow-x: hidden;
}

::selection {
  background: #ff4d9d;
  color: #0d1117;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0d1117; }
::-webkit-scrollbar-thumb {
  background: #2a3547;
  border-radius: 999px;
  border: 2px solid #0d1117;
}
::-webkit-scrollbar-thumb:hover { background: #3a4a61; }

.bg-dark-bg { background-color: rgb(13 17 23 / var(--tw-bg-opacity, 1)); }
.bg-card-bg {
  background-color: rgb(22 29 40 / calc(var(--tw-bg-opacity, 1) * 0.72));
  box-shadow: inset 0 0 0 1px rgba(148, 176, 204, 0.12);
}

.bg-primary { background-color: rgb(255 77 157 / var(--tw-bg-opacity, 1)); }
.bg-primary-dark { background-color: rgb(224 53 133 / var(--tw-bg-opacity, 1)); }
.hover\:bg-primary:hover { background-color: rgb(255 122 181 / var(--tw-bg-opacity, 1)); }
.hover\:bg-primary-dark:hover { background-color: rgb(255 77 157 / var(--tw-bg-opacity, 1)); }
.hover\:bg-rose-500:hover { background-color: rgb(255 122 181 / var(--tw-bg-opacity, 1)); }
.text-primary { color: rgb(255 122 181 / var(--tw-text-opacity, 1)); }
.hover\:text-primary:hover { color: rgb(255 122 181 / var(--tw-text-opacity, 1)); }
.focus\:ring-primary:focus { --tw-ring-color: rgb(255 77 157 / var(--tw-ring-opacity, 1)); }

.text-secondary { color: rgb(143 163 184 / var(--tw-text-opacity, 1)); }

.bg-gray-800 {
  background-color: rgb(22 29 40 / calc(var(--tw-bg-opacity, 1) * 0.72));
  box-shadow: inset 0 0 0 1px rgba(148, 176, 204, 0.12);
}
.bg-slate-700 { background-color: rgb(22 29 40 / calc(var(--tw-bg-opacity, 1) * 0.88)); }
.bg-slate-800 { background-color: rgb(22 29 40 / calc(var(--tw-bg-opacity, 1) * 0.88)); }

.bg-gray-600 { background-color: rgb(27 36 51 / var(--tw-bg-opacity, 1)); }
.bg-gray-700 { background-color: rgb(27 36 51 / var(--tw-bg-opacity, 1)); }
.hover\:bg-gray-700:hover { background-color: rgb(36 48 68 / var(--tw-bg-opacity, 1)); }
.hover\:bg-slate-600:hover { background-color: rgb(36 48 68 / var(--tw-bg-opacity, 1)); }

.bg-rose-600 { background-color: rgb(255 77 157 / var(--tw-bg-opacity, 1)); }
.hover\:bg-rose-700:hover { background-color: rgb(255 122 181 / var(--tw-bg-opacity, 1)); }
.bg-cyan-600 { background-color: rgb(27 36 51 / var(--tw-bg-opacity, 1)); }
.hover\:bg-cyan-700:hover { background-color: rgb(36 48 68 / var(--tw-bg-opacity, 1)); }

.border-gray-700 { border-color: rgb(148 176 204 / 0.14); }
.border-slate-700 { border-color: rgb(148 176 204 / 0.14); }

.text-gray-200 { color: rgb(201 215 230 / var(--tw-text-opacity, 1)); }
.text-gray-300 { color: rgb(169 188 205 / var(--tw-text-opacity, 1)); }
.text-gray-400 { color: rgb(143 163 184 / var(--tw-text-opacity, 1)); }
.text-gray-500 { color: rgb(109 127 148 / var(--tw-text-opacity, 1)); }
.text-slate-400 { color: rgb(143 163 184 / var(--tw-text-opacity, 1)); }
.hover\:text-gray-200:hover { color: rgb(234 246 255 / var(--tw-text-opacity, 1)); }
.hover\:text-white:hover { color: rgb(244 250 255 / var(--tw-text-opacity, 1)); }

h1.text-white:not(.truncate),
h2.text-white:not(.truncate),
h3.text-white:not(.truncate),
h4.text-white:not(.truncate) { color: rgb(244 250 255 / var(--tw-text-opacity, 1)); }

.bg-gray-800.text-white,
.bg-slate-800.text-white,
.bg-slate-700.text-white {
  background-color: var(--mag-chip);
  color: #eaf6ff;
}

.bg-card-bg.text-white {
  color: rgb(234 246 255 / var(--tw-text-opacity, 1));
  box-shadow: inset 0 0 0 1px rgba(148, 176, 204, 0.18);
}

.bg-primary.text-white,
.bg-rose-600.text-white {
  background-image: linear-gradient(135deg, #ff4d9d, #22d3ee);
  color: #0d1117;
}

.from-slate-800 {
  --tw-gradient-from: rgba(13, 17, 23, 0.94) var(--tw-gradient-from-position);
  --tw-gradient-to: rgba(13, 17, 23, 0) var(--tw-gradient-to-position);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}
.to-slate-900 { --tw-gradient-to: rgba(13, 17, 23, 0.55) var(--tw-gradient-to-position); }


.navbar {
  background: linear-gradient(180deg, #141b26 0%, #0f151e 100%);
  border-bottom: 2px solid rgba(255, 77, 157, 0.85);
  box-shadow: 0 10px 32px -12px rgba(0, 0, 0, 0.7), 0 4px 18px -4px rgba(255, 77, 157, 0.28);
  padding: 0.2rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
}

.navbar::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 2px;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0) 0%, rgba(34, 211, 238, 0.7) 18%, rgba(34, 211, 238, 0.7) 82%, rgba(34, 211, 238, 0) 100%);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.45);
  pointer-events: none;
}

@media (min-width: 768px) {
  .navbar { padding: 0.2rem 1.5rem; }
}

.navbar-brand { display: flex; align-items: center; }
.navbar-brand a { text-decoration: none; color: inherit; }

.navbar-title {
  font-family: var(--mag-serif);
  font-size: 1.125rem;
  font-weight: 700;
  color: #ffe9f3;
  letter-spacing: 0.04em;
  text-shadow: 0 0 7px rgba(255, 77, 157, 0.75), 0 0 22px rgba(255, 77, 157, 0.4), 0 0 48px rgba(255, 77, 157, 0.18);
}

@media (min-width: 768px) {
  .navbar-title { font-size: 1.25rem; }
}

.magazine-brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-right: 0.625rem;
  border-radius: 9999px;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.45);
  color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.25), inset 0 0 6px rgba(34, 211, 238, 0.12);
  font-size: 1rem;
}

.navbar-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  max-width: 1152px;
  margin: 0.75rem auto 0;
  padding: 0.5rem 1rem 0.75rem;
  background: transparent;
}

@media (min-width: 768px) {
  .navbar-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; padding: 0.5rem 1.5rem 0.75rem; }
}

.navbar-nav a {
  color: var(--mag-body);
  background-color: #18212f;
  border: 1px solid rgba(148, 176, 204, 0.2);
  padding: 0.45rem 0.25rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(234, 246, 255, 0.05), 0 2px 6px -2px rgba(0, 0, 0, 0.5);
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

@media (min-width: 768px) {
  .navbar-nav a { padding: 0.5rem 1rem; font-size: 0.875rem; }
}

.navbar-nav a:hover {
  color: #ffd7e8;
  background-color: rgba(255, 77, 157, 0.12);
  border-color: rgba(255, 77, 157, 0.65);
  box-shadow: 0 0 14px rgba(255, 77, 157, 0.28), inset 0 1px 0 rgba(234, 246, 255, 0.05);
}

.navbar-nav a.active {
  color: #ff4d9d;
  background-color: rgba(255, 77, 157, 0.1);
  border-color: rgba(255, 77, 157, 0.85);
  font-weight: 700;
  text-shadow: 0 0 8px rgba(255, 77, 157, 0.65);
}

.navbar-nav a.active:hover {
  color: #ff7ab5;
  background-color: rgba(255, 77, 157, 0.16);
}

.navbar-actions { display: flex; align-items: center; gap: 0.5rem; }

@media (min-width: 768px) {
  .navbar-actions { gap: 1rem; }
}

.navbar-search {
  display: none;
  align-items: center;
  color: var(--mag-ink);
  text-decoration: none;
  transition: color 0.2s ease;
}

.navbar-search:hover { color: var(--mag-accent-hover); }

@media (min-width: 768px) {
  .navbar-search { display: flex; }
}

.navbar-search i { margin-right: 0.25rem; }

.dropdown { position: relative; display: none; }

@media (min-width: 768px) {
  .dropdown { display: block; }
}

.dropdown-toggle {
  background-color: rgba(27, 36, 51, 0.85);
  border: 1px solid rgba(148, 176, 204, 0.18);
  color: var(--mag-body);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.dropdown-toggle:hover { border-color: var(--mag-accent); color: var(--mag-accent-hover); }

.dropdown-toggle i:first-child { margin-right: 0.5rem; }
.dropdown-toggle i:last-child { margin-left: 0.25rem; font-size: 0.75rem; }

.dropdown-menu {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 0.5rem;
  width: 16rem;
  background: rgba(17, 23, 33, 0.96);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(148, 176, 204, 0.18);
  border-radius: 0.75rem;
  box-shadow: 0 20px 48px -18px rgba(0, 0, 0, 0.8), 0 0 24px rgba(255, 77, 157, 0.08);
  z-index: 50;
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-header { padding: 0.5rem 1rem; border-bottom: 1px solid rgba(148, 176, 204, 0.14); }
.dropdown-header h3 { font-weight: 700; margin: 0; color: var(--mag-ink); }

.dropdown-content { max-height: 20rem; overflow-y: auto; }

.dropdown-item {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--mag-body);
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.dropdown-item:hover { background-color: rgba(255, 77, 157, 0.12); }

.dropdown-item-content { display: flex; }

.dropdown-item-thumb {
  width: 4rem;
  height: 2.5rem;
  background-color: #1b2433;
  border-radius: 0.5rem;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

.dropdown-item-info { flex: 1; min-width: 0; }

.dropdown-item-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--mag-ink);
  margin: 0 0 0.25rem 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.dropdown-item-progress { font-size: 0.75rem; color: var(--mag-sub); margin: 0; }

.dropdown-footer { padding: 0.5rem 1rem; border-top: 1px solid rgba(148, 176, 204, 0.14); }
.dropdown-footer a { color: var(--mag-accent-hover); font-size: 0.875rem; text-decoration: none; }
.dropdown-footer a:hover { text-decoration: underline; }

.mobile-menu-btn {
  display: block;
  background: none;
  border: none;
  color: var(--mag-ink);
  padding: 0.5rem;
  cursor: pointer;
}

@media (min-width: 768px) {
  .mobile-menu-btn { display: none; }
}

.mobile-menu-btn i { font-size: 1.25rem; }

.mobile-nav {
  display: block;
  transform: translateY(-10px);
  opacity: 0;
  visibility: hidden;
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  background: rgba(13, 18, 26, 0.97);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 77, 157, 0.35);
  box-shadow: 0 14px 32px -16px rgba(0, 0, 0, 0.75);
  transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
  z-index: 40;
  max-height: 0;
  overflow: hidden;
}

@media (min-width: 768px) {
  .mobile-nav { display: none; }
}

.mobile-nav.show {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  max-height: 500px;
}

.mobile-nav-content { padding: 1rem; display: flex; flex-direction: column; gap: 1rem; }

.mobile-nav-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }

.mobile-nav-links a {
  background-color: #18212f;
  border: 1px solid rgba(148, 176, 204, 0.2);
  color: var(--mag-body);
  padding: 0.45rem 0.25rem;
  border-radius: 6px;
  font-size: 0.875rem;
  text-align: center;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(234, 246, 255, 0.05);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.mobile-nav-links a:hover {
  background-color: rgba(255, 77, 157, 0.14);
  border-color: rgba(255, 77, 157, 0.6);
  color: #ffd7e8;
}

.mobile-nav-links a.active {
  background-color: rgba(255, 77, 157, 0.1);
  border-color: rgba(255, 77, 157, 0.8);
  color: #ff4d9d;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(255, 77, 157, 0.6);
}
.mobile-nav-links a.active:hover {
  background-color: rgba(255, 77, 157, 0.16);
  color: #ff7ab5;
}

.mobile-search { position: relative; }

.mobile-search input {
  width: 100%;
  background-color: rgba(13, 17, 23, 0.85);
  color: var(--mag-ink);
  padding: 0.5rem 1rem;
  padding-right: 2.5rem;
  border-radius: 8px;
  border: 1px solid rgba(148, 176, 204, 0.18);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.mobile-search input:focus {
  border-color: var(--mag-accent);
  box-shadow: 0 0 0 3px rgba(255, 77, 157, 0.2);
}

.mobile-search button {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--mag-sub);
  cursor: pointer;
}

.mobile-search button:hover { color: var(--neon-cyan); }

.mobile-history { color: var(--mag-ink); }

.mobile-history h3 {
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  display: flex;
  align-items: center;
}

.mobile-history h3 i { margin-right: 0.5rem; color: var(--neon-cyan); }

.mobile-history-list { display: flex; flex-direction: column; gap: 0.5rem; }

.mobile-history-item {
  display: block;
  padding: 0.5rem;
  background-color: #18212f;
  border: 1px solid rgba(148, 176, 204, 0.14);
  border-radius: 0.5rem;
  text-decoration: none;
  color: var(--mag-ink);
  transition: background-color 0.2s ease;
}

.mobile-history-item:hover { background-color: rgba(255, 77, 157, 0.14); }

.mobile-history-item-title {
  font-size: 0.875rem;
  font-weight: 500;
  margin: 0 0 0.25rem 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.mobile-history-item-progress { font-size: 0.75rem; color: var(--mag-sub); margin: 0; }

.domain-banner {
  background: transparent;
  padding: 10px 20px;
  text-align: center;
  font-size: 16px;
  position: sticky;
  top: 56px;
  z-index: 49;
  display: block;
  text-decoration: none;
}

.domain-banner .domain-label { color: var(--mag-body); font-weight: 600; }

.domain-banner .domain-url {
  color: var(--neon-cyan);
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  text-shadow: 0 0 10px rgba(34, 211, 238, 0.4);
}

.domain-banner .domain-btn {
  background: transparent;
  border: 1px solid rgba(255, 77, 157, 0.7);
  color: #ffd7e8;
  padding: 4px 14px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.domain-banner .domain-btn:hover {
  background: linear-gradient(135deg, #ff4d9d, #22d3ee);
  border-color: transparent;
  color: #0d1117;
}

.domain-banner:hover .domain-url { text-decoration: underline; }

.btn {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.line-clamp-1 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.line-clamp-2 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.mobile-text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.mobile-text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.mobile-text-2xl { font-size: 1.5rem; line-height: 2rem; }

@media (max-width: 768px) {
  .mobile-padding { padding-left: 1rem; padding-right: 1rem; }
  .mobile-mb-4 { margin-bottom: 1rem; }
  .mobile-mb-6 { margin-bottom: 1.5rem; }
  .mobile-py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
  .mobile-gap-3 { gap: 0.75rem; }
}

.magazine-ink-text { color: var(--mag-ink); }
.magazine-serif { font-family: var(--mag-serif); }

.magazine-footer-title {
  font-family: var(--mag-serif);
  color: var(--mag-ink);
  letter-spacing: 0.02em;
}

.magazine-page-header {
  background: rgba(22, 29, 40, 0.66);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid rgba(148, 176, 204, 0.14);
}

.hero-bg {
  background:
    radial-gradient(40rem 24rem at 85% -10%, rgba(255, 77, 157, 0.12), rgba(13, 17, 23, 0) 60%),
    radial-gradient(36rem 22rem at 8% 110%, rgba(34, 211, 238, 0.1), rgba(13, 17, 23, 0) 58%),
    linear-gradient(160deg, #131b26 0%, #0d1117 62%, #10161f 100%);
}

.magazine-section-title {
  font-family: var(--mag-serif);
  color: var(--mag-ink);
  font-weight: 700;
  border-top: 2px solid rgba(255, 77, 157, 0.75);
  padding-top: 0.75rem;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.magazine-kicker {
  color: var(--neon-cyan);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  font-weight: 600;
}

.magazine-card {
  background: var(--mag-card);
  border: 1px solid rgba(148, 176, 204, 0.14);
  border-radius: 0.75rem;
  box-shadow: inset 0 1px 0 rgba(234, 246, 255, 0.05);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.magazine-card:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.75), 0 0 20px rgba(34, 211, 238, 0.18), inset 0 1px 0 rgba(234, 246, 255, 0.07);
}

.content-card {
  background: var(--mag-card);
  border: 1px solid rgba(148, 176, 204, 0.14);
  border-radius: 0.75rem;
  box-shadow:
    inset 0 1px 0 rgba(234, 246, 255, 0.05),
    0 14px 30px -18px rgba(8, 12, 20, 0.5),
    0 0 22px 2px var(--amb, transparent),
    0 12px 48px 6px var(--amb-hi, transparent);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.content-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 77, 157, 0.6);
  box-shadow:
    inset 0 1px 0 rgba(234, 246, 255, 0.08),
    0 14px 30px -18px rgba(8, 12, 20, 0.5),
    0 0 30px 4px var(--amb-hi, transparent),
    0 14px 70px 8px var(--amb-hi, transparent),
    0 0 22px rgba(255, 77, 157, 0.18);
}

.content-card .p-3 {
  padding: 0.25rem 0.5rem;
}

.content-card h3 {
  font-size: 0.75rem;
  line-height: 1rem;
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .content-card h3 {
    font-size: 0.875rem;
    line-height: 1.25rem;
  }
}

.magazine-search-input {
  box-shadow: inset 0 0 0 1px rgba(148, 176, 204, 0.26);
}

.magazine-panel {
  background: var(--mag-panel);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(148, 176, 204, 0.16);
  border-radius: 0.75rem;
  box-shadow: 0 20px 44px -26px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(234, 246, 255, 0.06);
}

.magazine-topstrip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.875rem;
  margin: 0.5rem auto 0;
  background: transparent;
  color: #8fa3b8;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-align: center;
  padding: 0.375rem 1rem;
  white-space: nowrap;
  overflow: hidden;
}

.magazine-topstrip::before,
.magazine-topstrip::after {
  content: '';
  flex-shrink: 0;
  width: 12rem;
  height: 2px;
}

.magazine-topstrip::before {
  background: linear-gradient(to right, rgba(255, 77, 157, 0), rgba(255, 77, 157, 0.5));
}

.magazine-topstrip::after {
  background: linear-gradient(to right, rgba(255, 77, 157, 0.5), rgba(255, 77, 157, 0));
}

@media (max-width: 767.98px) {
  .magazine-topstrip::before,
  .magazine-topstrip::after { display: none; }
}

.magazine-rec-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.magazine-rec-header::before,
.magazine-rec-header::after {
  content: "";
  flex: 1;
  height: 8px;
}

.magazine-rec-header::before {
  background: linear-gradient(to right, rgba(34, 211, 238, 0), rgba(34, 211, 238, 0.4));
}

.magazine-rec-header::after {
  background: linear-gradient(to right, rgba(255, 77, 157, 0.4), rgba(255, 77, 157, 0));
}

@media (min-width: 768px) {
  .magazine-topstrip { display: flex; }
}

.magazine-nav-divider {
  width: 2px;
  height: 1.25rem;
  border-radius: 9999px;
  background: linear-gradient(to bottom, rgba(255, 77, 157, 0), rgba(255, 77, 157, 0.75), rgba(255, 77, 157, 0));
  margin: 0 0.875rem 0 0.25rem;
  display: none;
}

@media (min-width: 768px) {
  .magazine-nav-divider { display: block; }
}

.magazine-topstrip .domain-link {
  color: var(--mag-ink);
  font-weight: 600;
  text-decoration: none;
}

.magazine-topstrip .domain-link:hover { color: var(--neon-cyan); }

.magazine-topstrip .visit-btn {
  background: linear-gradient(135deg, #ff4d9d, #22d3ee);
  color: #0d1117;
  padding: 2px 12px;
  margin-left: 0.75rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-decoration: none;
}

.magazine-topstrip .visit-btn:hover {
  background: linear-gradient(135deg, #ff7ab5, #22d3ee);
}

.search-strip {
  position: sticky;
  top: 56px;
  z-index: 30;
  padding: 1rem 1rem 0.75rem;
  max-width: 1152px;
  margin: 0 auto;
  background: rgba(13, 17, 23, 0.72);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
}

.search-strip form { position: relative; }

.search-strip button { right: 0.75rem; }

@media (min-width: 768px) {
  .search-strip { padding: 1.5rem 1.5rem 0.75rem; }
}

.navbar .navbar-brand { flex-shrink: 0; }

.navbar .navbar-search-box {
  flex: 0 0 50%;
  max-width: 360px;
  margin-left: auto;
}

@media (min-width: 768px) {
  .navbar .navbar-search-box { flex: 0 1 360px; }
}

.navbar .navbar-search-box input {
  background-color: rgba(13, 17, 23, 0.75);
  color: var(--mag-ink);
}

.navbar .navbar-search-box input::placeholder { color: var(--mag-sub); }

.navbar .navbar-search-box button { color: var(--mag-sub); }

.navbar .navbar-search-box button:hover { color: var(--neon-cyan); }

#friendLinksContainer a {
  background: #ff4d9d;
  color: #0d1117;
  font-weight: 600;
  border-radius: 4px;
  padding: 0.125rem 0.75rem;
  box-shadow: 0 0 10px rgba(255, 77, 157, 0.3);
}

@media (min-width: 768px) {
  #friendLinksContainer a { padding: 0.25rem 1rem; }
}

#friendLinksContainer a:hover {
  background: #ff7ab5;
  color: #0d1117;
  box-shadow: 0 0 16px rgba(255, 77, 157, 0.45);
}

.friend-links-label {
  color: var(--mag-ink);
  font-weight: 600;
  font-size: 0.875rem;
}

.magazine-section-inline {
  border-top: none;
  padding-top: 0;
}

.magazine-section-rule {
  flex: 1;
  height: 3px;
  min-height: 3px;
  align-self: center;
  width: 100%;
  border-radius: 999px;
  background: repeating-linear-gradient(90deg, rgba(255, 77, 157, 0.85) 0 9px, rgba(13, 17, 23, 0) 9px 18px);
  box-shadow: 0 0 8px rgba(255, 77, 157, 0.35);
  margin-left: 0.75rem;
  margin-right: 0;
  animation: neon-cable 1.8s linear infinite;
}

@keyframes neon-cable {
  to { background-position: 36px 0; }
}

.neon-title-row {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

.magazine-section-title:hover + .magazine-section-rule {
  background: repeating-linear-gradient(90deg, rgba(34, 211, 238, 0.8) 0 9px, rgba(13, 17, 23, 0) 9px 18px);
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.35);
}

.magazine-section-title a {
  color: inherit;
  text-decoration: none;
}

.magazine-section-title a:hover {
  color: var(--mag-accent-hover);
}

#friendLinksContainer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.navbar-nav a:nth-child(6n+1):not(.active) { border-color: rgba(34, 211, 238, 0.42); color: #a9e9f6; box-shadow: inset 0 0 8px rgba(34, 211, 238, 0.07), 0 0 8px rgba(34, 211, 238, 0.12); }
.navbar-nav a:nth-child(6n+2):not(.active) { border-color: rgba(255, 77, 157, 0.42); color: #ffc4da; box-shadow: inset 0 0 8px rgba(255, 77, 157, 0.07), 0 0 8px rgba(255, 77, 157, 0.12); }
.navbar-nav a:nth-child(6n+3):not(.active) { border-color: rgba(167, 139, 250, 0.42); color: #d3c6fd; box-shadow: inset 0 0 8px rgba(167, 139, 250, 0.07), 0 0 8px rgba(167, 139, 250, 0.12); }
.navbar-nav a:nth-child(6n+4):not(.active) { border-color: rgba(255, 209, 102, 0.4); color: #ffe8b3; box-shadow: inset 0 0 8px rgba(255, 209, 102, 0.07), 0 0 8px rgba(255, 209, 102, 0.12); }
.navbar-nav a:nth-child(6n+5):not(.active) { border-color: rgba(96, 165, 250, 0.42); color: #bfd9fb; box-shadow: inset 0 0 8px rgba(96, 165, 250, 0.07), 0 0 8px rgba(96, 165, 250, 0.12); }
.navbar-nav a:nth-child(6n+6):not(.active) { border-color: rgba(52, 211, 153, 0.4); color: #a9f0cf; box-shadow: inset 0 0 8px rgba(52, 211, 153, 0.07), 0 0 8px rgba(52, 211, 153, 0.12); }

.navbar-nav a:not(.active):hover {
  background-color: rgba(255, 77, 157, 0.14);
  border-color: rgba(255, 77, 157, 0.7);
  color: #ffd7e8;
  box-shadow: 0 0 16px rgba(255, 77, 157, 0.32);
}

.bg-gray-800.text-white.magazine-more-btn {
  background: rgba(22, 29, 40, 0.8);
  border: 1px solid rgba(255, 77, 157, 0.45);
  border-radius: 9999px;
  color: #ffd7e8;
  box-shadow: 0 0 12px rgba(255, 77, 157, 0.12);
}

.bg-gray-800.text-white.magazine-more-btn:hover {
  background: rgba(255, 77, 157, 0.18);
  border-color: rgba(255, 77, 157, 0.7);
}

#backToTop {
  background-image: linear-gradient(135deg, #ff4d9d, #22d3ee);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 9999px;
  color: #0d1117;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 28px -10px rgba(255, 77, 157, 0.5);
}

#backToTop:hover {
  background-image: linear-gradient(135deg, #ff7ab5, #22d3ee);
  box-shadow: 0 10px 34px -8px rgba(255, 77, 157, 0.7);
}

.magazine-sort {
  position: relative;
  display: inline-block;
}

#sortSelect {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(22, 29, 40, 0.7);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border: 1px solid rgba(148, 176, 204, 0.2);
  border-radius: 8px;
  color: var(--mag-ink);
  font-weight: 600;
  padding: 0.5rem 1.125rem;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

#sortSelect:hover {
  background-color: rgba(255, 77, 157, 0.14);
  border-color: rgba(255, 77, 157, 0.55);
}

#sortSelect i {
  transition: transform 0.2s ease;
  font-size: 0.75em;
  color: var(--neon-cyan);
}

#sortSelect.open {
  background-color: rgba(255, 77, 157, 0.16);
}

#sortSelect.open i {
  transform: rotate(180deg);
}

.magazine-sort-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 100%;
  background: rgba(17, 23, 33, 0.96);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(148, 176, 204, 0.2);
  border-radius: 0.625rem;
  box-shadow: 0 20px 44px -18px rgba(0, 0, 0, 0.8), 0 0 18px rgba(255, 77, 157, 0.1);
  padding: 0.375rem;
  display: none;
  z-index: 40;
}

.magazine-sort-menu.open {
  display: block;
}

.magazine-sort-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-radius: 0.375rem;
  color: var(--mag-body);
  font-weight: 500;
  padding: 0.5rem 0.875rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.magazine-sort-item:hover {
  background: rgba(255, 77, 157, 0.14);
  color: var(--mag-accent-hover);
}

.magazine-sort-item.active {
  background: rgba(255, 77, 157, 0.12);
  color: var(--mag-accent-hover);
  font-weight: 700;
}

.magazine-tag-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.42);
  border-radius: 9999px;
  color: #a9e9f6;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.magazine-tag-pill:hover {
  background: rgba(34, 211, 238, 0.2);
  color: #c9f2fb;
}

@media (max-width: 767.98px) {
  .magazine-tag-pill {
    font-size: 0.75rem;
    padding: 0.1875rem 0.625rem;
  }
}

.magazine-node-btn {
  display: inline-flex;
  align-items: center;
  background: rgba(22, 29, 40, 0.72);
  border: 1px solid rgba(148, 176, 204, 0.2);
  border-radius: 6px;
  color: var(--mag-body);
  font-weight: 500;
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  box-shadow: inset 0 1px 0 rgba(234, 246, 255, 0.05);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.magazine-node-btn:hover {
  background: rgba(255, 77, 157, 0.16);
  border-color: rgba(255, 77, 157, 0.5);
  color: var(--mag-accent-hover);
}

.magazine-node-btn.active {
  background: rgba(255, 77, 157, 0.14);
  border-color: rgba(255, 77, 157, 0.7);
  color: #ffd7e8;
  font-weight: 600;
  box-shadow: 0 0 10px rgba(255, 77, 157, 0.22);
}

.magazine-node-btn.active:hover {
  background: rgba(255, 77, 157, 0.24);
}

.magazine-btn-share {
  display: inline-flex;
  align-items: center;
  background: rgba(52, 199, 89, 0.14);
  border: 1px solid rgba(52, 199, 89, 0.32);
  border-radius: 9999px;
  color: #6ee7a0;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.25rem 0.75rem;
  transition: background-color 0.2s ease;
}

.magazine-btn-share:hover {
  background: rgba(52, 199, 89, 0.26);
}

.magazine-btn-report {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 59, 48, 0.14);
  border: 1px solid rgba(255, 59, 48, 0.32);
  border-radius: 9999px;
  color: #ff8a80;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.25rem 0.75rem;
  transition: background-color 0.2s ease;
}

.magazine-btn-report:hover {
  background: rgba(255, 59, 48, 0.26);
}

.magazine-empty-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  margin-bottom: 1rem;
  border-radius: 9999px;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.4);
  color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.18), inset 0 0 8px rgba(34, 211, 238, 0.08);
  font-size: 1.75rem;
}

.flex.items-center > .magazine-empty-badge {
  margin-bottom: 0;
  margin-right: 0.75rem;
}

.navbar-domain {
  display: none;
}

@media (min-width: 768px) {
  .magazine-topstrip { display: none; }

  .navbar-domain {
    display: flex;
    align-items: center;
    margin-left: 0.75rem;
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    white-space: nowrap;
  }

  .navbar-domain .domain-link {
    color: #8fa3b8;
    font-weight: 600;
    text-decoration: none;
  }

  .navbar-domain .domain-link:hover { color: var(--neon-cyan); }
}

.neon-screen {
  position: relative;
  background: linear-gradient(180deg, rgba(22, 29, 40, 0.66), rgba(13, 17, 23, 0.5));
  border: 2px solid rgba(255, 77, 157, 0.6);
  border-radius: 0.875rem;
  padding: 1rem 0.25rem 1.25rem;
  box-shadow: 0 0 18px rgba(255, 77, 157, 0.16), 0 24px 48px -24px rgba(0, 0, 0, 0.8), inset 0 0 24px rgba(255, 77, 157, 0.05);
}

.neon-screen::before {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(34, 211, 238, 0.32);
  border-radius: 0.625rem;
  pointer-events: none;
}

.neon-screen::after {
  content: '';
  position: absolute;
  top: 0.875rem;
  right: 1.125rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: #ff4d9d;
  box-shadow: 0 0 8px rgba(255, 77, 157, 0.8);
  animation: neon-sig 2.4s ease-in-out infinite;
}

@keyframes neon-sig {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.neon-board {
  background: rgba(22, 29, 40, 0.5);
  border: 2px solid rgba(255, 77, 157, 0.6);
  border-radius: 0.75rem;
  padding: 0.25rem 0.25rem 0.5rem;
  box-shadow: 0 20px 44px -26px rgba(0, 0, 0, 0.8), 0 0 16px rgba(255, 77, 157, 0.16);
}

.neon-screen .magazine-section-title,
.neon-board .magazine-section-title {
  border-top: none;
  padding-top: 0;
  text-shadow: 0 0 12px rgba(255, 77, 157, 0.3);
}

.neon-spot {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.2rem;
  margin-bottom: 0.2rem;
}

.neon-spot-wall {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.2rem;
}

@media (min-width: 768px) {
  .neon-spot { grid-template-columns: 0.81fr 1fr; gap: 1rem; margin-bottom: 1rem; }
  .neon-spot-wall { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .magazine-section-rule,
  .neon-screen::after { animation: none; }
}

.neon-booth {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 77, 157, 0.06) 0%, rgba(255, 77, 157, 0) 20%),
    linear-gradient(0deg, rgba(34, 211, 238, 0.08) 0%, rgba(34, 211, 238, 0) 16%),
    repeating-linear-gradient(86deg, rgba(158, 199, 230, 0.04) 0, rgba(158, 199, 230, 0.04) 2px, rgba(158, 199, 230, 0) 2px, rgba(158, 199, 230, 0) 26px),
    repeating-linear-gradient(88deg, rgba(158, 199, 230, 0.05) 0, rgba(158, 199, 230, 0.05) 1px, rgba(158, 199, 230, 0) 1px, rgba(158, 199, 230, 0) 9px),
    linear-gradient(180deg, #17202e 0%, #121926 100%);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid rgba(148, 176, 204, 0.2);
  border-top: 2px solid rgba(255, 77, 157, 0.65);
  box-shadow:
    0 0 16px rgba(255, 77, 157, 0.12),
    0 24px 50px -28px rgba(0, 0, 0, 0.85),
    inset 0 1px 0 rgba(234, 246, 255, 0.06);
}

.neon-booth::after {
  content: "";
  position: absolute;
  left: 1.25rem;
  right: 1.25rem;
  bottom: -7px;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0) 0%, rgba(34, 211, 238, 0.55) 18%, rgba(34, 211, 238, 0.55) 82%, rgba(34, 211, 238, 0) 100%);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.4);
  pointer-events: none;
}

.neon-key-tray {
  background: #10161f;
  border: 1px solid rgba(148, 176, 204, 0.18);
  border-radius: 0.75rem;
  box-shadow: inset 0 1px 0 rgba(234, 246, 255, 0.05), 0 14px 30px -18px rgba(0, 0, 0, 0.8);
  flex-wrap: wrap;
  justify-content: center;
  row-gap: 0.5rem;
}

.neon-key-tray .pagination-btn {
  border-radius: 6px;
  background: linear-gradient(180deg, #1d2736 0%, #171f2c 100%);
  border: 1px solid rgba(148, 176, 204, 0.2);
  color: #c9d7e6;
  box-shadow: inset 0 1px 0 rgba(234, 246, 255, 0.08), 0 2px 0 rgba(9, 13, 20, 0.9), 0 0 10px rgba(34, 211, 238, 0.06);
}

.neon-key-tray .pagination-btn:hover:not(.disabled) {
  background: linear-gradient(180deg, #243044 0%, #1b2432 100%);
  color: #eaf6ff;
  box-shadow: inset 0 1px 0 rgba(234, 246, 255, 0.1), 0 2px 0 rgba(9, 13, 20, 0.9), 0 0 12px rgba(34, 211, 238, 0.3);
}

.neon-key-tray .pagination-btn.disabled {
  opacity: 0.45;
}

.neon-key-tray .pagination-btn.active {
  background: linear-gradient(180deg, #ff5fa8 0%, #ff4d9d 55%, #e03585 100%);
  border-color: rgba(255, 122, 181, 0.8);
  color: #0d1117;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 2px 0 rgba(160, 20, 90, 0.85), 0 0 16px rgba(255, 77, 157, 0.5);
}
