:root {
  --ink: #0f172a;
  --ink-deep: #090d16;
  --ink-card: rgba(17, 24, 39, 0.78);
  --paper: #f8fafc;
  --teal: #0d9488;
  --teal-light: #2dd4bf;
  --teal-soft: rgba(13, 148, 136, 0.15);
  --indigo: #6366f1;
  --amber: #f59e0b;
  --rose: #f43f5e;
  --emerald: #10b981;
  --border-line: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(99, 102, 241, 0.35);
  --text-primary: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --mono: 'JetBrains Mono', 'Fira Code', 'DM Mono', monospace;
  --display: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --body: 'DM Sans', 'Inter', system-ui, -apple-system, sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--ink-deep);
  color: var(--text-primary);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.6;
}

/* Ambient Háttér */
.ambient {
  position: fixed;
  z-index: 0;
  width: 50vw;
  height: 50vw;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
  pointer-events: none;
}
.ambient-teal { top: -20vw; right: -10vw; background: radial-gradient(circle, var(--teal), transparent 70%); }
.ambient-indigo { bottom: -20vw; left: -10vw; background: radial-gradient(circle, var(--indigo), transparent 70%); }

/* Fejléc / Top Bar */
.presentation-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.75rem;
  z-index: 100;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-badge {
  background: linear-gradient(135deg, var(--indigo) 0%, var(--teal) 100%);
  color: #fff;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.brand-title {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.brand-title span {
  color: var(--teal-light);
}

.chapter-track {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  overflow-x: auto;
  scrollbar-width: none;
  max-width: 60%;
}
.chapter-track::-webkit-scrollbar { display: none; }

.chapter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
}
.chapter-btn span {
  font-family: var(--mono);
  font-size: 0.72rem;
  opacity: 0.5;
}
.chapter-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}
.chapter-btn.is-active {
  color: #fff;
  background: rgba(13, 148, 136, 0.25);
  border-color: rgba(45, 212, 191, 0.4);
}
.chapter-btn.is-active span {
  color: var(--teal-light);
  opacity: 1;
}

.bar-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-family: var(--mono);
  color: var(--teal-light);
  background: var(--teal-soft);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(45, 212, 191, 0.25);
}

.status-pulse {
  width: 7px;
  height: 7px;
  background: var(--teal-light);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--teal-light);
}

/* Fő vetítőfelület */
.slide-stage {
  position: absolute;
  top: 64px;
  bottom: 60px;
  left: 0;
  right: 0;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 10;
  padding: 2.5rem;
  display: flex;
  justify-content: center;
}

.slide {
  display: none;
  width: 100%;
  max-width: 1200px;
  margin: auto 0;
  animation: fadeInSlide 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.slide.active {
  display: block;
}

@keyframes fadeInSlide {
  from { opacity: 0; transform: translateY(12px) scale(0.995); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Slide fejléc elemek */
.slide-header {
  margin-bottom: 2rem;
  position: relative;
}

.slide-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal-light);
  margin-bottom: 0.6rem;
}

.slide-title {
  font-family: var(--display);
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 0.75rem;
}

.slide-title .gradient-text {
  background: linear-gradient(135deg, #fff 0%, var(--teal-light) 60%, var(--indigo) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.slide-lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 800px;
  line-height: 1.6;
}

/* Prezentációs kártyák és rácsok */
.deck-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 1.5rem;
}

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

.deck-grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.deck-card {
  background: var(--ink-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  position: relative;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.deck-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-glow);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
}

.deck-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-line);
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  margin-bottom: 1.25rem;
}

.deck-card h3 {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}

.deck-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

/* EAV Interaktív Kiemelések */
.eav-pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  text-transform: uppercase;
  margin-right: 0.4rem;
}
.eav-pill.e { background: rgba(99, 102, 241, 0.2); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.3); }
.eav-pill.a { background: rgba(45, 212, 191, 0.2); color: #2dd4bf; border: 1px solid rgba(45, 212, 191, 0.3); }
.eav-pill.v { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }

/* Bachman Ábra Stílus */
.diagram-canvas {
  background: rgba(9, 13, 22, 0.9);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: inset 0 0 60px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.diagram-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.diagram-box {
  background: #131c2e;
  border: 1px solid var(--border-line);
  border-top: 3px solid var(--teal-light);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.4rem;
  min-width: 190px;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.diagram-box.gold { border-top-color: var(--amber); }
.diagram-box.indigo { border-top-color: var(--indigo); }
.diagram-box.rose { border-top-color: var(--rose); }

.diagram-box h4 {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.3rem;
}

.diagram-box span {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.diagram-connector {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--teal-light);
  background: var(--teal-soft);
  padding: 0.3rem 0.7rem;
  border-radius: 9999px;
  border: 1px solid rgba(45, 212, 191, 0.3);
}

/* Táblázatok */
.data-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-line);
  border-radius: var(--radius-md);
  background: #0d121f;
  margin-top: 1rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.data-table th {
  background: rgba(255, 255, 255, 0.03);
  color: var(--teal-light);
  padding: 0.85rem 1rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-line);
}

.data-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  color: #e2e8f0;
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.badge-pk {
  background: rgba(244, 63, 94, 0.2);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.35);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.68rem;
}

.badge-fk {
  background: rgba(56, 189, 248, 0.2);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.68rem;
}

/* Kódkártya (SQL) */
.code-card {
  background: #090d16;
  border: 1px solid var(--border-line);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: 1rem;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-line);
  gap: 0.5rem;
  flex-wrap: wrap;
}

.code-badge {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--teal-light);
  font-weight: 600;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.action-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-line);
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.action-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}
.action-btn.run-btn {
  background: rgba(13, 148, 136, 0.2);
  border-color: rgba(45, 212, 191, 0.4);
  color: var(--teal-light);
  font-weight: 600;
}
.action-btn.run-btn:hover {
  background: var(--teal-light);
  color: var(--ink-deep);
}

.query-result-box {
  display: none;
  background: #070a10;
  border-top: 1px solid var(--border-line);
  padding: 1rem 1.25rem;
  max-height: none;
  overflow: visible;
}
.query-result-box.has-result {
  display: block;
}

.custom-console {
  background: #090d16;
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-top: 1rem;
}

.console-textarea {
  width: 100%;
  height: 110px;
  background: #05080e;
  border: 1px solid var(--border-line);
  border-radius: var(--radius-sm);
  color: #e2e8f0;
  font-family: var(--mono);
  font-size: 0.85rem;
  padding: 0.85rem;
  resize: vertical;
  line-height: 1.5;
  margin-bottom: 0.85rem;
}
.console-textarea:focus {
  outline: none;
  border-color: var(--teal-light);
}

.console-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.presets-select {
  background: #111827;
  color: #e2e8f0;
  border: 1px solid var(--border-line);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.75rem;
  font-size: 0.82rem;
  font-family: var(--mono);
}

pre {
  padding: 1.25rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.55;
  color: #e2e8f0;
}

.kw { color: #f472b6; font-weight: 600; }
.fn { color: #38bdf8; }
.st { color: #a3e635; }
.cm { color: #64748b; font-style: italic; }

/* Alsó Vezérlősáv (Presenter Controls) */
.presenter-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(9, 13, 22, 0.9);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.75rem;
  z-index: 100;
}

.meter-line {
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.05);
}

.meter-fill {
  width: 10%;
  height: 100%;
  background: linear-gradient(90deg, var(--teal-light), var(--indigo));
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.nav-arrow-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-line);
  color: #fff;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}
.nav-arrow-btn:hover {
  background: var(--teal-light);
  color: var(--ink-deep);
  border-color: var(--teal-light);
}

.deck-counter {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-muted);
}
