* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  font-family: "JetBrains Mono", "Fira Code", "SF Mono", monospace;
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #16161f;
  --accent-pink: #ff2d6a;
  --accent-teal: #00ffd5;
  --accent-purple: #a855f7;
  --accent-neon: #00ff41;
  --text-primary: #e4e4e7;
  --text-secondary: #71717a;
  --text-muted: #52525b;
  --border-color: rgba(255, 255, 255, 0.08);
  --glow-pink: 0 0 20px rgba(255, 45, 106, 0.3);
  --glow-teal: 0 0 20px rgba(0, 255, 213, 0.3);
  --glow-neon: 0 0 10px rgba(0, 255, 65, 0.5);
}

/* Matrix background effect */
body {
  margin: 0;
  background: var(--bg-primary);
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at top, rgba(168, 85, 247, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(0, 255, 213, 0.08) 0%, transparent 40%),
    radial-gradient(ellipse at bottom left, rgba(255, 45, 106, 0.08) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

/* Animated grid background */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(0, 255, 213, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 213, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
}

main {
  position: relative;
  z-index: 1;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-teal);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-pink);
}

.site-logo {
  height: 42px;
  width: auto;
}

.site-logo-small {
  height: 28px;
  width: auto;
  opacity: 0.9;
  transition: opacity 200ms ease;
}

.site-logo-small:hover {
  opacity: 1;
}

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--accent-teal);
  margin-bottom: 0.75rem;
  text-shadow: var(--glow-teal);
}

.tagline {
  color: var(--accent-neon);
  font-size: 0.9rem;
  font-weight: 500;
  font-family: "JetBrains Mono", monospace;
  text-shadow: var(--glow-neon);
  letter-spacing: 0.02em;
}

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.25);
}

.panel-title {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  text-shadow: var(--glow-teal);
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.category-tab {
  border: 1px solid var(--border-color);
  background: rgba(10, 10, 15, 0.6);
  color: var(--text-secondary);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.category-tab:hover,
.category-tab:focus-visible {
  outline: none;
  color: var(--text-primary);
  border-color: rgba(0, 255, 213, 0.6);
  box-shadow: var(--glow-teal);
}

.category-tab.is-active {
  color: #001410;
  background: linear-gradient(120deg, rgba(0, 255, 213, 0.9), rgba(0, 255, 65, 0.7));
  border-color: transparent;
}

.category-panel {
  display: none;
}

.category-panel.is-active {
  display: block;
}

/* Typing cursor animation */
.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent-pink);
  margin-left: 2px;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Glitch effect for headings */
h1 {
  position: relative;
}

h1::before,
h1::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

h1:hover::before {
  animation: glitch-1 0.3s infinite;
  color: var(--accent-teal);
  opacity: 0.8;
}

h1:hover::after {
  animation: glitch-2 0.3s infinite;
  color: var(--accent-pink);
  opacity: 0.8;
}

@keyframes glitch-1 {
  0% { clip-path: inset(20% 0 60% 0); transform: translate(-2px, 2px); }
  20% { clip-path: inset(60% 0 10% 0); transform: translate(2px, -2px); }
  40% { clip-path: inset(30% 0 50% 0); transform: translate(-2px, 2px); }
  60% { clip-path: inset(70% 0 20% 0); transform: translate(2px, -2px); }
  80% { clip-path: inset(10% 0 80% 0); transform: translate(-2px, 2px); }
  100% { clip-path: inset(50% 0 30% 0); transform: translate(2px, -2px); }
}

@keyframes glitch-2 {
  0% { clip-path: inset(60% 0 20% 0); transform: translate(2px, -2px); }
  20% { clip-path: inset(10% 0 80% 0); transform: translate(-2px, 2px); }
  40% { clip-path: inset(50% 0 30% 0); transform: translate(2px, -2px); }
  60% { clip-path: inset(20% 0 60% 0); transform: translate(-2px, 2px); }
  80% { clip-path: inset(70% 0 10% 0); transform: translate(2px, -2px); }
  100% { clip-path: inset(30% 0 50% 0); transform: translate(-2px, 2px); }
}

.content-card {
  background: var(--bg-card);
  border-radius: 0.75rem;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.content-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-teal), transparent);
  opacity: 0.5;
}

.status-card {
  background: var(--bg-card);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  font-family: "JetBrains Mono", monospace;
  border: 1px solid var(--border-color);
}

.status-card.info {
  border-color: rgba(0, 255, 213, 0.3);
  color: var(--accent-teal);
  background: rgba(0, 255, 213, 0.05);
}

.status-card.info::before {
  content: "> ";
  opacity: 0.5;
}

.status-card.error {
  border-color: rgba(255, 45, 106, 0.3);
  color: var(--accent-pink);
  background: rgba(255, 45, 106, 0.05);
}

.status-card.error::before {
  content: "! ";
  opacity: 0.5;
}

.avatar-shell {
  height: 92px;
  width: 92px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple), var(--accent-teal));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  box-shadow: var(--glow-pink);
  animation: avatar-glow 3s ease-in-out infinite alternate;
}

@keyframes avatar-glow {
  from { box-shadow: var(--glow-pink); }
  to { box-shadow: var(--glow-teal); }
}

.avatar-shell img {
  border-radius: 50%;
  background: var(--bg-primary);
}

.handle-pill {
  background: rgba(255, 45, 106, 0.15);
  color: var(--accent-pink);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid rgba(255, 45, 106, 0.3);
  font-family: "JetBrains Mono", monospace;
}

.profile-banner {
  position: relative;
  height: 180px;
  margin: -1.5rem -1.5rem 0;
  border-bottom: 1px solid var(--border-color);
  background:
    linear-gradient(120deg, rgba(255, 45, 106, 0.25), transparent 50%),
    linear-gradient(200deg, rgba(0, 255, 213, 0.2), transparent 60%),
    rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.profile-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-banner.is-empty {
  display: none;
}

.profile-body {
  padding-top: 1rem;
}

.profile-header {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.profile-header .cta-link {
  margin-left: auto;
}

.profile-avatar {
  margin-top: -3.25rem;
}

.profile-meta {
  flex: 1;
  min-width: 220px;
}

.profile-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.verified-pill {
  background: rgba(0, 255, 213, 0.12);
  color: var(--accent-teal);
  border: 1px solid rgba(0, 255, 213, 0.3);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.profile-stats {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.stat {
  border: 1px solid var(--border-color);
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.stat-value {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.cta-link {
  color: var(--accent-teal);
  border: 1px solid var(--accent-teal);
  padding: 0.55rem 1.25rem;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 200ms ease;
  text-decoration: none;
  background: transparent;
  text-shadow: var(--glow-teal);
}

.cta-link:hover {
  background: rgba(0, 255, 213, 0.1);
  box-shadow: var(--glow-teal);
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .profile-header .cta-link {
    margin-left: 0;
  }

  .profile-avatar {
    margin-top: -2.5rem;
  }
}

.tweet-card {
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.02);
  transition: all 200ms ease;
}

.tweet-card.rich {
  padding: 0;
  overflow: hidden;
}

.tweet-card:hover {
  border-color: rgba(0, 255, 213, 0.3);
  background: rgba(0, 255, 213, 0.03);
}

.tweet-meta {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  font-family: "JetBrains Mono", monospace;
}

/* Tab button styles */
.tab-button {
  transition: all 200ms ease;
}

.tab-button.active {
  background: rgba(0, 255, 213, 0.15) !important;
  border: 1px solid rgba(0, 255, 213, 0.3);
  color: var(--accent-teal) !important;
  text-shadow: var(--glow-teal);
}

/* Sub-tab button styles */
.subtab-button {
  transition: all 200ms ease;
}

.subtab-button.active {
  background: rgba(255, 45, 106, 0.15) !important;
  border: 1px solid rgba(255, 45, 106, 0.3);
  color: var(--accent-pink) !important;
}

/* Gallery styles */
.gallery-item {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  transition: all 200ms ease;
  position: relative;
  background: rgba(0, 0, 0, 0.2);
}

.gallery-item:hover {
  border-color: var(--accent-teal);
}

.gallery-media-link {
  display: block;
  width: 100%;
  height: 100%;
  transition: transform 200ms ease;
}

.gallery-item:hover .gallery-media-link {
  transform: scale(1.02);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-video-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.gallery-video-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: all 200ms ease;
}

.gallery-item:hover .gallery-play-icon {
  background: var(--accent-pink);
  transform: translate(-50%, -50%) scale(1.1);
}

.gallery-download {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(255, 255, 255, 0.9);
  color: #0f0f14;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  border-radius: 0.4rem;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 200ms ease;
}

.gallery-download:hover {
  background: #ffffff;
  color: #0a0a0f;
}

/* Tweet media styles */
.tweet-media {
  margin-top: 0.75rem;
}

.tweet-media-item img,
.tweet-media-item video {
  max-height: 300px;
  object-fit: cover;
  width: 100%;
}

.tweet-media-item video {
  background: #000;
}

/* Tweet stats */
.tweet-stats {
  display: flex;
  gap: 1.25rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.tweet-stat {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-family: "JetBrains Mono", monospace;
  transition: color 200ms ease;
}

.tweet-stat:hover {
  color: var(--accent-teal);
}

.tweet-stat svg {
  opacity: 0.7;
}

.tweet-stat:hover svg {
  opacity: 1;
}

/* Single tweet styles */
.single-tweet {
  padding: 1rem 0;
}

.single-tweet img.rounded-lg {
  max-height: 400px;
  object-fit: cover;
}

/* Search input styles */
.search-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  transition: all 200ms ease;
}

.search-container:focus-within {
  border-color: var(--accent-teal);
  box-shadow: 0 0 0 2px rgba(0, 255, 213, 0.1);
}

/* Primary button */
.btn-primary {
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
  border: none;
  color: white;
  font-weight: 600;
  transition: all 200ms ease;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
  box-shadow: var(--glow-pink);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Timeline */
.timeline-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}

.timeline-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scroll-snap-type: x mandatory;
}

.timeline-column {
  min-width: 240px;
  flex: 0 0 240px;
  background: rgba(17, 17, 23, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 0.75rem;
  scroll-snap-align: start;
}

.timeline-hour {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  color: #a1a1aa;
  margin-bottom: 0.6rem;
}

.timeline-trend-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.timeline-trend {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  text-decoration: none;
  color: #e2e8f0;
  font-size: 0.8rem;
  line-height: 1.2;
  transition: color 150ms ease;
}

.timeline-trend:hover {
  color: var(--accent-teal);
}

.timeline-rank {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  color: #7a7a90;
  min-width: 1.4rem;
}

.timeline-name {
  flex: 1;
  word-break: break-word;
}

.realtime-width {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.timeline-load {
  margin-top: 0.65rem;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(20, 20, 30, 0.7);
  color: #d4d4ff;
  font-size: 0.75rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  font-family: "JetBrains Mono", monospace;
  transition: all 150ms ease;
}

.timeline-load:hover {
  border-color: rgba(0, 255, 213, 0.4);
  color: #e6fffb;
}


/* Scanline effect (optional subtle overlay) */
.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.05),
    rgba(0, 0, 0, 0.05) 1px,
    transparent 1px,
    transparent 2px
  );
  opacity: 0.3;
}

/* Loading animation */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.loading {
  animation: pulse 1.5s ease-in-out infinite;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: center;
  align-items: center;
  font-size: 0.75rem;
}

.footer-links a {
  color: var(--accent-neon);
  text-decoration: none;
  transition: all 200ms ease;
  text-shadow: var(--glow-neon);
}

.footer-links a:hover {
  color: #33ff66;
  text-shadow: 0 0 15px rgba(0, 255, 65, 0.8);
}

/* Privacy Policy / Prose Content */
.prose-container {
  line-height: 1.7;
}

.policy-section {
  margin-bottom: 2rem;
}

.policy-section h2 {
  color: var(--accent-teal);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.policy-section p {
  color: #a1a1aa;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.policy-section ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0.75rem;
}

.policy-section ul li {
  color: #a1a1aa;
  font-size: 0.9rem;
  padding-left: 1.25rem;
  position: relative;
  margin-bottom: 0.5rem;
}

.policy-section ul li::before {
  content: ">";
  position: absolute;
  left: 0;
  color: var(--accent-pink);
}

.policy-section strong {
  color: var(--text-primary);
}

/* Blog Styles */
.blog-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  text-decoration: none;
  transition: all 200ms ease;
}

.blog-card:hover {
  border-color: rgba(0, 255, 213, 0.3);
  transform: translateY(-2px);
}

.blog-date {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  font-family: "JetBrains Mono", monospace;
}

.blog-title {
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0.5rem 0;
  line-height: 1.4;
}

.blog-excerpt {
  color: #a1a1aa;
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.blog-read-more {
  color: var(--accent-teal);
  font-size: 0.85rem;
  font-weight: 500;
  font-family: "JetBrains Mono", monospace;
}

/* FAQ Styles */
.faq-container {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.faq-item {
  border-bottom: 1px solid var(--border-color);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 0;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: all 200ms ease;
}

.faq-question:hover {
  color: var(--accent-teal);
}

.faq-number {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-pink);
  font-family: "JetBrains Mono", monospace;
  min-width: 28px;
}

.faq-text {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
}

.faq-item:hover .faq-text {
  color: var(--accent-teal);
}

.faq-icon {
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--accent-teal);
  transition: transform 200ms ease;
  font-family: "JetBrains Mono", monospace;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: all 300ms ease;
  padding-left: 2.75rem;
}

.faq-item.open .faq-answer {
  max-height: 200px;
  padding-bottom: 1.25rem;
}

.faq-answer p {
  color: #a1a1aa;
  font-size: 0.9rem;
  line-height: 1.7;
}


/* Trends Styles */
.trend-card {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.02);
  transition: all 200ms ease;
  animation: fadeInUp 0.3s ease-out forwards;
  opacity: 0;
}

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

.trend-card:hover {
  border-color: rgba(168, 85, 247, 0.4);
  background: rgba(168, 85, 247, 0.05);
}

.trend-rank {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
  border-radius: 0.375rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.trend-content {
  flex: 1;
  min-width: 0;
}

.trend-name {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  transition: color 200ms ease;
  word-break: break-word;
}

.trend-name:hover {
  color: var(--accent-purple);
}

.trend-description {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  line-height: 1.4;
}

.trend-volume {
  display: inline-block;
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-family: "JetBrains Mono", monospace;
  margin-top: 0.35rem;
  padding: 0.15rem 0.5rem;
  background: rgba(168, 85, 247, 0.1);
  border-radius: 999px;
  border: 1px solid rgba(168, 85, 247, 0.2);
}

.trend-icon {
  display: inline-flex;
  width: 0.9rem;
  height: 0.9rem;
}

.trend-icon svg {
  width: 100%;
  height: 100%;
  fill: var(--accent-teal);
  opacity: 0.9;
}

.channel-metrics {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  margin-top: 0.35rem;
  align-items: center;
}

.channel-metric {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-family: "JetBrains Mono", monospace;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(0, 255, 213, 0.08);
  border: 1px solid rgba(0, 255, 213, 0.2);
  white-space: nowrap;
}

.channel-metric .trend-icon,
.channel-metric svg,
.channel-metric span {
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
}

.trend-video-link,
.trend-video-text {
  display: block;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.85rem;
  line-height: 1.4;
}

.trend-video-link:hover {
  color: var(--accent-purple);
}

.trend-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 0.375rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  text-decoration: none;
  transition: all 200ms ease;
  flex-shrink: 0;
}

.trend-link:hover {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.4);
  color: var(--accent-purple);
}

.trend-summary {
  width: 100%;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  padding-left: 3.25rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.trend-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
  padding: 0.25rem 0;
  border-radius: 0.25rem;
  transition: background 150ms ease;
}

.trend-summary-header:hover {
  background: rgba(168, 85, 247, 0.08);
}

.trend-summary-header:focus {
  outline: none;
  background: rgba(168, 85, 247, 0.12);
}

.trend-summary-label {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.trend-summary-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.trend-summary-chevron {
  transition: transform 200ms ease;
}

.trend-summary.collapsed .trend-summary-chevron {
  transform: rotate(0deg);
}

.trend-summary:not(.collapsed) .trend-summary-chevron {
  transform: rotate(180deg);
}

.trend-summary-text {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text-primary);
  margin: 0;
  margin-top: 0.5rem;
  white-space: pre-wrap;
  overflow: hidden;
  transition: max-height 300ms ease, opacity 200ms ease, margin-top 200ms ease;
}

.trend-summary.collapsed .trend-summary-text {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
}

.trend-summary:not(.collapsed) .trend-summary-text {
  max-height: 1000px;
  opacity: 1;
}

/* Dropdown select styles */
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2371717a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px !important;
}

select option {
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 0.5rem;
}

select optgroup {
  background: var(--bg-secondary);
  color: var(--accent-teal);
  font-weight: 600;
}

.floating-tags-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
  padding: 0.5rem 0.75rem;
}

.floating-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  background: rgba(22, 22, 31, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 12px rgba(0, 255, 213, 0.12);
  animation: float-tag var(--float-duration, 6s) ease-in-out infinite;
  animation-delay: var(--float-delay, 0s);
  backdrop-filter: blur(6px);
  will-change: transform;
}

.floating-tag.hashtag {
  color: var(--accent-teal);
  border-color: rgba(0, 255, 213, 0.35);
  box-shadow: var(--glow-teal);
}

.floating-tag.topic {
  color: var(--accent-pink);
  border-color: rgba(255, 45, 106, 0.35);
  box-shadow: var(--glow-pink);
}

@keyframes float-tag {
  0% {
    transform: translateY(calc(var(--float-offset, 0px) - 4px));
  }
  50% {
    transform: translateY(calc(var(--float-offset, 0px) + 4px));
  }
  100% {
    transform: translateY(calc(var(--float-offset, 0px) - 4px));
  }
}

@media (max-width: 640px) {
  .content-card {
    padding: 1.25rem;
  }

  body::after {
    background-size: 30px 30px;
  }

  .trend-card {
    padding: 0.875rem 1rem;
  }

  .trend-rank {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }

  .trend-name {
    font-size: 0.875rem;
  }

  .trend-summary {
    padding-left: 0;
  }

  .floating-tag {
    font-size: 0.68rem;
    padding: 0.3rem 0.6rem;
  }
}

/* YouTube Video Card Grid */
.youtube-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.youtube-video-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: all 200ms ease;
}

.youtube-video-card:hover {
  border-color: var(--accent-teal);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 255, 213, 0.1);
}

.youtube-card-rank {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 5;
  background: rgba(0, 0, 0, 0.8);
  color: var(--accent-teal);
  font-size: 0.7rem;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  border: 1px solid var(--accent-teal);
}

.youtube-card-thumbnail {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  cursor: pointer;
  overflow: hidden;
}

.youtube-card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.3);
  transition: transform 300ms ease;
}

.youtube-video-card:hover .youtube-card-thumbnail img {
  transform: scale(1.05);
}

.youtube-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background: rgba(255, 45, 106, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: all 200ms ease;
  opacity: 0.9;
}

.youtube-card-thumbnail:hover .youtube-play-icon {
  background: var(--accent-pink);
  transform: translate(-50%, -50%) scale(1.15);
  opacity: 1;
}

.youtube-card-content {
  padding: 0.875rem;
}

.youtube-card-title {
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.youtube-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 200ms ease;
}

.youtube-card-title a:hover {
  color: var(--accent-purple);
}

.youtube-card-channel {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.youtube-card-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.7;
  margin-bottom: 0.5rem;
}

.youtube-card-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-color);
}

.youtube-card-metric {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.youtube-card-metric .trend-icon {
  opacity: 0.7;
}

.youtube-card-metric .trend-icon svg {
  fill: currentColor;
}

/* YouTube Preview Modal */
.youtube-preview-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.youtube-preview-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(4px);
}

.youtube-preview-content {
  position: relative;
  width: 100%;
  max-width: 900px;
  background: var(--card-bg);
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.youtube-preview-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 10;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  color: var(--text-primary);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 200ms ease;
}

.youtube-preview-close:hover {
  background: var(--accent-pink);
  border-color: var(--accent-pink);
}

.youtube-preview-title {
  padding: 1rem 3rem 1rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.youtube-preview-player {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 aspect ratio */
  background: #000;
}

.youtube-preview-player iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

@media (max-width: 640px) {
  .youtube-video-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
  }

  .youtube-card-content {
    padding: 0.75rem;
  }

  .youtube-card-title {
    font-size: 0.85rem;
  }

  .youtube-preview-content {
    max-width: 100%;
  }

  .youtube-preview-title {
    font-size: 0.8rem;
    padding: 0.75rem 2.5rem 0.75rem 0.75rem;
  }
}

@media (max-width: 480px) {
  .youtube-video-grid {
    grid-template-columns: 1fr;
  }
}
