/* =============================================
   Apetice - shared stylesheet
   apete.hr/a/[kod]/
   Mobile-first, Inter font, Apete green brand
   ============================================= */

:root {
  --green: #4CAF50;
  --green-dark: #2E7D32;
  --green-darker: #1B5E20;
  --blue: #006799;
  --dark: #0f172a;
  --dark-card: #1e293b;
  --border: #334155;
  --light: #f8fafc;
  --text: #1a1a1a;
  --text-muted: #64748b;
  --radius: 12px;
  --shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--light);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Site header (isti kao apete.hr) ── */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.header.scrolled {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  padding: 4px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
}

.nav-links a:hover {
  color: #ffffff;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: #4CAF50;
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.3);
}

.btn-primary:hover {
  background: #2E7D32;
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(34, 197, 94, 0.4);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #0f172a;
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li a {
    font-size: 1.1rem;
    padding: 12px 0;
    display: block;
    width: 100%;
    text-align: center;
  }

  .mobile-menu-btn {
    display: block;
  }
}

/* ── Layout ── */

.joker-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

/* ── Header (full-width dark, outside .joker-wrap) ── */

.joker-header {
  background: var(--dark);
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.joker-header .logo img {
  height: 28px;
  width: auto;
  display: block;
}

.breadcrumb {
  font-size: 0.8rem;
  font-weight: 500;
  color: #94a3b8;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.2s;
  white-space: nowrap;
}

.breadcrumb:hover {
  color: var(--green);
}

/* ── Code badge ── */

.joker-code {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  font-family: 'SFMono-Regular', Consolas, monospace;
  letter-spacing: 0.12em;
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 0.75rem;
}

/* ── Hero (full-width, outside .joker-wrap) ── */

.joker-hero {
  background: linear-gradient(135deg, var(--dark) 0%, #1e3a5f 100%);
  padding: calc(76px + 3.5rem) 1.5rem 4rem;
  color: white;
}

.joker-hero-inner {
  max-width: 640px;
  margin: 0 auto;
}

.joker-hero h1 {
  font-size: clamp(1.6rem, 6vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.65rem;
}

.joker-hero h1 span {
  color: var(--green);
}

.joker-hero .subtitle {
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  color: #94a3b8;
  margin-bottom: 2rem;
  line-height: 1.6;
  max-width: 500px;
}

.hero-scroll {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: #475569;
  text-decoration: none;
  margin-top: 2rem;
  transition: color 0.2s;
}

.hero-scroll:hover {
  color: var(--green);
}

/* ── Keyboard visual ── */

.key-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

kbd.key {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  background: #1e293b;
  border: 1px solid var(--border);
  border-bottom: 3px solid #0a0f1a;
  border-radius: 7px;
  padding: 0.4rem 0.7rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: #cbd5e1;
  min-width: 60px;
  text-align: center;
  cursor: default;
  user-select: none;
  font-style: normal;
  transition: transform 0.2s ease-out, border-bottom-width 0.2s ease-out;
}

kbd.key:active {
  transform: translateY(2px);
  border-bottom-width: 1px;
  transition: transform 0.06s ease-in, border-bottom-width 0.06s ease-in;
}

kbd.key .key-sub {
  font-size: 0.6rem;
  font-weight: 400;
  color: #475569;
  letter-spacing: 0;
}

kbd.key.key-enter {
  border-color: var(--green);
  border-bottom-color: var(--green-darker);
  color: #86efac;
}

kbd.key.key-esc {
  border-color: #ef4444;
  border-bottom-color: #7f1d1d;
  color: #fca5a5;
}

kbd.key.key-space {
  min-width: 90px;
  font-size: 0.75rem;
  color: #f59e0b;
  border-color: #78350f;
  border-bottom-color: #3d1a00;
}

kbd.key.key-win {
  border-color: #0078d4;
  border-bottom-color: #003a6e;
  color: #60a5fa;
}

/* ── Production Placeholder ── */
.prod-placeholder {
  background: linear-gradient(145deg, #f8fafc, #f1f5f9);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  margin: 1.5rem 0;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.prod-placeholder-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  opacity: 0.4;
}

.prod-placeholder-title {
  color: #475569;
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.prod-placeholder-desc {
  color: #64748b;
  font-size: 0.85rem;
  max-width: 280px;
  line-height: 1.4;
}

/* ── Video section ── */

.video-section {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.video-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  padding: 0.85rem 1rem 0.6rem;
}

.video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--dark-card);
}

.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  color: #475569;
}

.video-placeholder .play-icon {
  width: 52px;
  height: 52px;
  background: #1e293b;
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  padding-left: 3px;
  /* optical centering of play triangle */
}

.video-placeholder p {
  font-size: 0.78rem;
  font-weight: 500;
}

/* ── Tips list ── */

.tips-section {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.tips-section .section-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.tip-item {
  display: flex;
  gap: 0.85rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid #f1f5f9;
  align-items: flex-start;
}

.tip-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.tip-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
  margin-top: 0.05rem;
  line-height: 1;
}

.tip-text strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  color: var(--text);
}

.tip-text p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── CTA button ── */

.cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  background: var(--green);
  color: white;
  text-align: center;
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 1.5rem;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.cta-btn:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
}

.cta-btn:active {
  transform: translateY(0);
  box-shadow: none;
}

/* ── Footer ── */

/* ── Verdict boxes (DA / NE) ── */

.verdict-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}

.verdict-box {
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1.35rem;
  border: 1.5px solid transparent;
}

.verdict-yes {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.verdict-no {
  background: #fef2f2;
  border-color: #fecaca;
}

.verdict-mine {
  background: #fffbeb;
  border-color: #fde68a;
}

.verdict-idea {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.verdict-label {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.verdict-yes .verdict-label {
  color: #15803d;
}

.verdict-no .verdict-label {
  color: #dc2626;
}

.verdict-mine .verdict-label {
  color: #b45309;
}

.verdict-idea .verdict-label {
  color: #1d4ed8;
}

.verdict-box p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text);
}

@media (max-width: 768px) {
  .verdict-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Steps list (korak po korak) ── */

.steps-list {
  list-style: none;
  padding: 0;
  margin: 0.6rem 0 0;
}

.steps-list li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.65rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.steps-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.step-num-circle {
  width: 1.75rem;
  height: 1.75rem;
  min-width: 1.75rem;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.1rem;
}

.step-title {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.step-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Related jokers ── */

.joker-related {
  background: linear-gradient(to bottom, var(--dark) 0%, #0a0f1a 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 2.5rem 1.25rem 3rem;
  margin-top: 2.5rem;
  position: relative;
}

.joker-related::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(76, 175, 80, 0.3), transparent);
}

.related-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 1.25rem;
  text-align: center;
}

.related-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-width: 480px;
  margin: 0 auto;
}

.related-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: linear-gradient(145deg, var(--dark-card), #141c2b);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.85rem 1.1rem;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

a.related-card:hover {
  border-color: rgba(76, 175, 80, 0.5);
  background: linear-gradient(145deg, #162318, #0e150f);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(76, 175, 80, 0.1);
}

.related-code {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  color: #86efac;
  background: rgba(76, 175, 80, 0.15);
  border: 1px solid rgba(76, 175, 80, 0.2);
  padding: 0.25em 0.6em;
  border-radius: 6px;
  flex-shrink: 0;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.related-title {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  flex: 1;
  transition: color 0.2s;
}

a.related-card:hover .related-title {
  color: #fff;
}

.related-soon .related-code,
.related-soon .related-title {
  opacity: 0.4;
}

.related-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
  background: rgba(251, 191, 36, 0.05);
  border-radius: 6px;
  padding: 0.2em 0.5em;
  flex-shrink: 0;
}

.related-arrow {
  color: rgba(255, 255, 255, 0.2);
  font-size: 1.1rem;
  transition: all 0.25s;
  transform: translateX(-4px);
  opacity: 0;
}

a.related-card:hover .related-arrow {
  color: var(--green);
  transform: translateX(0);
  opacity: 1;
}

.related-soon .related-arrow {
  display: none;
}

/* ── Footer ── */

.joker-footer {
  text-align: center;
  font-size: 0.73rem;
  color: var(--text-muted);
  padding: 1.1rem 1rem 1rem;
  border-top: 1px solid #e2e8f0;
}

.joker-footer a {
  color: var(--green);
  text-decoration: none;
}

.joker-footer a:hover {
  text-decoration: underline;
}

/* ── Warn box (upozorenje za laptop) ── */

.warn-box {
  background: #fffbeb;
  border: 1.5px solid #fbbf24;
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.75rem;
}

.warn-box-header {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 0.6rem;
}

.warn-box p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: #78350f;
  margin-bottom: 0.5rem;
}

.warn-box p:last-child {
  margin-bottom: 0;
}

.warn-box code {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.82em;
  background: rgba(255, 255, 255, 0.8);
  padding: 0.1em 0.4em;
  border-radius: 3px;
  color: #92400e;
  border: 1px solid #fcd34d;
}

/* ── F4 ciklus (2×2 grid) ── */

.f4-cycle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin: 0.85rem 0;
}

.f4-step {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.8rem 0.75rem;
  text-align: center;
}

.f4-step .step-num {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.f4-step .step-ref {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.3rem;
  line-height: 1;
}

.f4-step .dollar {
  color: var(--green-dark);
}

.f4-step .step-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.f4-step.active {
  border-color: #3b82f6;
  background: #eff6ff;
}

.f4-step.active .step-ref {
  color: #1d4ed8;
}

.f4-step.active .dollar {
  color: #16a34a;
}

/* ── F4 interaktivni demo ── */

.f4-demo {
  background: var(--dark-card);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1rem;
  margin-bottom: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  text-align: center;
}

.f4-demo-formula {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 1.5rem;
  font-weight: 600;
  color: #475569;
  background: #0f172a;
  padding: 0.6rem 1.5rem;
  border-radius: 6px;
  letter-spacing: 0.03em;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.f4-demo-ref {
  color: #f1f5f9;
  font-weight: 700;
  display: inline-block;
}

.f4-demo-ref .dollar {
  color: #4ade80;
}

.f4-demo-key {
  cursor: pointer;
  font-size: 1.05rem;
  padding: 0.55rem 1.6rem;
  min-width: 90px;
  border-color: #3b82f6;
  border-bottom-color: #1e3a8a;
  color: #93c5fd;
}

.f4-demo-label {
  font-size: 0.8rem;
  color: #94a3b8;
  min-height: 1.2em;
}

.f4-demo-hint {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 1.25rem;
  font-style: italic;
}

@keyframes f4Flash {
  0% {
    color: #60a5fa;
    transform: scale(1.22);
  }

  100% {
    color: #f1f5f9;
    transform: scale(1);
  }
}

.f4-demo-ref.f4-flash {
  animation: f4Flash 0.3s ease-out forwards;
}

/* ── Tablica množenja ── */

.mult-table-wrap {
  overflow-x: auto;
  margin: 0.85rem 0;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.mult-table {
  border-collapse: collapse;
  font-size: 0.85rem;
  min-width: 220px;
  width: 100%;
}

.mult-table th,
.mult-table td {
  text-align: center;
  vertical-align: middle;
  padding: 0.55rem 0.5rem;
}

.mult-table .th-corner {
  background: var(--dark);
}

.mult-table .th-num {
  background: var(--dark);
  color: #93c5fd;
  font-weight: 700;
  font-family: 'SFMono-Regular', Consolas, monospace;
}

.mult-table td {
  border: 1px solid #e2e8f0;
  color: #1e293b;
  font-weight: 500;
  background: #f8fafc;
}

.mult-table tbody tr:nth-child(even) td {
  background: #f1f5f9;
}

.mult-table .xl-rn-corner,
.mult-table .xl-col,
.mult-table .xl-rn {
  background: #d1d5db;
  color: #4b5563;
  font-size: 0.7rem;
  font-weight: 600;
  font-family: 'SFMono-Regular', Consolas, monospace;
  padding: 0.25rem 0.45rem;
}

.mult-table td {
  cursor: default;
}

.mult-table td.cell-f {
  background: #eff6ff;
  font-size: 0.65rem;
  font-family: 'SFMono-Regular', Consolas, monospace;
  color: #1e40af;
  font-weight: 600;
}

.mult-table .cfd {
  color: #16a34a;
  font-weight: 700;
}

.mult-table .xl-col {
  border-bottom: 1px solid #9ca3af;
  border-right: 1px solid #b0b7bf;
}

.mult-table .xl-rn {
  border-right: 1px solid #9ca3af;
  border-bottom: 1px solid #b0b7bf;
}

.mult-table .xl-rn-corner {
  position: relative;
  border-bottom: 1px solid #9ca3af;
  border-right: 1px solid #9ca3af;
}

.mult-table .xl-rn-corner::after {
  content: '';
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  background: #9ca3af;
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

/* ── CTRLS interactive demo ── */

.ctrls-demo {
  background: var(--dark-card);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1rem;
  margin: 1.2rem 0;
}

.ctrls-demo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin-bottom: 0.9rem;
}

.ctrls-demo-table thead th {
  background: #0f172a;
  color: #94a3b8;
  font-size: 0.7rem;
  font-weight: 600;
  text-align: left;
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid #334155;
}

.ctrls-demo-table tbody tr {
  cursor: pointer;
  transition: background 0.1s;
}

.ctrls-demo-table tbody td {
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid #334155;
  color: #cbd5e1;
}

.ctrls-demo-table tbody tr:hover td {
  background: #263548;
}

.ctrls-demo-table tbody tr.ctrls-selected td {
  background: #1e3a5f;
  color: #93c5fd;
}

.ctrls-demo-table tbody tr.ctrls-empty td {
  color: #475569;
  font-style: italic;
}

.ctrls-demo-btns {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}

.ctrls-btn {
  cursor: pointer;
  transition: opacity 0.15s;
}

.ctrls-reset {
  background: none;
  border: 1px solid #334155;
  color: #64748b;
  font-size: 0.75rem;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
}

.ctrls-reset:hover {
  color: #94a3b8;
  border-color: #475569;
}

.ctrls-hint {
  font-size: 0.75rem;
  color: #475569;
  margin-top: 0.6rem;
  font-style: italic;
  min-height: 1.2em;
}

/* ── Pain intro callout ── */

.pain-intro {
  background: #fff7ed;
  border-left: 3px solid #f59e0b;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.1rem 1.25rem;
  margin-bottom: 2rem;
}

.pain-intro p {
  font-size: 0.92rem;
  line-height: 1.75;
  color: #78350f;
  margin-bottom: 0;
}

.pain-intro p+p {
  margin-top: 0.55rem;
}

/* ── Rule cards (deep dive) ── */

.rule-card,
details.rule-accordion {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.75rem;
  overflow: hidden;
}

.rule-header {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
}

.rule-num {
  width: 28px;
  height: 28px;
  background: var(--dark);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}

.rule-header h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.2;
}

.rule-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin: 0.15rem 0 0;
  font-weight: 400;
}

.rule-header kbd.key {
  margin-left: auto;
  min-width: 44px;
  padding: 0.4rem 0.65rem;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.rule-header kbd.key .key-sub {
  display: none;
}

.rule-body {
  padding: 1.1rem 1.25rem 1.35rem;
}

.rule-body>p {
  font-size: 0.91rem;
  line-height: 1.75;
  color: #334155;
  margin-bottom: 0.8rem;
}

.rule-body>p:last-child {
  margin-bottom: 0;
}

.rule-body code {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.82em;
  background: #f1f5f9;
  padding: 0.1em 0.4em;
  border-radius: 3px;
  color: var(--dark);
  border: 1px solid #e2e8f0;
}

/* ── Example box ── */

.example-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.9rem 1rem;
  margin: 0.85rem 0;
}

.example-label {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  margin-bottom: 0.55rem;
}

.example-box p {
  font-size: 0.91rem;
  line-height: 1.75;
  color: #475569;
  margin-bottom: 0.35rem;
}

.example-box p:last-child {
  margin-bottom: 0;
}

.example-bad {
  color: #dc2626 !important;
  font-weight: 500;
}

.example-good {
  color: var(--green-dark) !important;
  font-weight: 500;
}

.example-box code {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.82em;
  background: #e2e8f0;
  padding: 0.1em 0.4em;
  border-radius: 3px;
  color: var(--dark);
}

/* ── Bonus box ── */

.bonus-box {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 1px solid #86efac;
  border-radius: var(--radius);
  padding: 1.35rem 1.25rem;
  margin-bottom: 1.75rem;
}

.bonus-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--green-dark);
  margin-bottom: 0.55rem;
}

.bonus-box h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--green-darker);
  margin-bottom: 0.6rem;
  line-height: 1.3;
}

.bonus-box p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: #166534;
  margin-bottom: 0.6rem;
}

.bonus-box p:last-child {
  margin-bottom: 0;
}

.formula-chip {
  display: inline-block;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.95rem;
  font-weight: 600;
  background: var(--green-dark);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
  margin: 0.25rem 0 0.6rem;
}

.bonus-box code {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.82em;
  background: rgba(255, 255, 255, 0.65);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  color: var(--green-darker);
  border: 1px solid #86efac;
}

/* ── Physical card preview ── */

.card-preview-section {
  margin-bottom: 1.75rem;
}

.card-preview-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

.card-preview-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.card-preview-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}

.card-preview-item img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.13);
  border: 1px solid #e2e8f0;
  display: block;
  cursor: zoom-in;
  transition: transform 0.15s ease;
}

.card-preview-item img:hover {
  transform: scale(1.02);
}

.card-preview-item span {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── Lightbox ── */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.88);
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  cursor: zoom-out;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 88vh;
  border-radius: 10px;
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.6);
  cursor: default;
  object-fit: contain;
  background: #ffffff;
}

.lightbox-close {
  position: fixed;
  top: 1rem;
  right: 1.25rem;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
  background: none;
  border: none;
  padding: 0.25rem 0.5rem;
}

.lightbox-close:hover {
  opacity: 1;
}

/* ── Share button ── */

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  background: white;
  border: 1.5px solid #e2e8f0;
  color: var(--text-muted);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.85rem 1.5rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
  margin-bottom: 0.75rem;
}

.share-btn:hover {
  border-color: var(--green);
  color: var(--green-dark);
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.12);
}

.share-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

/* ── Card OG thumbnail (j/index.html grid) ── */

.card-og {
  width: 100%;
  aspect-ratio: 40 / 21;
  overflow: hidden;
  background: var(--dark-card);
  position: relative;
}

.card-og img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.joker-card:hover .card-og img {
  transform: scale(1.03);
}

.card-og-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  font-family: 'SFMono-Regular', Consolas, monospace;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, #1e293b, #0f172a);
}

/* ── Responsive ── */

@media (min-width: 520px) {
  .joker-wrap {
    padding: 1.75rem 2rem 4rem;
  }

  .joker-hero h1 {
    font-size: 1.6rem;
  }
}

@media (min-width: 900px) {
  .joker-wrap {
    padding: 2.5rem 2rem 5rem;
  }

  .joker-hero {
    padding: calc(76px + 2.5rem) 2rem 2.5rem;
  }

  .joker-hero h1 {
    font-size: 1.85rem;
  }

  .tips-section {
    padding: 1.5rem 1.75rem;
  }
}

@media (min-width: 1500px) {
  .joker-wrap {
    max-width: 1024px;
  }
}

/* ===== Footer (from global) ===== */
.footer {
  background: #0a0f1a;
  color: #ffffff;
  padding: 80px 0 24px;
}

.footer a {
  text-decoration: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-about .logo {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 700;
  font-size: 1.5rem;
}

.footer-about .logo-img {
  width: 40px;
  height: 40px;
  background: #fff;
  border-radius: 8px;
  padding: 4px;
}

.footer-about p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
  line-height: 1.7;
}

.footer-column h4 {
  font-size: 1rem;
  margin-bottom: 20px;
  color: #ffffff;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-column ul li {
  margin-bottom: 12px;
}

.footer-column ul li a {
  color: rgba(255, 255, 255, 0.6);
  transition: all 0.3s ease;
}

.footer-column ul li a:hover {
  color: #4CAF50;
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

.footer-legal {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
}

.footer-legal p {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.7rem;
  line-height: 1.6;
  max-width: 900px;
  margin: 0 auto;
}

.social-link-labeled {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.3s ease;
}

.social-link-labeled:hover {
  color: #fff;
}

.social-icon-wrapper {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ── QUIZ (Test C-Level Score) ── */
.quiz-accordion-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.quiz-accordion-btn {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 1.25rem;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  border: none;
  cursor: pointer;
  transition: background 0.3s;
}

.quiz-accordion-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.quiz-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out;
  padding: 0 1.25rem;
}

.quiz-accordion-content.open {
  max-height: 4000px;
  /* arbitrary large value for smooth open */
  padding: 1.25rem;
  border-top: 1px solid var(--border);
}

.quiz-intro {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.quiz-question {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.quiz-question-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.quiz-q-num {
  width: 1.75rem;
  height: 1.75rem;
  min-width: 1.75rem;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quiz-q-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}

.quiz-sliders {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 600px) {
  .quiz-sliders {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.slider-group label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.val-display {
  color: var(--green);
  font-weight: 600;
}

.quiz-slider {
  width: 100%;
  appearance: none;
  background: var(--border);
  height: 6px;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.quiz-slider::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--green);
  cursor: pointer;
  transition: transform 0.1s;
}

.quiz-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.quiz-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--green);
  cursor: pointer;
  border: none;
}

.quiz-results {
  background: rgba(0, 0, 0, 0.3);
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 2rem;
  border: 1px solid var(--border);
}

/* ===== Liste (UL / OL) ===== */
.rule-body ul,
.rule-body ol {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.rule-body li {
  margin-bottom: 0.5rem;
}

/* ===== JOKER FOOTER (From main site) ===== */
.footer {
  background: #0a0f1a !important;
  color: #fff !important;
  padding: 80px 0 24px;
}

.footer .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-about .logo {
  margin-bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.footer-about .logo img {
  height: 28px;
}

.footer-about .logo span {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.footer-about p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
  line-height: 1.7;
}

.footer-column h4 {
  font-size: 1rem;
  margin-bottom: 20px;
  color: #fff;
  font-weight: 700;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-column ul li {
  margin-bottom: 12px;
}

.footer-column ul li a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-column ul li a:hover {
  color: var(--green);
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

.footer-legal {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
}

.footer-legal p {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.7rem;
  line-height: 1.6;
  max-width: 900px;
  margin: 0 auto;
}

.social-link-labeled {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #fff;
  transition: all 0.3s ease;
}

.social-link-labeled .social-icon-wrapper {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.social-link-labeled span {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  transition: all 0.3s ease;
}

.social-link-labeled:hover .social-icon-wrapper {
  background: var(--green);
  transform: scale(1.15);
}

.social-link-labeled:hover span {
  color: var(--green);
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== HARMONIKE (Accordions) ===== */
details.rule-accordion>summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 1rem;
}

details.rule-accordion>summary::after {
  content: '\25bc';
  font-size: 0.8rem;
  color: var(--text-muted, #94a3b8);
  margin-left: auto;
  transition: transform 0.2s ease;
}

details.rule-accordion[open]>summary::after {
  transform: rotate(180deg);
}

details.rule-accordion>summary::-webkit-details-marker {
  display: none;
}

details.rule-accordion[open]>summary {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

details.rule-accordion>summary .summary-img {
  height: 48px;
  width: auto;
  border-radius: 4px;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

details.rule-accordion[open]>summary .summary-img {
  display: none;
}

details.rule-accordion>summary:hover {
  background: var(--surface);
  border-radius: 12px;
}

details.rule-accordion {
  transition: all 0.2s ease;
}

/* Simple Accordion (bez slike) */
details.simple-accordion {
  margin-top: 1.5rem;
  margin-bottom: 2rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

details.simple-accordion>summary {
  padding: 0.75rem 1rem;
  background: var(--bg);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid transparent;
  list-style: none;
  margin: 0;
  color: var(--heading);
}

details.simple-accordion>summary::-webkit-details-marker {
  display: none;
}

details.simple-accordion[open]>summary {
  border-bottom-color: var(--border);
  margin: 0;
  padding-bottom: 0.75rem;
}

details.simple-accordion .accordion-body {
  margin: 0;
  padding: 1.5rem;
  /* Povećan padding prema zahtjevu */
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--surface);
}

/* ===== TIPOGRAFIJA (Code, Kbd, Blockquote) ===== */
code {
  font-family: 'Courier New', Courier, monospace;
  background: #f1f5f9;
  color: #c026d3;
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
  border: 1px solid #e2e8f0;
}

kbd:not(.key) {
  font-family: inherit;
  background: #f8fafc;
  color: #334155;
  padding: 0.1em 0.4em;
  border: 1px solid #cbd5e1;
  border-bottom-width: 2px;
  border-radius: 4px;
  font-size: 0.85em;
  font-weight: 600;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}

blockquote {
  border-left: 4px solid var(--blue);
  background: #f8fafc;
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #475569;
}

blockquote p {
  margin: 0;
}

/* ===== WIP (U Izradi) Značke ===== */
.card-status.wip {
  background: #fef08a;
  color: #854d0e;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border: 1px solid #fde047;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.joker-card.card-wip .card-action {
  color: #d97706;
  /* Narančasto da se razlikuje od produkcije */
}

.related-card.related-wip .related-badge {
  background: #fef08a;
  color: #854d0e;
  border-color: #fde047;
}