:root {
  --bg: #0f172a;
  --bg-soft: #1e293b;
  --bg-card: #1e293b;
  --surface: #334155;
  --primary: #38bdf8;
  --primary-dark: #0ea5e9;
  --accent: #a78bfa;
  --accent-2: #f472b6;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --border: #334155;
  --success: #34d399;
  --danger: #f87171;
  --warning: #fbbf24;
  --nav-bg: rgba(15, 23, 42, 0.85);
  --glow-1: rgba(56, 189, 248, 0.15);
  --glow-2: rgba(167, 139, 250, 0.12);
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-tech: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
}

[data-theme="light"] {
  --bg: #eef2f7;
  --bg-soft: #e2e8f0;
  --bg-card: #ffffff;
  --surface: #e2e8f0;
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --accent: #7c3aed;
  --accent-2: #db2777;
  --text: #0f172a;
  --text-muted: #475569;
  --border: #cbd5e1;
  --success: #059669;
  --danger: #dc2626;
  --warning: #d97706;
  --nav-bg: rgba(255, 255, 255, 0.82);
  --glow-1: rgba(2, 132, 199, 0.12);
  --glow-2: rgba(124, 58, 237, 0.1);
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
}

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

html, body {
  height: 100%;
}

body {
  font-family: var(--font-sans);
  background:
    radial-gradient(1200px 600px at 10% -10%, var(--glow-1), transparent),
    radial-gradient(1000px 500px at 110% 10%, var(--glow-2), transparent),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}

a {
  color: var(--primary);
  text-decoration: none;
}

/* ---------- Navigacijska vrstica ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--text);
}

.brand .logo {
  width: 40px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #0f172a;
  font-family: var(--font-tech);
  font-weight: 800;
  font-size: 0.95rem;
}

.nav-links {
  display: flex;
  gap: 0.4rem;
  list-style: none;
}

.nav-links a {
  padding: 0.5rem 0.9rem;
  border-radius: 9px;
  color: var(--text-muted);
  font-weight: 500;
  font-family: var(--font-tech);
  transition: all 0.18s ease;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--surface);
}

.nav-links a.active {
  color: var(--text);
  background: var(--surface);
}

/* ---------- Theme toggle ---------- */
.nav-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.theme-toggle {
  position: relative;
  width: 54px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.theme-toggle .thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  transition: transform 0.25s cubic-bezier(0.4, 0.1, 0.3, 1.4), background 0.25s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .theme-toggle .thumb {
  transform: translateX(24px);
}

.theme-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

/* ---------- Container ---------- */
.container {
  
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ---------- Uvodna stran ---------- */
.hero {
  text-align: center;
  padding: 3.5rem 1rem 2.5rem;
}

.hero .badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid rgba(56, 189, 248, 0.25);
  margin-bottom: 1.2rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.12;
  font-weight: 800;
  font-family: var(--font-tech);
  letter-spacing: -0.5px;
  background: linear-gradient(120deg, var(--text), var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  max-width: 640px;
  margin: 1.2rem auto 0;
  color: var(--text-muted);
  font-size: 1.08rem;
}

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

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.card .icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  font-family: var(--font-tech);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #0f172a;
  font-weight: 800;
}

.card h3 {
  font-size: 1.2rem;
  font-family: var(--font-tech);
}

.card p {
  color: var(--text-muted);
  flex-grow: 1;
}

.card .btn {
  align-self: flex-start;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.1rem;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #0f172a;
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  background: var(--surface);
}

.info-strip {
  margin-top: 3rem;
  padding: 1.5rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  text-align: center;
}

.info-strip strong {
  color: var(--text);
}

/* ---------- Slideshow ---------- */
.slide-deck {
  position: relative;
  min-height: 60vh;
}

.slide {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.2rem 2.4rem;
  box-shadow: var(--shadow);
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.slide .slide-tag {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(56, 189, 248, 0.1);
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
}

.slide h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.2;
  font-family: var(--font-tech);
  letter-spacing: -0.3px;
}

.slide h3 {
  font-size: 1.15rem;
  color: var(--accent);
  margin-top: 0.6rem;
  font-family: var(--font-tech);
}

.slide p {
  color: var(--text);
}

.slide ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.slide ul li {
  position: relative;
  padding-left: 1.4rem;
  color: var(--text-muted);
}

.slide ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--primary);
}

.slide ul li strong {
  color: var(--text);
}

.slide table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.slide th,
.slide td {
  text-align: left;
  padding: 0.6rem 0.7rem;
  border-bottom: 1px solid var(--border);
}

.slide th {
  color: var(--accent);
  font-weight: 700;
}

.slide td {
  color: var(--text-muted);
}

.slide code {
  background: #0b1220;
  padding: 0.1rem 0.4rem;
  border-radius: 5px;
  font-size: 0.88em;
  color: var(--primary);
  font-family: var(--font-mono);
}

.slide pre {
  background: #0b1220;
  padding: 1rem 1.1rem;
  border-radius: 10px;
  overflow-x: auto;
  border: 1px solid var(--border);
  font-size: 0.86rem;
}

.slide pre code {
  background: none;
  padding: 0;
  color: #e2e8f0;
}

.slide .two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.slide .qr-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.slide .qr-block img {
  background: #fff;
  padding: 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  max-width: 100%;
  height: auto;
}

.slide .qr-block a {
  font-family: "JetBrains Mono", "Fira Code", monospace;
  font-size: 0.92rem;
}

.slide .img-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.slide .img-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.4rem;
}

.slide .img-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.slide .img-item img {
  background: #fff;
  padding: 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  max-width: 100%;
  max-height: 340px;
  height: auto;
}

.slide .img-item img.img-badge {
  padding: 0.4rem;
  max-height: 170px;
}

.slide .img-item figcaption {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

.slide .img-caption {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

@media (max-width: 720px) {
  .slide .two-col {
    grid-template-columns: 1fr;
  }
}

.slide-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.2rem;
  gap: 1rem;
}

.slide-progress {
  flex-grow: 1;
  height: 6px;
  border-radius: 999px;
  background: var(--surface);
  overflow: hidden;
}

.slide-progress > div {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.3s ease;
}

.slide-dots {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 0.8rem;
}

.slide-dots button {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: none;
  background: var(--surface);
  cursor: pointer;
  padding: 0;
  transition: background 0.18s ease;
}

.slide-dots button.active {
  background: var(--primary);
}

.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.fade-enter-from {
  opacity: 0;
  transform: translateX(20px);
}

.fade-leave-to {
  opacity: 0;
  transform: translateX(-20px);
}

/* ---------- Kviz ---------- */
.quiz-wrap {
  max-width: 760px;
  margin: 0 auto;
}

.quiz-progress {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
  color: var(--text-muted);
  font-weight: 600;
}

.quiz-progress .bar {
  flex-grow: 1;
  margin-left: 1rem;
  height: 6px;
  border-radius: 999px;
  background: var(--surface);
  overflow: hidden;
}

.quiz-progress .bar > div {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.3s ease;
}

.question-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: var(--shadow);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.question-card h2 {
  font-size: 1.25rem;
  margin-bottom: 1.2rem;
  font-family: var(--font-tech);
}

.options {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.option {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  background: transparent;
  color: var(--text);
  text-align: left;
  font: inherit;
  transition: all 0.16s ease;
}

.option:hover:not(:disabled) {
  border-color: var(--primary);
  background: rgba(56, 189, 248, 0.06);
}

.option .marker {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: var(--surface);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.option.correct {
  border-color: var(--success);
  background: rgba(52, 211, 153, 0.12);
}

.option.correct .marker {
  background: var(--success);
  color: #0f172a;
}

.option.wrong {
  border-color: var(--danger);
  background: rgba(248, 113, 113, 0.12);
}

.option.wrong .marker {
  background: var(--danger);
  color: #0f172a;
}

.option:disabled {
  cursor: default;
}

.feedback {
  margin-top: 1.1rem;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  background: var(--bg-soft);
}

.feedback.ok {
  border-color: var(--success);
  background: rgba(52, 211, 153, 0.08);
}

.feedback.bad {
  border-color: var(--danger);
  background: rgba(248, 113, 113, 0.08);
}

.quiz-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.3rem;
}

.result-card {
  text-align: center;
  padding: 2.4rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.result-card .score {
  font-size: 3rem;
  font-weight: 800;
  font-family: var(--font-tech);
  background: linear-gradient(120deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.result-card .verdict {
  color: var(--text-muted);
  margin: 0.6rem 0 1.4rem;
}

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  padding: 1.6rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

@media (max-width: 640px) {
  .navbar {
    flex-wrap: wrap;
  }
  .nav-right {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .theme-label {
    display: none;
  }
  .container {
    padding: 1.4rem 1rem 3rem;
  }
  .slide {
    padding: 1.5rem 1.3rem;
  }
}
