/* MyGPT Modern Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&family=Fira+Code:wght@400;500&display=swap');

/* CSS Custom Properties for Dark/Light Themes */
:root {
  /* Default: Dark Theme */
  --bg-primary: #0f171c;        /* Deep slate/dark gray-blue */
  --bg-secondary: #182229;      /* Chat panel background */
  --bg-tertiary: #212e36;       /* Document library background */
  --bg-card: rgba(24, 34, 41, 0.85);
  --text-primary: #f3f4f6;      /* Off-white */
  --text-secondary: #a0aec0;    /* Muted gray-blue */
  --text-muted: #718096;        /* Deeper muted */
  --accent-cyan: #4ade80;       /* QRS/ARS green highlights */
  --accent-cyan-hover: #22d3ee;
  --accent-blue: #3b82f6;       /* Primary buttons */
  --accent-blue-hover: #60a5fa;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(59, 130, 246, 0.2);
  --shadow-neon: 0 0 30px rgba(59, 130, 246, 0.1);
  --gradient-primary: linear-gradient(135deg, #1d2d3a 0%, #2b3e4a 100%);
  --gradient-text: linear-gradient(135deg, #f3f4f6 0%, #a0aec0 100%);
  --header-bg: rgba(15, 23, 28, 0.94);
  --header-border: rgba(255, 255, 255, 0.08);
  --nav-link-color: rgba(255, 255, 255, 0.72);
  --nav-link-active: #ffffff;
  --nav-btn-bg: rgba(255, 255, 255, 0.1);
  --nav-btn-border: rgba(255, 255, 255, 0.2);
  --nav-btn-text: #ffffff;
  --nav-btn-hover-bg: rgba(255, 255, 255, 0.18);
  --nav-badge-bg: rgba(255, 255, 255, 0.18);
  --card-blur: blur(16px);
  --code-bg: #111827;
  --code-text: #e2e8f0;
}

[data-theme="light"] {
  /* Light Theme */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #e2e8f0;       /* Light blue-gray container */
  --bg-card: rgba(255, 255, 255, 0.95);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --accent-cyan: #16a34a;       /* Green score */
  --accent-cyan-hover: #15803d;
  --accent-blue: #2563eb;       /* Blue buttons */
  --accent-blue-hover: #1d4ed8;
  --border-color: rgba(0, 0, 0, 0.08);
  --border-glow: rgba(37, 99, 235, 0.15);
  --shadow-neon: 0 10px 30px rgba(37, 99, 235, 0.08);
  --gradient-primary: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  --gradient-text: linear-gradient(135deg, #0f172a 0%, #334155 100%);
  --header-bg: rgba(255, 255, 255, 0.94);
  --header-border: rgba(0, 0, 0, 0.08);
  --nav-link-color: #475569;
  --nav-link-active: #0f172a;
  --nav-btn-bg: rgba(15, 23, 42, 0.06);
  --nav-btn-border: rgba(15, 23, 42, 0.14);
  --nav-btn-text: #0f172a;
  --nav-btn-hover-bg: rgba(15, 23, 42, 0.12);
  --nav-badge-bg: rgba(15, 23, 42, 0.08);
  --card-blur: blur(12px);
  --code-bg: #f1f5f9;
  --code-text: #0f172a;
}

/* Global Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
  width: 100%;
}

img {
  max-width: 100%;
  height: auto;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.25;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-cyan-hover);
}

/* Shared Components & Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header & Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: var(--header-bg);
  backdrop-filter: var(--card-blur);
  -webkit-backdrop-filter: var(--card-blur);
  border-bottom: 1px solid var(--header-border);
  transition: background-color 0.3s ease, border-color 0.3s ease, padding 0.3s ease;
}

.header-active {
  padding: 0.5rem 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  margin-right: 1.5rem;
}

.logo img {
  height: 2.25rem;
  width: auto;
}

header .logo {
  background: linear-gradient(135deg, #22d3ee 0%, #ffffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] header .logo {
  background: linear-gradient(135deg, #0284c7 0%, #0f172a 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--nav-link-color);
  position: relative;
  padding: 0.35rem 0;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--nav-link-active);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* GitHub Nav Button */
.nav-github-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.42rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 9999px;
  background: var(--nav-btn-bg);
  border: 1px solid var(--nav-btn-border);
  color: var(--nav-btn-text) !important;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-github-btn:hover {
  background: var(--nav-btn-hover-bg);
  border-color: var(--nav-link-active);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nav-github-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.nav-github-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--nav-badge-bg);
  color: var(--nav-btn-text);
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: var(--nav-btn-bg);
  border: 1px solid var(--nav-btn-border);
  color: var(--nav-link-color);
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  background-color: var(--nav-btn-hover-bg);
  color: var(--nav-link-active);
  border-color: var(--nav-btn-border);
}

.theme-toggle-btn svg {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 1.5rem;
  height: 1.1rem;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1010;
}

.hamburger span {
  width: 100%;
  height: 2px;
  background-color: var(--nav-link-active);
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  transform-origin: center;
}

.hamburger span.active:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger span.active:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger span.active:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hero Section & Background Artwork */
.hero {
  padding: 9rem 0 6rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1600px;
  height: 100%;
  min-height: 560px;
  pointer-events: none;
  z-index: 0;
  user-select: none;
  overflow: hidden;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.hero-bg-light {
  display: none;
}

[data-theme="light"] .hero-bg-dark {
  display: none;
}

[data-theme="light"] .hero-bg-light {
  display: block;
}

/* Ambient Radial Glow (Eliminates old flat gray box with multi-stop vibrant optical blur) */
.hero-ambient-glow,
.hero-glow {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70vw;
  max-width: 900px;
  height: 440px;
  background: radial-gradient(ellipse at center, rgba(6, 182, 212, 0.22) 0%, rgba(59, 130, 246, 0.14) 38%, rgba(16, 185, 129, 0.05) 65%, transparent 75%);
  filter: blur(55px);
  border-radius: 50%;
  z-index: 1;
  pointer-events: none;
}

[data-theme="light"] .hero-ambient-glow,
[data-theme="light"] .hero-glow {
  background: radial-gradient(ellipse at center, rgba(37, 99, 235, 0.12) 0%, rgba(2, 132, 199, 0.08) 38%, rgba(22, 163, 74, 0.04) 65%, transparent 75%);
  filter: blur(55px);
}

.badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.2);
  color: var(--accent-cyan);
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero h1 {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.gradient-title {
  background: linear-gradient(135deg, #ffffff 15%, #f1f5f9 50%, #67e8f9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 18px rgba(6, 182, 212, 0.2));
}

[data-theme="light"] .gradient-title {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #0284c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: none;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 750px;
  margin: 0 auto 2.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #ffffff;
  border: none;
  box-shadow: var(--shadow-neon);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(6, 182, 212, 0.3);
}

.btn-secondary {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--bg-secondary);
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
}

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

/* Sections */
.section {
  padding: 6rem 0;
  border-bottom: 1px solid var(--border-color);
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.1rem;
}

/* Cards & Layouts */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.card {
  background-color: var(--bg-card);
  backdrop-filter: var(--card-blur);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 2.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--border-glow);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2), var(--shadow-neon);
}

.card-icon {
  width: 3.5rem;
  height: 3.5rem;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  margin-bottom: 1.5rem;
}

.card h3 {
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

.card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Interactive RAG Simulator - High-Fidelity UI Mockup Visualizer */
.simulator-controls {
  max-width: 1000px;
  margin: 0 auto 2rem auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 1.25rem 1.5rem;
  border-radius: 0.75rem;
}

.simulator-controls .sim-input-group {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.simulator-controls label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.simulator-controls select {
  padding: 0.65rem 1rem;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
}

.mygpt-mockup {
  width: 1000px;
  max-width: 100%;
  margin: 0 auto;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  font-family: 'Inter', sans-serif;
  border-collapse: collapse;
}

/* Mockup Header */
.mockup-header {
  background-color: var(--header-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 0.6rem 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 3.5rem;
  box-sizing: border-box;
}

.mockup-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mockup-logo {
  width: 1.8rem;
  height: 1.8rem;
  object-fit: contain;
}

.mockup-brand {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: #ffffff;
}

.mockup-header-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

.mockup-nav-item {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.2s ease;
}

.mockup-nav-item:hover {
  color: #ffffff;
}

.mockup-theme-icon svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.mockup-user-pill {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 0.35rem 1rem;
  border-radius: 50px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Light theme overrides for mockup (keeping header light text) */
[data-theme="light"] .mockup-user-pill {
  background-color: rgba(255, 255, 255, 0.15);
}

/* Workspace Panels */
.mockup-workspace {
  display: flex;
  height: 480px;
  background-color: var(--bg-primary);
}

.mockup-panel {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  border-right: 1px solid var(--border-color);
  box-sizing: border-box;
}

.mockup-panel:last-child {
  border-right: none;
}

/* Panel 1: Chat Column */
.panel-chat {
  width: 32%;
  background-color: var(--bg-secondary);
  padding: 1.2rem;
}

.panel-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-family: 'Outfit', sans-serif;
  color: var(--text-primary);
}

.panel-subtitle {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
  line-height: 1.4;
}

.mockup-field {
  margin-bottom: 0.85rem;
}

.mockup-field label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.mockup-select {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.25rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.mockup-select svg {
  width: 0.65rem;
  height: 0.65rem;
  fill: currentColor;
}

.mockup-textarea-container {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 6rem;
  margin-top: 0.5rem;
  box-sizing: border-box;
}

.mockup-textarea {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
  height: 3.5rem;
  overflow: hidden;
}

.mockup-textarea.typed {
  color: var(--text-primary);
}

.mockup-send-btn {
  align-self: flex-end;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 1.8rem;
  height: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.mockup-send-btn.active {
  background-color: var(--accent-blue);
  color: #ffffff;
  border-color: var(--accent-blue);
}

.mockup-toggle-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 1rem;
}

.mockup-switch {
  width: 1.8rem;
  height: 1rem;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  position: relative;
}

.mockup-switch::after {
  content: '';
  width: 0.7rem;
  height: 0.7rem;
  background-color: var(--text-muted);
  border-radius: 50%;
  position: absolute;
  top: 0.1rem;
  left: 0.1rem;
  transition: transform 0.2s ease;
}

/* Chat History elements inside Mockup */
.chat-history-mode {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
}

.chat-bubble {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  border-radius: 0.5rem;
  padding: 0.8rem;
  box-sizing: border-box;
}

.bubble-user {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
}

.bubble-assistant {
  background-color: rgba(59, 130, 246, 0.03);
  border: 1px solid rgba(59, 130, 246, 0.1);
}

[data-theme="light"] .bubble-user {
  background-color: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .bubble-assistant {
  background-color: rgba(43, 108, 176, 0.05);
}

.bubble-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bubble-sender {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
}

.bubble-badges {
  display: flex;
  gap: 0.4rem;
}

.bubble-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  line-height: 1;
}

.badge-qrs {
  background-color: rgba(74, 222, 128, 0.1);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.2);
}

.badge-ars {
  background-color: rgba(74, 222, 128, 0.1);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.2);
}

.badge-hi {
  background-color: rgba(249, 115, 22, 0.1);
  color: #f97316;
  border: 1px solid rgba(249, 115, 22, 0.2);
}

.bubble-text {
  font-size: 0.82rem;
  color: var(--text-primary);
  line-height: 1.4;
}

/* Thinking accordion panel inside mockup */
.thinking-panel {
  border: 1px solid var(--border-color);
  border-radius: 0.25rem;
  overflow: hidden;
  margin: 0.3rem 0;
  background-color: var(--bg-primary);
}

.thinking-header {
  padding: 0.4rem 0.6rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.thinking-indicator {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.thinking-spinner {
  width: 0.6rem;
  height: 0.6rem;
  border: 2px solid var(--text-muted);
  border-top-color: var(--text-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: none;
}

.thinking-spinner.active {
  display: inline-block;
}

.thinking-toggle-btn {
  color: var(--accent-blue);
}

.thinking-steps {
  padding: 0.5rem 0.6rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 100px;
  overflow-y: auto;
  box-sizing: border-box;
}

.thinking-step-item {
  font-size: 0.7rem;
  font-family: 'Fira Code', monospace;
  color: var(--text-secondary);
  line-height: 1.3;
}

.thinking-step-item.highlight {
  color: var(--accent-cyan);
}

.assistant-answer {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

/* Sources inside mockup */
.sources-section {
  border-top: 1px solid var(--border-color);
  margin-top: 0.8rem;
  padding-top: 0.6rem;
}

.sources-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

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

.source-item {
  background-color: var(--bg-primary);
  border-radius: 0.25rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.source-item.high {
  background-color: rgba(74, 222, 128, 0.08);
  color: #4ade80;
  border-left: 3px solid #4ade80;
}

.source-item.medium {
  background-color: rgba(249, 115, 22, 0.08);
  color: #f97316;
  border-left: 3px solid #f97316;
}

.source-item:hover, .source-item.active {
  border-color: var(--text-muted);
}

.source-context-box {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 0.25rem;
  padding: 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.72rem;
  line-height: 1.35;
}

.context-header {
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.context-text {
  color: var(--text-secondary);
}

/* Panel 2: Library Column */
.panel-library {
  width: 25%;
  background-color: var(--bg-tertiary);
  padding: 1.2rem;
}

.library-filters {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}

.library-badge-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.library-badge {
  background-color: #ef4444; /* red tag matching first screenshot */
  color: #ffffff;
  padding: 0.15rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.library-settings-icon {
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
}

.library-settings-icon svg {
  width: 0.85rem;
  height: 0.85rem;
  fill: currentColor;
}

.library-dropdowns {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.half {
  flex: 1;
}

.document-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  overflow-y: auto;
  flex-grow: 1;
  padding-right: 2px;
}

.document-item {
  font-size: 0.74rem;
  padding: 0.55rem 0.65rem;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 0.25rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.3;
}

.document-item:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.05);
}

.document-item.active {
  background-color: #2c3e50;
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-weight: 600;
}

[data-theme="light"] .document-item {
  background-color: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .document-item.active {
  background-color: #4a5568;
  color: #ffffff;
}

/* Panel 3: PDF Viewer Column */
.panel-viewer {
  width: 43%;
  background-color: #7f8c9d; /* Gray-blue background matching first screenshot */
  padding: 0;
}

[data-theme="light"] .panel-viewer {
  background-color: #cbd5e1;
}

.viewer-header {
  background-color: rgba(0,0,0,0.1);
  padding: 0.4rem 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 2.2rem;
  border-bottom: 1px solid rgba(0,0,0,0.15);
  box-sizing: border-box;
}

.viewer-controls-left, .viewer-controls-right {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.viewer-btn {
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem;
  opacity: 0.85;
}

.viewer-btn:hover {
  opacity: 1;
}

.viewer-btn svg {
  width: 0.8rem;
  height: 0.8rem;
  fill: currentColor;
}

.zoom-value, .page-number-display {
  font-size: 0.72rem;
  color: #ffffff;
  font-weight: 600;
}

.pdf-container {
  padding: 1.2rem;
  overflow-y: auto;
  height: calc(100% - 2.2rem);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  box-sizing: border-box;
}

.pdf-page {
  background-color: #ffffff;
  color: #1a202c;
  width: 100%;
  min-height: 400px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  font-size: 0.65rem;
  line-height: 1.4;
  font-family: 'Times New Roman', Times, serif; /* paper format style */
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.pdf-header-title {
  text-align: center;
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
  border-bottom: 1px solid #1a202c;
  padding-bottom: 0.25rem;
  margin-bottom: 0.75rem;
}

.pdf-title {
  font-size: 0.9rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  text-align: left;
  line-height: 1.2;
}

.pdf-authors {
  font-size: 0.58rem;
  font-style: italic;
  margin-bottom: 0.5rem;
}

.pdf-abstract {
  font-weight: bold;
  margin-bottom: 0.4rem;
}

.pdf-highlight {
  border-radius: 2px;
  padding: 0 1px;
}

.pdf-highlight.green {
  background-color: #bbf7d0; /* Soft green */
}

.pdf-highlight.yellow {
  background-color: #fef08a; /* Soft yellow */
}

.pdf-flash {
  animation: flash-highlight 1.5s ease;
}

@keyframes flash-highlight {
  0% { transform: scale(1); filter: brightness(1.2); }
  50% { filter: brightness(1.6); box-shadow: 0 0 8px rgba(74, 222, 128, 0.5); }
  100% { transform: scale(1); filter: brightness(1); }
}

/* Mockup Footer */
.mockup-footer {
  background-color: var(--header-bg);
  border-top: 1px solid var(--border-color);
  padding: 0.4rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 2rem;
  font-size: 0.7rem;
  color: var(--text-secondary);
  box-sizing: border-box;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.footer-logo {
  width: 0.9rem;
  height: 0.9rem;
}

.footer-center {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.status-dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
}

.status-dot.green {
  background-color: #22c55e;
  box-shadow: 0 0 6px #22c55e;
}

/* Spinner Rotate Animation */
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Keyframes for text typing effect */
.cursor-blink::after {
  content: '|';
  animation: blink 0.8s steps(2, start) infinite;
}

@keyframes blink {
  to { visibility: hidden; }
}

/* Responsive adjustments for mockup */
@media (max-width: 992px) {
  .simulator-controls {
    flex-direction: column;
    align-items: stretch;
  }
  .mockup-workspace {
    flex-direction: column;
    height: auto;
  }
  .panel-chat, .panel-library, .panel-viewer {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  .panel-viewer {
    border-bottom: none;
  }
  .pdf-container {
    height: 350px;
  }
}

/* Installation Tabs */
.tabs-container {
  max-width: 900px;
  margin: 0 auto;
}

.tabs-nav {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
  gap: 1.5rem;
  overflow-x: auto;
  padding-bottom: 2px;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 0.75rem 0;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  color: var(--text-primary);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient-primary);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* Code block styles */
pre {
  background-color: var(--code-bg);
  color: var(--code-text);
  padding: 1.25rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  font-family: 'Fira Code', 'Courier New', Courier, monospace;
  font-size: 0.9rem;
  border: 1px solid var(--border-color);
  position: relative;
  margin: 1rem 0;
}

code {
  font-family: 'Fira Code', 'Courier New', Courier, monospace;
}

.copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  background-color: var(--accent-cyan);
  color: #fff;
  border-color: var(--accent-cyan);
}

/* FAQ Page Styles */
.faq-search-box {
  max-width: 600px;
  margin: 0 auto 3rem;
  position: relative;
}

.faq-search-input {
  width: 100%;
  padding: 1rem 1.5rem 1rem 3rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  box-shadow: var(--shadow-neon);
  transition: all 0.3s ease;
}

.faq-search-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.2);
}

.faq-search-icon {
  position: absolute;
  top: 50%;
  left: 1.25rem;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  width: 1.25rem;
  height: 1.25rem;
}

.faq-section {
  margin-bottom: 4rem;
}

.faq-section h3 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--accent-cyan);
}

.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Modern Accessible details-based Accordion */
details.faq-item {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

details.faq-item[open] {
  border-color: var(--accent-cyan);
}

details.faq-item summary {
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  outline: none;
}

details.faq-item summary::-webkit-details-marker {
  display: none;
}

details.faq-item summary::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--accent-cyan);
  font-weight: 400;
  transition: transform 0.2s ease;
}

details.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-content {
  padding: 0 1.5rem 1.5rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1.25rem;
  color: var(--text-secondary);
}

.faq-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 1rem 0;
  border: 1px solid var(--border-color);
}

.faq-content ul, .faq-content ol {
  padding-left: 1.5rem;
  margin: 0.75rem 0;
}

.faq-content li {
  margin-bottom: 0.5rem;
}

.faq-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.faq-content th, .faq-content td {
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  text-align: left;
}

.faq-content th {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  font-weight: 600;
}

/* API Page Layout (2-Column) */
.api-container {
  display: flex;
  margin-top: 4.5rem;
  min-height: calc(100vh - 4.5rem);
}

.api-sidebar {
  width: 320px;
  border-right: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  position: fixed;
  top: 4.5rem;
  bottom: 0;
  left: 0;
  padding: 1.5rem;
  overflow-y: auto;
  z-index: 10;
}

.api-content {
  margin-left: 320px;
  flex: 1;
  padding: 3rem;
  max-width: 900px;
}

.api-search {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  margin-bottom: 1.5rem;
}

.api-search:focus {
  border-color: var(--accent-cyan);
}

.api-sidebar-group {
  margin-bottom: 1.5rem;
}

.api-sidebar-group h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.api-sidebar-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.api-sidebar-item a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.api-sidebar-item.active a, .api-sidebar-item a:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

.api-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.35rem;
  border-radius: 0.2rem;
  text-transform: uppercase;
}

.api-badge-get {
  background-color: rgba(59, 130, 246, 0.1);
  color: var(--accent-blue);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.api-badge-post {
  background-color: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.api-badge-multipart {
  background-color: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.api-endpoint-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 2rem;
  margin-bottom: 3rem;
  scroll-margin-top: 6.5rem;
}

.api-endpoint-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.api-endpoint-header h3 {
  font-size: 1.5rem;
}

.api-endpoint-path {
  font-family: 'Fira Code', monospace;
  font-size: 1rem;
  background-color: var(--bg-primary);
  padding: 0.35rem 0.75rem;
  border-radius: 0.35rem;
  border: 1px solid var(--border-color);
}

/* Contact Page Styles */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  align-items: start;
}

.contact-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 2.5rem;
  box-shadow: var(--shadow-neon);
}

.contact-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.contact-card p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  list-style: none;
}

.contact-info-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.contact-info-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(6, 182, 212, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
}

.contact-form {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-group input, .form-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-group input:focus, .form-group textarea:focus {
  border-color: var(--accent-cyan);
}

/* Footer */
footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem 2rem;
  list-style: none;
}

.footer-links a {
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-copyright {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Badge Group & Pills */
.badge-group {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 9999px;
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.28);
  color: var(--accent-cyan);
  text-decoration: none;
  transition: all 0.2s ease;
}

.badge-pill:hover {
  transform: translateY(-1px);
}

.badge-pill.badge-purple {
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.28);
  color: #c084fc;
}

.badge-pill.badge-blue {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.28);
  color: #60a5fa;
}

.badge-pill.badge-amber {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.28);
  color: #fbbf24;
}

/* Screenshot & Capabilities Showcase */
.showcase-featured-card {
  margin-top: 2.5rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.showcase-featured-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-neon);
}

.showcase-featured-img-wrap {
  background: var(--bg-tertiary);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
  position: relative;
  cursor: zoom-in;
}

.showcase-featured-img-wrap:focus-visible,
.showcase-img-wrap:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

.showcase-featured-img-wrap img {
  width: 100%;
  max-height: 480px;
  object-fit: contain;
  border-radius: 0.5rem;
  transition: transform 0.3s ease;
  background-color: var(--bg-primary);
}

.showcase-featured-card:hover .showcase-featured-img-wrap img {
  transform: scale(1.01);
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.showcase-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
}

.showcase-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-neon);
}

.showcase-img-wrap {
  background: var(--bg-tertiary);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
  position: relative;
  cursor: zoom-in;
}

.showcase-img-wrap img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  border-radius: 0.5rem;
  transition: transform 0.3s ease;
  background-color: var(--bg-primary);
}

.showcase-card:hover .showcase-img-wrap img {
  transform: scale(1.02);
}

/* Showcase Full Screen Badge / Overlay */
.showcase-expand-badge {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(15, 23, 28, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 2rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease, background-color 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  z-index: 2;
}

[data-theme="light"] .showcase-expand-badge {
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  border: 1px solid rgba(0, 0, 0, 0.14);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.showcase-card:hover .showcase-expand-badge,
.showcase-featured-img-wrap:focus-visible .showcase-expand-badge,
.showcase-img-wrap:focus-visible .showcase-expand-badge {
  opacity: 1;
  transform: translateY(0);
}

@media (hover: none) {
  .showcase-expand-badge {
    opacity: 0.88;
    transform: translateY(0);
  }
}

/* Showcase Fullscreen Lightbox Modal */
.showcase-lightbox {
  border: none;
  padding: 0;
  background: transparent;
  width: min(1200px, 94vw);
  max-height: 94vh;
  margin: auto;
  border-radius: 1.25rem;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.85), 0 0 40px rgba(59, 130, 246, 0.25);
  overflow: hidden;
  outline: none;
}

.showcase-lightbox::backdrop {
  background: rgba(8, 12, 18, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

[data-theme="light"] .showcase-lightbox::backdrop {
  background: rgba(15, 23, 42, 0.72);
}

.lightbox-dialog-inner {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glow);
  border-radius: 1.25rem;
  display: flex;
  flex-direction: column;
  max-height: 94vh;
  overflow: hidden;
  animation: lightboxScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.75rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-card);
  gap: 1.25rem;
}

.lightbox-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.lightbox-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lightbox-header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.lightbox-counter {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  padding: 0.35rem 0.75rem;
  border-radius: 1rem;
  border: 1px solid var(--border-color);
}

.lightbox-close-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 0.5rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lightbox-close-btn:hover {
  background: var(--accent-blue);
  color: #ffffff;
  border-color: var(--accent-blue);
  transform: translateY(-1px);
}

.lightbox-close-btn kbd {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: 0.25rem;
  padding: 0.1rem 0.4rem;
  font-size: 0.72rem;
  font-family: inherit;
  color: inherit;
}

[data-theme="light"] .lightbox-close-btn kbd {
  background: rgba(0, 0, 0, 0.08);
}

.lightbox-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  padding: 1.5rem 4rem;
  min-height: 280px;
  max-height: 68vh;
  overflow: hidden;
}

.lightbox-img-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img-wrap img {
  max-width: 100%;
  max-height: 64vh;
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(15, 23, 28, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 3;
}

[data-theme="light"] .lightbox-nav-btn {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.15);
  color: #0f172a;
}

.lightbox-prev-btn {
  left: 1rem;
}

.lightbox-next-btn {
  right: 1rem;
}

.lightbox-nav-btn:hover {
  background: var(--accent-blue);
  color: #ffffff;
  border-color: var(--accent-blue);
  transform: translateY(-50%) scale(1.08);
}

.lightbox-footer {
  padding: 1.1rem 1.75rem;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.lightbox-desc {
  font-size: 0.925rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.lightbox-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

@keyframes lightboxScaleIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 768px) {
  .lightbox-stage {
    padding: 1rem 0.5rem;
  }
  .lightbox-nav-btn {
    width: 38px;
    height: 38px;
  }
  .lightbox-prev-btn {
    left: 0.5rem;
  }
  .lightbox-next-btn {
    right: 0.5rem;
  }
  .lightbox-header {
    padding: 1rem;
  }
  .lightbox-title {
    font-size: 1.05rem;
  }
  .lightbox-close-text,
  .lightbox-close-btn kbd {
    display: none;
  }
  .lightbox-close-btn {
    padding: 0.45rem;
  }
  .lightbox-footer {
    padding: 1rem;
  }
}

.showcase-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.showcase-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-cyan);
  margin-bottom: 0.5rem;
}

.showcase-content h3 {
  font-size: 1.25rem;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
}

.showcase-content p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Research & Citation Section */
.citation-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 2.5rem;
  box-shadow: var(--shadow-neon);
  margin-top: 2rem;
  text-align: left;
}

.citation-paper-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  line-height: 1.35;
}

.citation-authors {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.citation-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.doi-badge-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa !important;
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.doi-badge-link:hover {
  background: rgba(59, 130, 246, 0.25);
  color: #93c5fd !important;
  transform: translateY(-1px);
}

.in-press-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 600;
}

.bibtex-wrapper {
  position: relative;
  background: var(--code-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  overflow: hidden;
  margin-top: 1.25rem;
}

.bibtex-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.bibtex-code {
  padding: 1.25rem;
  margin: 0;
  overflow-x: auto;
  font-family: 'Fira Code', monospace;
  font-size: 0.82rem;
  color: var(--code-text);
  line-height: 1.6;
}

.eval-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.eval-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  text-align: left;
}

.eval-card h4 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.eval-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Responsive Tables */
.table-responsive,
.api-content-body table,
.faq-content table {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1rem 0;
  border-collapse: collapse;
}

/* ==========================================================================
   Responsive Web Design System (Desktop, Tablet, Mobile)
   ========================================================================== */

/* Keyframe for mobile drawer slide-in */
@keyframes slideDownNav {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   Medium Tablets & Small Laptops (<= 992px)
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
  .hero h1 {
    font-size: 2.85rem;
    line-height: 1.2;
  }

  .section {
    padding: 4.5rem 0;
  }

  .section-header {
    margin-bottom: 3rem;
  }

  .section-header h2 {
    font-size: 2.2rem;
  }

  .card-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
  }

  .simulator-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
  }

  .mockup-workspace {
    flex-direction: column;
    height: auto;
  }

  .panel-chat,
  .panel-library,
  .panel-viewer {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }

  .panel-viewer {
    border-bottom: none;
  }

  .pdf-container {
    height: 350px;
  }

  .api-container {
    flex-direction: column;
  }

  .api-sidebar {
    width: 100%;
    position: relative;
    top: 0;
    bottom: auto;
    left: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    max-height: 280px;
    padding: 1.25rem;
  }

  .api-content {
    margin-left: 0;
    padding: 2.5rem 1.5rem;
    max-width: 100%;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* --------------------------------------------------------------------------
   Tablet & Mobile Navigation Breakpoint (<= 900px)
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 4.5rem;
    left: 0;
    width: 100%;
    background-color: var(--header-bg);
    backdrop-filter: var(--card-blur);
    -webkit-backdrop-filter: var(--card-blur);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    padding: 1.5rem;
    gap: 0.5rem;
    display: none;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.25);
    max-height: calc(100vh - 4.5rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 999;
  }

  .nav-menu.open {
    display: flex;
    animation: slideDownNav 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  .nav-menu li {
    width: 100%;
  }

  .nav-link {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: background-color 0.2s ease, color 0.2s ease;
  }

  .nav-link:hover,
  .nav-link.active {
    background-color: var(--bg-tertiary);
    color: var(--accent-cyan);
  }

  .nav-link::after {
    display: none;
  }

  .nav-github-btn .nav-github-text {
    display: none;
  }

  .showcase-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .citation-card {
    padding: 1.75rem;
  }
}

/* --------------------------------------------------------------------------
   Tablets (Portrait) & Larger Phones (<= 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .container {
    padding: 0 1.25rem;
  }

  .hero {
    padding: 6.5rem 0 3.5rem !important;
  }

  .hero-ambient-glow,
  .hero-glow {
    width: 90vw;
    height: 320px;
    top: 32%;
    filter: blur(45px);
  }

  .hero-bg {
    min-height: 480px;
  }

  .hero h1 {
    font-size: 2.25rem;
    line-height: 1.22;
    margin-bottom: 1.15rem;
  }

  .hero p {
    font-size: 1.05rem;
    line-height: 1.55;
    margin-bottom: 2rem;
  }

  .section {
    padding: 3.75rem 0;
  }

  .section-header {
    margin-bottom: 2.25rem;
  }

  .section-header h2 {
    font-size: 1.85rem;
  }

  .section-header p {
    font-size: 0.95rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .card {
    padding: 1.75rem 1.25rem;
  }

  .card-icon {
    width: 3rem;
    height: 3rem;
    margin-bottom: 1rem;
  }

  .card h3 {
    font-size: 1.25rem;
  }

  .showcase-featured-img-wrap {
    padding: 1rem;
  }

  .showcase-featured-img-wrap img {
    max-height: 320px;
  }

  .showcase-img-wrap {
    padding: 1rem;
  }

  .showcase-img-wrap img {
    height: 190px;
  }

  .showcase-content {
    padding: 1.25rem 1.15rem;
  }

  .tabs-nav {
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
  }

  .tabs-nav::-webkit-scrollbar {
    display: none;
  }

  .tab-btn {
    font-size: 0.95rem;
    padding: 0.6rem 0.25rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  pre {
    padding: 1rem;
    font-size: 0.82rem;
  }

  .citation-card {
    padding: 1.5rem 1.25rem;
  }

  .citation-paper-title {
    font-size: 1.2rem;
  }

  .citation-authors {
    font-size: 0.85rem;
    line-height: 1.5;
  }

  .bibtex-code {
    font-size: 0.76rem;
    padding: 1rem;
  }

  .eval-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .faq-search-box {
    margin-bottom: 2rem;
  }

  .faq-search-input {
    font-size: 0.95rem;
    padding: 0.85rem 1.25rem 0.85rem 2.75rem;
  }

  details.faq-item summary {
    padding: 1rem 1.25rem;
    font-size: 1rem;
    min-height: 48px;
  }

  .faq-content {
    padding: 0 1.25rem 1.25rem;
    font-size: 0.9rem;
  }

  .api-content {
    padding: 2rem 1rem;
  }

  .api-endpoint-card {
    padding: 1.5rem 1.25rem;
    margin-bottom: 2rem;
  }

  .contact-card,
  .contact-form {
    padding: 1.75rem 1.25rem;
  }

  .footer-links {
    gap: 1rem 1.5rem;
    font-size: 0.875rem;
  }
}

/* --------------------------------------------------------------------------
   Mobile Phones (<= 480px, including 360px - 414px)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .nav-container {
    height: 4rem;
  }

  .nav-menu {
    top: 4rem;
    max-height: calc(100vh - 4rem);
    padding: 1rem;
    gap: 0.35rem;
  }

  .logo {
    font-size: 1.25rem;
    gap: 0.5rem;
    margin-right: 0.35rem;
  }

  .logo img {
    height: 1.85rem;
  }

  .nav-actions {
    gap: 0.4rem;
  }

  .nav-github-btn {
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
  }

  .nav-github-badge {
    font-size: 0.68rem;
    padding: 0.05rem 0.35rem;
  }

  .theme-toggle-btn {
    width: 2.1rem;
    height: 2.1rem;
  }

  .theme-toggle-btn svg {
    width: 1rem;
    height: 1rem;
  }

  .hamburger {
    width: 1.35rem;
    height: 0.95rem;
  }

  .hero {
    padding: 5.25rem 0 2.25rem !important;
  }

  .hero-ambient-glow,
  .hero-glow {
    width: 96vw;
    height: 260px;
    top: 30%;
    filter: blur(35px);
  }

  .hero-bg {
    min-height: 400px;
  }

  .badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
    margin-bottom: 1rem;
  }

  .hero h1 {
    font-size: 1.85rem;
    line-height: 1.22;
    margin-bottom: 0.85rem;
    letter-spacing: -0.01em;
  }

  .hero p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1.75rem;
  }

  .badge-group {
    gap: 0.35rem;
  }

  .badge-pill {
    font-size: 0.72rem;
    padding: 0.25rem 0.65rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
  }

  .hero-actions .btn {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  .section {
    padding: 3rem 0;
  }

  .section-header {
    margin-bottom: 1.75rem;
  }

  .section-header h2 {
    font-size: 1.6rem;
  }

  .section-header p {
    font-size: 0.88rem;
  }

  .showcase-featured-card {
    margin-top: 1.25rem;
    border-radius: 0.75rem;
  }

  .showcase-featured-img-wrap {
    padding: 0.75rem;
  }

  .showcase-featured-img-wrap img {
    max-height: 220px;
  }

  .showcase-card {
    border-radius: 0.75rem;
  }

  .showcase-img-wrap {
    padding: 0.75rem;
  }

  .showcase-img-wrap img {
    height: 165px;
  }

  .showcase-content {
    padding: 1.15rem 0.9rem;
  }

  .showcase-content h3 {
    font-size: 1.15rem;
  }

  .showcase-content p {
    font-size: 0.85rem;
  }

  .showcase-expand-badge {
    bottom: 0.5rem;
    right: 0.5rem;
    padding: 0.3rem 0.65rem;
    font-size: 0.72rem;
  }

  .simulator-controls {
    padding: 0.85rem;
    gap: 0.85rem;
  }

  .simulator-controls select,
  .simulator-controls button {
    font-size: 0.85rem;
    padding: 0.65rem;
  }

  .mygpt-mockup {
    border-radius: 0.5rem;
  }

  .mockup-header {
    padding: 0.5rem 0.75rem;
    height: 3.2rem;
  }

  .mockup-brand {
    font-size: 1.05rem;
  }

  .mockup-logo {
    width: 1.5rem;
    height: 1.5rem;
  }

  .mockup-header-right .mockup-nav-item:not(.mockup-user-pill) {
    display: none;
  }

  .mockup-user-pill {
    padding: 0.25rem 0.6rem;
    font-size: 0.72rem;
  }

  .panel-chat {
    padding: 0.85rem;
  }

  .panel-title {
    font-size: 1.05rem;
  }

  .chat-history {
    max-height: 200px;
  }

  .panel-library {
    padding: 0.85rem;
    max-height: 220px;
  }

  .panel-viewer {
    min-height: 280px;
  }

  .pdf-container {
    height: 280px;
    padding: 0.5rem;
  }

  .pdf-page {
    padding: 0.65rem;
    font-size: 0.68rem;
  }

  .card {
    padding: 1.25rem 1rem;
    border-radius: 0.75rem;
  }

  .card h3 {
    font-size: 1.15rem;
  }

  .card p {
    font-size: 0.88rem;
  }

  .tabs-nav {
    gap: 0.65rem;
  }

  .tab-btn {
    font-size: 0.88rem;
  }

  pre {
    padding: 0.85rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 0.375rem;
  }

  .copy-btn {
    top: 0.35rem;
    right: 0.35rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.68rem;
  }

  .citation-card {
    padding: 1.25rem 1rem;
    border-radius: 0.75rem;
  }

  .citation-paper-title {
    font-size: 1.05rem;
  }

  .citation-authors {
    font-size: 0.78rem;
  }

  .bibtex-code {
    font-size: 0.7rem;
    padding: 0.75rem;
  }

  .faq-search-input {
    font-size: 0.88rem;
    padding: 0.75rem 1rem 0.75rem 2.25rem;
  }

  details.faq-item summary {
    padding: 0.85rem 1rem;
    font-size: 0.92rem;
  }

  .faq-content {
    padding: 0 1rem 1rem;
    font-size: 0.85rem;
  }

  .api-content {
    padding: 1.25rem 0.75rem;
  }

  .api-endpoint-card {
    padding: 1rem 0.75rem;
    border-radius: 0.5rem;
  }

  .api-endpoint-header h3 {
    font-size: 1.15rem;
  }

  .api-endpoint-path {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    word-break: break-all;
  }

  .contact-card,
  .contact-form {
    padding: 1.25rem 1rem;
    border-radius: 0.75rem;
  }

  .form-group input,
  .form-group textarea {
    font-size: 16px;
    padding: 0.75rem;
  }

  footer {
    padding: 2.5rem 0 1.5rem;
  }

  .footer-links {
    gap: 0.65rem 1rem;
    font-size: 0.82rem;
  }

  .footer-copyright {
    font-size: 0.75rem;
  }
}
