*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #000308;
  --cyan: #00f5ff;
  --pink: #ff006e;
  --green: #39ff14;
  --purple: #bf00ff;
  --text: #dff0ff;
  --muted: #3d5a72;
  --card: rgba(0,245,255,0.03);
  --border: rgba(0,245,255,0.1);
  --border-hot: rgba(0,245,255,0.45);
}

html, body {
  height: 100vh;
  height: 100svh;
  width: 100vw;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
}

/* ── Grid background ── */
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(0,245,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,245,255,0.025) 1px, transparent 1px);
  background-size: 70px 70px;
}

/* Scanlines */
.scanlines {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 2px,
    rgba(0,0,0,0.12) 2px, rgba(0,0,0,0.12) 4px
  );
}

/* Blobs */
.blob {
  position: fixed; border-radius: 50%;
  filter: blur(110px); opacity: 0.1;
  pointer-events: none; z-index: 0;
  animation: drift 22s ease-in-out infinite alternate;
}
.blob-1 { width: 550px; height: 550px; background: var(--cyan); top: -180px; left: -120px; animation-delay: 0s; }
.blob-2 { width: 420px; height: 420px; background: var(--pink); bottom: -120px; right: -80px; animation-delay: -9s; }
.blob-3 { width: 380px; height: 380px; background: var(--purple); top: 35%; left: 28%; animation-delay: -5s; }

@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(55px, 35px) scale(1.15); }
}

/* ── Nav HUD ── */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100; padding: 1rem 2.5rem;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(0,3,8,0.85);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: 'Orbitron', monospace;
  font-weight: 900; font-size: 1rem; letter-spacing: 0.22em;
  color: var(--cyan);
  text-shadow: 0 0 25px rgba(0,245,255,0.55);
}

.nav-panels {
  display: flex; flex-direction: column;
  align-items: center; gap: 0.3rem;
}

.nav-dot-row {
  display: flex; gap: 0.55rem; align-items: center;
}

.nav-dot-circle {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--muted); cursor: pointer;
  transition: all 0.3s; border: 1px solid rgba(0,245,255,0.12);
  flex-shrink: 0;
}
.nav-dot-circle.active {
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan), 0 0 20px rgba(0,245,255,0.35);
  border-color: var(--cyan);
}

.nav-tab-row { display: flex; gap: 0.2rem; }

.nav-tab {
  padding: 0.2rem 0.65rem; border-radius: 3px;
  cursor: pointer; transition: all 0.25s;
  border: 1px solid transparent;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.58rem; letter-spacing: 0.18em;
  color: var(--muted); text-transform: uppercase;
}
.nav-tab:hover { color: var(--text); border-color: var(--border); }
.nav-tab.active {
  color: var(--cyan); border-color: rgba(0,245,255,0.25);
  background: rgba(0,245,255,0.05);
  text-shadow: 0 0 10px rgba(0,245,255,0.5);
}

.nav-status {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.68rem; color: var(--green);
  letter-spacing: 0.18em;
  display: flex; align-items: center; gap: 0.5rem;
}

.pulse-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: blink 1.6s infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.2; } }

/* ── Main scroll container ── */
.scroll-container {
  display: flex; height: 100vh; height: 100svh;
  overflow-x: scroll; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior: none; outline: none;
  scrollbar-width: none;
}
.scroll-container::-webkit-scrollbar { display: none; }

/* ── Panel base ── */
.panel {
  min-width: 100vw; height: 100vh; height: 100svh;
  scroll-snap-align: start;
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 5.5rem 3rem calc(2.5rem + env(safe-area-inset-bottom));
  overflow: hidden;
}

/* HUD corner brackets */
.hud-tl, .hud-br {
  position: absolute; width: 36px; height: 36px;
  pointer-events: none; opacity: 0.35;
}
.hud-tl { top: 4.8rem; left: 2.2rem; border-top: 2px solid var(--cyan); border-left: 2px solid var(--cyan); }
.hud-br { bottom: 2.8rem; right: 2.2rem; border-bottom: 2px solid var(--cyan); border-right: 2px solid var(--cyan); }

/* Data readouts */
.dr {
  position: absolute;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.52rem; color: var(--muted);
  opacity: 0.5; letter-spacing: 0.12em; pointer-events: none;
}
.dr-tl { top: 5.2rem; left: 2.8rem; }
.dr-br { bottom: 3.2rem; right: 2.8rem; }

/* ── Panel label / section title ── */
.panel-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.68rem; letter-spacing: 0.35em;
  color: var(--cyan); text-transform: uppercase;
  margin-bottom: 0.75rem; opacity: 0.75;
}

h2 {
  font-family: 'Orbitron', monospace;
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  font-weight: 700; letter-spacing: 0.04em; line-height: 1.15;
}

/* ── Buttons ── */
.btn {
  padding: 0.7rem 1.7rem; border-radius: 3px;
  font-size: 0.8rem; font-weight: 600; cursor: pointer;
  text-decoration: none; transition: all 0.2s;
  letter-spacing: 0.12em;
  font-family: 'Orbitron', monospace; text-transform: uppercase;
}
.btn-primary {
  background: transparent; color: var(--cyan);
  border: 1px solid var(--cyan);
  box-shadow: 0 0 18px rgba(0,245,255,0.18), inset 0 0 18px rgba(0,245,255,0.04);
}
.btn-primary:hover {
  background: rgba(0,245,255,0.09);
  box-shadow: 0 0 32px rgba(0,245,255,0.4), inset 0 0 18px rgba(0,245,255,0.1);
  transform: translateY(-2px);
}
.btn-ghost {
  background: transparent; color: var(--muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--muted); transform: translateY(-2px); }

/* ════════════════════════════════════════════
   PANEL 1 — HERO
════════════════════════════════════════════ */
.panel-hero { text-align: center; }

.hero-sys {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.68rem; letter-spacing: 0.38em;
  color: var(--cyan); text-transform: uppercase;
  margin-bottom: 1.8rem; opacity: 0.75;
}
.hero-sys .dim { color: var(--muted); }

h1 {
  font-family: 'Orbitron', monospace;
  font-weight: 900; font-size: clamp(2.6rem, 7vw, 5.8rem);
  line-height: 1.05; letter-spacing: -0.02em; margin-bottom: 1.5rem;
}
h1 .line1 { color: var(--text); }
h1 .line2 {
  background: linear-gradient(135deg, var(--cyan), var(--pink));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  display: block;
  animation: textflicker 9s 4s infinite;
}
@keyframes textflicker {
  0%,94%,100% { opacity:1; }
  95% { opacity:0.6; }
  97% { opacity:1; }
  98% { opacity:0.4; }
  99% { opacity:1; }
}

.hero-sub {
  font-size: clamp(0.9rem, 1.8vw, 1.1rem);
  color: var(--muted); max-width: 500px;
  line-height: 1.8; margin: 0 auto 2.5rem;
}

.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

.hero-stats {
  display: flex; gap: 3rem; margin-top: 3rem;
  padding-top: 2rem; border-top: 1px solid var(--border);
  justify-content: center;
}
.stat-num {
  font-family: 'Orbitron', monospace;
  font-size: 2.2rem; font-weight: 900; color: var(--cyan);
  text-shadow: 0 0 18px rgba(0,245,255,0.5);
}
.stat-lbl {
  font-size: 0.6rem; color: var(--muted);
  letter-spacing: 0.22em; text-transform: uppercase;
  margin-top: 0.2rem;
  font-family: 'Share Tech Mono', monospace;
}

/* ════════════════════════════════════════════
   PANEL 2 — PROJECTS
════════════════════════════════════════════ */
.panel-projects {
  align-items: stretch; overflow: hidden; padding-top: 4.5rem; padding-bottom: calc(5cm + env(safe-area-inset-bottom));
  flex-direction: column; justify-content: flex-start;
}

.panel-hdr { text-align: center; margin-bottom: 1.5rem; flex-shrink: 0; }

.project-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 0.75rem;
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.project-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 6px; padding: 1rem 1.1rem;
  backdrop-filter: blur(20px); position: relative;
  overflow: hidden; transition: all 0.3s; cursor: default;
  min-width: 0;
}
.project-card:hover {
  border-color: var(--border-hot);
  transform: translateY(-5px);
  box-shadow: 0 0 35px rgba(0,245,255,0.08);
}
.project-card::before {
  content: ''; position: absolute;
  top: 0; left: 0; width: 55px; height: 2px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}
.card-line-v {
  position: absolute; top: 0; left: 0;
  width: 2px; height: 55px;
  background: linear-gradient(180deg, var(--cyan), transparent);
}

.card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 1rem; }
.card-ico { font-size: 1.5rem; }

.card-status {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.58rem; letter-spacing: 0.15em; text-transform: uppercase;
  padding: 0.2rem 0.55rem; border-radius: 2px;
  font-family: 'Share Tech Mono', monospace;
}
.st-live { background: rgba(57,255,20,0.07); color: #39ff14; border: 1px solid rgba(57,255,20,0.25); }
.st-dev  { background: rgba(255,150,0,0.07); color: #ff9600; border: 1px solid rgba(255,150,0,0.25); }
.st-soon { background: rgba(60,80,100,0.15); color: var(--muted); border: 1px solid var(--border); }

.dot-s { width: 4px; height: 4px; border-radius: 50%; animation: blink 1.6s infinite; }
.st-live .dot-s { background: #39ff14; box-shadow: 0 0 5px #39ff14; }
.st-dev  .dot-s { background: #ff9600; box-shadow: 0 0 5px #ff9600; }
.st-soon .dot-s { background: var(--muted); animation: none; }

.project-card h3 {
  font-family: 'Orbitron', monospace;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em;
  margin-bottom: 0.4rem; color: var(--text);
}
.project-card p { color: var(--muted); font-size: 0.73rem; line-height: 1.5; }

.card-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.6rem; }
.tag {
  font-size: 0.55rem; padding: 0.12rem 0.4rem; border-radius: 2px;
  background: rgba(0,245,255,0.04); border: 1px solid var(--border);
  color: var(--muted); letter-spacing: 0.06em;
  font-family: 'Share Tech Mono', monospace;
}

/* ════════════════════════════════════════════
   PANEL 3 — SOCIAL
════════════════════════════════════════════ */
.panel-social { align-items: flex-start; overflow-y: auto; padding-top: 4.5rem; }

.social-wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding-bottom: calc(5cm + env(safe-area-inset-bottom)); }

.social-clusters { display: grid; grid-template-columns: repeat(5,1fr); gap: 1.4rem; }

.cluster-title {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.62rem; letter-spacing: 0.28em;
  color: var(--cyan); text-transform: uppercase;
  margin-bottom: 1rem; padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--border); opacity: 0.75;
}

.soc-links { display: flex; flex-direction: column; gap: 0.55rem; }

.soc-link {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.7rem 0.9rem;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 5px; text-decoration: none; color: var(--text);
  transition: all 0.2s; position: relative; overflow: hidden;
}
.soc-link::before {
  content: ''; position: absolute;
  left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--cyan);
  transform: scaleY(0); transition: transform 0.2s;
  transform-origin: bottom;
}
.soc-link:hover { border-color: var(--border-hot); transform: translateX(5px); box-shadow: 0 0 18px rgba(0,245,255,0.07); }
.soc-link:hover::before { transform: scaleY(1); }

.soc-icon { width: 18px; height: 18px; flex-shrink: 0; fill: var(--muted); transition: fill 0.2s; }
.soc-link:hover .soc-icon { fill: var(--cyan); }

/* Platform-specific hover colors */
.soc-link.ig:hover .soc-icon { fill: #e1306c; }
.soc-link.yt:hover .soc-icon { fill: #ff0000; }
.soc-link.tt:hover .soc-icon { fill: #ff0050; }
.soc-link.tw:hover .soc-icon { fill: #9146ff; }
.soc-link.gh:hover .soc-icon { fill: #f0f6fc; }
.soc-link.sp:hover .soc-icon { fill: #1db954; }
.soc-link.fb:hover .soc-icon { fill: #1877f2; }
.soc-link.xx:hover .soc-icon { fill: #f0f0f0; }
.soc-link.up:hover .soc-icon { fill: #14a800; }

.soc-info { flex: 1; min-width: 0; }
.soc-platform { font-size: 0.58rem; color: var(--muted); letter-spacing: 0.12em; text-transform: uppercase; font-family: 'Share Tech Mono', monospace; }
.soc-handle { font-size: 0.82rem; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.soc-desc { font-size: 0.68rem; color: var(--muted); margin-top: 0.05rem; }

/* ════════════════════════════════════════════
   PANEL 4 — ABOUT
════════════════════════════════════════════ */
.panel-about { text-align: center; }

.quote-box {
  max-width: 680px; width: 100%;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 8px; padding: 3rem 3rem 2.5rem;
  backdrop-filter: blur(20px); position: relative;
  text-align: left;
}
.quote-box::before {
  content: '"'; position: absolute; top: -1rem; left: 2rem;
  font-size: 9rem; font-family: 'Orbitron', monospace;
  color: rgba(0,245,255,0.06); line-height: 1;
}
/* corner accent on quote box */
.quote-box::after {
  content: ''; position: absolute;
  bottom: 0; right: 0;
  width: 30px; height: 30px;
  border-bottom: 2px solid var(--cyan);
  border-right: 2px solid var(--cyan);
  opacity: 0.3;
}
.quote-box blockquote {
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.75; font-weight: 300; color: var(--text);
  position: relative; z-index: 1;
}
.quote-box cite {
  display: block; margin-top: 1.5rem;
  font-size: 0.78rem; color: var(--cyan); font-style: normal;
  font-family: 'Share Tech Mono', monospace; letter-spacing: 0.1em;
}

.about-btns { display: flex; gap: 1rem; margin-top: 2.5rem; justify-content: center; flex-wrap: wrap; }

.footer-line {
  position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.55rem; color: var(--muted); letter-spacing: 0.22em; white-space: nowrap; opacity: 0.6;
}

/* ── Progress bar ── */
.progress-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 2px; background: rgba(0,245,255,0.07); z-index: 100;
}
.progress-fill {
  height: 100%; width: 25%;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
  transition: width 0.3s ease;
  box-shadow: 0 0 10px var(--cyan);
}

/* ── Scroll hint ── */
.scroll-hint {
  position: fixed; bottom: 1.6rem; right: 2.8rem;
  z-index: 50;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.62rem; color: var(--muted); letter-spacing: 0.32em;
  display: flex; align-items: center; gap: 0.5rem;
  transition: opacity 0.6s;
}
.scroll-arrow { animation: arrowBounce 1.4s infinite; }
@keyframes arrowBounce {
  0%,100% { transform: translateX(0); opacity: 0.5; }
  50%      { transform: translateX(7px); opacity: 1; }
}

/* ── Neurocluster Social HUD ── */
.nc-social-hud {
  position: absolute;
  bottom: 2.2rem;
  right: 2.2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  z-index: 10;
}
.nc-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--accent);
  opacity: 0.6;
}
.nc-links {
  display: flex;
  gap: 0.6rem;
}
.nc-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.8rem;
  background: rgba(0,0,0,0.55);
  border: 1px solid var(--border);
  border-radius: 6px;
  backdrop-filter: blur(16px);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  min-width: 170px;
}
.nc-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 0 20px rgba(0,245,255,0.12);
}
.nc-preview {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,245,255,0.05);
}
.nc-preview-fb { background: rgba(0,100,255,0.08); border-color: rgba(0,100,255,0.3); }
.nc-avatar { width: 100%; height: 100%; object-fit: cover; }
.nc-info { display: flex; flex-direction: column; gap: 0.15rem; }
.nc-platform {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  opacity: 0.7;
}
.nc-handle {
  font-family: 'Orbitron', monospace;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.05em;
}
.nc-bio {
  font-size: 0.58rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

/* ══ TABLET ══ */

/* ═══════════════════════════════════════════
   TABLET  (≤900px)
═══════════════════════════════════════════ */
@media (max-width: 900px) {
  .nav-status { display: none; }
  .panel { padding: 5rem 1.5rem 2rem; }

  /* Hero */
  .hero-stats { gap: 1.5rem; flex-wrap: wrap; }
  .nc-social-hud { bottom: 1.5rem; right: 1rem; }
  .nc-links { flex-direction: column; gap: 0.4rem; }
  .nc-card { min-width: 180px; }

  /* Projects */
  .project-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: none;
    grid-auto-rows: auto;
    grid-auto-flow: row;
    flex: none;
    height: auto;
    overflow: visible;
  }
  .panel-projects { overflow-y: auto; padding-bottom: calc(3rem + env(safe-area-inset-bottom)); }

  /* Social */
  .social-clusters { grid-template-columns: repeat(2, 1fr); }
  .panel-social { overflow-y: auto; }
}

/* ═══════════════════════════════════════════
   MOBILE  (≤640px)
═══════════════════════════════════════════ */
@media (max-width: 640px) {
  nav { padding: 0.7rem 1rem; }
  .nav-logo { font-size: 0.82rem; }
  .nav-status { display: none; }

  /* Panel: scrollable + top-aligned so nothing is hidden above viewport */
  .panel {
    padding: 4.5rem 1rem 2rem;
    overflow-y: auto;
    justify-content: flex-start;
    align-items: center;
  }
  .hud-tl, .hud-br, .dr { display: none; }

  /* Hero text */
  h1 { font-size: clamp(2rem, 9vw, 3rem); margin-bottom: 1rem; }
  .hero-sub { font-size: 0.9rem; margin-bottom: 1.5rem; }
  .hero-cta { flex-direction: column; align-items: stretch; gap: 0.7rem; }
  .btn { text-align: center; padding: 0.85rem 1rem; }

  /* Stats: 2-column grid, project cards span full width */
  .hero-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    width: 100%;
  }
  .hero-stats > div { text-align: center; }
  .hero-stats .project-card { grid-column: span 2; }
  .stat-num { font-size: 1.6rem; }
  .stat-lbl { font-size: 0.55rem; }

  /* Social HUD: hidden on mobile — too large for the hero panel */
  .nc-social-hud { display: none !important; }

  /* Projects panel */
  .project-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: none;
    grid-auto-rows: auto;
    grid-auto-flow: row;
    flex: none;
    height: auto;
    overflow: visible;
    gap: 0.6rem;
  }
  .project-card[style*="grid-column: span 2"] { grid-column: span 2 !important; }
  .project-card h3 { font-size: 0.75rem; }
  .project-card[style*="grid-column: span 2"] h3 { font-size: 1rem !important; }
  .panel-projects { overflow-y: auto; padding-bottom: calc(3rem + env(safe-area-inset-bottom)); }

  /* Social panel */
  .social-clusters { grid-template-columns: 1fr; }
  .panel-social { overflow-y: auto; }

  /* Feed */
  .feed-grid { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .feed-detail.open { grid-template-columns: 1fr; }

  /* Misc */
  .quote-box { padding: 2rem 1.2rem; }
  .about-btns { flex-direction: column; }
  .footer-line { white-space: normal; text-align: center; font-size: 0.5rem; }
}

/* ═══════════════════════════════════════════
   SMALL MOBILE  (≤400px)
═══════════════════════════════════════════ */
@media (max-width: 400px) {
  h1 { font-size: 8vw; }
  .nc-card { min-width: 120px; }
  .nc-handle { font-size: 0.6rem; }
  .feed-grid { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card[style*="grid-column: span 2"] { grid-column: span 1 !important; }
}

/* ═══════════ FLAME FEED ═══════════ */
.panel-feed { justify-content: flex-start; padding-top: 7rem; overflow-y: auto; }

.feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.2rem;
  width: 100%;
  max-width: 1100px;
  padding-bottom: 3rem;
}

.feed-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,80,0,0.2);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}
.feed-card:hover { border-color: rgba(255,80,0,0.7); transform: translateY(-3px); }

.feed-card img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  display: block;
}

.feed-card-info {
  padding: 0.7rem 0.9rem;
}
.feed-card-title {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  color: #ccc;
  line-height: 1.4;
  margin-bottom: 0.3rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.feed-card-date {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  color: rgba(255,80,0,0.7);
}

.feed-loading {
  font-family: 'Share Tech Mono', monospace;
  color: rgba(255,80,0,0.5);
  font-size: 0.9rem;
  padding: 2rem 0;
}

/* Lightbox */
.feed-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.feed-lightbox.open { display: flex; }
.feed-lightbox img {
  max-height: 80vh;
  max-width: 90vw;
  object-fit: contain;
  border-radius: 6px;
}
.feed-lb-controls {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
  align-items: center;
}
.feed-lb-btn {
  background: rgba(255,80,0,0.15);
  border: 1px solid rgba(255,80,0,0.4);
  color: #fff;
  padding: 0.5rem 1.2rem;
  font-family: 'Share Tech Mono', monospace;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s;
}
.feed-lb-btn:hover { background: rgba(255,80,0,0.4); }
.feed-lb-counter { font-family: 'Share Tech Mono', monospace; color: rgba(255,80,0,0.8); font-size: 0.85rem; }
.feed-lb-close { position: absolute; top: 1.5rem; right: 2rem; font-size: 1.5rem; cursor: pointer; color: #fff; opacity: 0.6; }
.feed-lb-close:hover { opacity: 1; }

/* ═══════════ RESEARCH PANEL ═══════════ */
.feed-research {
  display: none;
  width: 100%;
  max-width: 1100px;
  margin-top: 1.5rem;
  background: rgba(255,80,0,0.04);
  border: 1px solid rgba(255,80,0,0.25);
  border-radius: 8px;
  padding: 1.8rem 2rem;
  animation: fadeIn 0.3s ease;
}
.feed-research.open { display: block; }
.feed-research-title {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  color: rgba(255,80,0,0.7);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}
.feed-research-text {
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  color: #ccc;
  line-height: 1.75;
  white-space: pre-wrap;
  margin-bottom: 1.4rem;
}
.feed-research-sources { border-top: 1px solid rgba(255,80,0,0.15); padding-top: 1rem; }
.feed-research-sources-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  color: rgba(255,80,0,0.5);
  margin-bottom: 0.6rem;
}
.feed-source-link {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  padding: 0.25rem 0;
  transition: color 0.2s;
}
.feed-source-link:hover { color: rgba(255,80,0,0.9); }
.feed-source-name { color: rgba(255,80,0,0.6); margin-right: 0.4rem; }
.feed-research-loading {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.8rem;
  color: rgba(255,80,0,0.4);
  padding: 1rem 0;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.feed-card.active-card { border-color: rgba(255,80,0,0.9); }

/* ═══════════ DETAIL PANEL ═══════════ */
.feed-detail {
  display: none;
  width: 100%;
  max-width: 1100px;
  margin-top: 1.5rem;
  gap: 2rem;
  animation: fadeIn 0.3s ease;
}
.feed-detail.open { display: grid; grid-template-columns: 1fr 1.4fr; }

.feed-detail-slides { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.feed-detail-img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(255,80,0,0.3);
  aspect-ratio: 4/5;
  object-fit: cover;
}
.feed-detail-nav {
  display: flex; gap: 1rem; align-items: center;
}
.feed-detail-btn {
  background: rgba(255,80,0,0.1);
  border: 1px solid rgba(255,80,0,0.35);
  color: #fff;
  padding: 0.4rem 1rem;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.8rem;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s;
}
.feed-detail-btn:hover { background: rgba(255,80,0,0.35); }
.feed-detail-counter {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.75rem;
  color: rgba(255,80,0,0.7);
}

.feed-detail-text { overflow-y: auto; max-height: 70vh; padding-right: 0.5rem; }
.feed-detail-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  color: rgba(255,80,0,0.6);
  letter-spacing: 0.1em;
  margin-bottom: 0.8rem;
}
.feed-detail-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.95rem;
  color: #fff;
  margin-bottom: 1.2rem;
  line-height: 1.4;
}
.feed-detail-analysis {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: #bbb;
  line-height: 1.8;
  white-space: pre-wrap;
  margin-bottom: 1.5rem;
}
.feed-detail-sources-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  color: rgba(255,80,0,0.5);
  margin-bottom: 0.5rem;
}
.feed-detail-source {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  padding: 0.3rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: color 0.2s;
}
.feed-detail-source:hover { color: rgba(255,80,0,0.9); }
.feed-detail-source-name { color: rgba(255,80,0,0.6); margin-right: 0.4rem; }
.feed-detail-pending {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.8rem;
  color: rgba(255,80,0,0.4);
  margin-top: 2rem;
}

@media (max-width: 700px) {
  .feed-detail.open { grid-template-columns: 1fr; }
}

/* Fix: Slide-Bild im Detail-Panel */
.feed-detail-slides {
  min-width: 0;
}
.feed-detail-img {
  width: 100%;
  max-width: 360px;
  height: auto;
  aspect-ratio: 4/5;
  object-fit: cover;
  display: block;
}

/* ═══════════ MOBILE FEED ═══════════ */
@media (max-width: 768px) {
  .feed-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
  }

  .feed-card-title { font-size: 0.72rem; }
  .feed-card-date  { font-size: 0.6rem; }

  .feed-detail.open {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
  }

  .feed-detail-slides {
    align-items: center;
  }

  .feed-detail-img {
    max-width: 260px;
    width: 80vw;
  }

  .feed-detail-text {
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
  }

  .feed-detail-analysis {
    font-size: 0.82rem;
  }

  .feed-detail-btn {
    padding: 0.4rem 0.7rem;
    font-size: 0.72rem;
  }
}

@media (max-width: 400px) {
  .feed-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
  }
  .feed-detail-img {
    width: 90vw;
    max-width: 100%;
  }
}

/* ═══════════ FLAME FEED PANEL ═══════════ */
.panel-feed {
  justify-content: flex-start;
  align-items: flex-start;
  padding: 6rem 2rem 3rem;
  overflow-y: auto;
  overflow-x: hidden;
}

.feed-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  width: 100%;
  max-width: 1100px;
}

.feed-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,80,0,0.2);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}
.feed-card:hover { border-color: rgba(255,80,0,0.6); transform: translateY(-3px); }
.feed-card.active-card { border-color: rgba(255,80,0,0.9); }

.feed-card-thumb { width: 100%; aspect-ratio: 4/5; overflow: hidden; }
.feed-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.feed-card-info { padding: 0.6rem 0.8rem; }
.feed-card-title {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  color: #ccc;
  line-height: 1.4;
  margin-bottom: 0.3rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.feed-card-date {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.62rem;
  color: rgba(255,80,0,0.6);
}

.feed-loading {
  font-family: 'Share Tech Mono', monospace;
  color: rgba(255,80,0,0.4);
  font-size: 0.85rem;
  padding: 2rem 0;
}

/* ── Detail Panel ── */
.feed-detail {
  display: none;
  width: 100%;
  max-width: 1100px;
  margin-top: 1.5rem;
  background: rgba(255,80,0,0.03);
  border: 1px solid rgba(255,80,0,0.2);
  border-radius: 10px;
  padding: 1.5rem;
  position: relative;
}
.feed-detail.open { display: grid; grid-template-columns: 300px 1fr; grid-template-rows: auto auto; gap: 1.5rem; }

.fd-slides { display: flex; flex-direction: column; align-items: center; gap: 0.8rem; }
.fd-img { width: 100%; border-radius: 6px; border: 1px solid rgba(255,80,0,0.3); display: block; }

.fd-nav { display: flex; gap: 0.8rem; align-items: center; }
.fd-btn {
  background: rgba(255,80,0,0.1);
  border: 1px solid rgba(255,80,0,0.35);
  color: #fff;
  padding: 0.35rem 0.8rem;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.75rem;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s;
}
.fd-btn:hover { background: rgba(255,80,0,0.35); }
.fd-counter { font-family: 'Share Tech Mono', monospace; font-size: 0.72rem; color: rgba(255,80,0,0.7); }

.fd-text { overflow-y: auto; max-height: 70vh; }
.fd-label { font-family: 'Share Tech Mono', monospace; font-size: 0.62rem; color: rgba(255,80,0,0.55); letter-spacing: 0.1em; margin-bottom: 0.6rem; }
.fd-title { font-family: 'Orbitron', sans-serif; font-size: 0.9rem; color: #fff; margin-bottom: 1rem; line-height: 1.4; }
.fd-analysis { font-family: 'Inter', sans-serif; font-size: 0.84rem; color: #bbb; line-height: 1.8; white-space: pre-wrap; margin-bottom: 1.2rem; }
.fd-src-label { font-family: 'Share Tech Mono', monospace; font-size: 0.62rem; color: rgba(255,80,0,0.45); margin-bottom: 0.5rem; }
.fd-src { display: block; font-family: 'Inter', sans-serif; font-size: 0.76rem; color: rgba(255,255,255,0.4); text-decoration: none; padding: 0.25rem 0; border-bottom: 1px solid rgba(255,255,255,0.05); transition: color 0.2s; }
.fd-src:hover { color: rgba(255,80,0,0.9); }
.fd-src-name { color: rgba(255,80,0,0.6); margin-right: 0.4rem; }
.fd-pending { font-family: 'Share Tech Mono', monospace; font-size: 0.78rem; color: rgba(255,80,0,0.35); margin-top: 1rem; }

.fd-close {
  grid-column: 1 / -1;
  background: transparent;
  border: 1px solid rgba(255,80,0,0.2);
  color: rgba(255,255,255,0.4);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.72rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 4px;
  transition: all 0.2s;
  width: 100%;
}
.fd-close:hover { border-color: rgba(255,80,0,0.6); color: #fff; }

/* ── Mobile ── */
@media (max-width: 900px) {
  .feed-grid { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
  .feed-detail.open { grid-template-columns: 1fr; }
  .fd-img { max-width: 280px; margin: 0 auto; }
  .fd-slides { width: 100%; }
  .fd-text { max-height: none; }
  .panel-feed { padding: 5rem 1rem 3rem; }
}

@media (max-width: 480px) {
  .feed-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
  .feed-card-title { font-size: 0.7rem; }
  .fd-img { max-width: 240px; }
  .fd-analysis { font-size: 0.8rem; }
}

/* ── Nav: 5 Tabs auf Mobile ── */
@media (max-width: 640px) {
  .nav-tab-row {
    gap: 0.1rem;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .nav-tab-row::-webkit-scrollbar { display: none; }
  .nav-tab {
    font-size: 0.5rem;
    padding: 0.2rem 0.45rem;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .nav-dot-row {
    gap: 4px;
  }
  .nav-dot-circle {
    width: 6px;
    height: 6px;
  }
}
