:root {
  --bg: #0a0a0c;
  --surface: #15151a;
  --surface-hover: #1c1c24;
  --accent: #f59e0b;
  --accent-soft: rgba(245, 158, 11, 0.1);
  --text: #ffffff;
  --text-dim: #a1a1aa;
  --text-muted: #666666;
  --border: rgba(255, 255, 255, 0.08);
  --radius: 16px;
  --radius-sm: 8px;
  --radius-full: 99px;
}

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

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ── Header ── */
.site-header {
  background: rgba(10, 10, 12, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.logo-text { font-weight: 900; font-size: 1.3rem; letter-spacing: 0.1em; }
.logo-text span { color: var(--accent); }

.header-nav { display: flex; align-items: center; gap: 10px; }

/* ── Buttons ── */
.btn, .nav-icon-btn, .nav-action-btn, .nav-primary-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  color: #fff; padding: 10px 20px; border-radius: var(--radius-sm);
  cursor: pointer; font-weight: 700; font-size: 0.9rem;
  transition: 0.2s; white-space: nowrap;
}
.btn-primary, .nav-primary-btn { background: var(--accent); color: #000; border: none; }
.btn-primary:hover, .nav-primary-btn:hover { background: #d97706; transform: translateY(-1px); }

.btn-outline { background: transparent; border: 1px solid var(--border); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,0.05); border-color: #fff; }

.nav-icon-btn { padding: 10px; }
.btn-full { width: 100%; justify-content: center; }

/* ── Tags ── */
.tags-scroller-wrap { margin: 24px 0; }
.tags-scroller { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 5px; scrollbar-width: none; }
.tags-scroller::-webkit-scrollbar { display: none; }
.tag-btn {
  white-space: nowrap; background: var(--surface); border: 1px solid var(--border);
  color: var(--text-dim); padding: 8px 18px; border-radius: 40px; font-size: 0.85rem;
  cursor: pointer; transition: 0.2s; font-weight: 600;
}
.tag-btn:hover, .tag-btn.active { background: var(--accent); color: #000; border-color: var(--accent); }

/* ── Vtip dne ── */
.joke-of-day {
  background: linear-gradient(145deg, #1c1c24, #15151a);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius);
  padding: 30px;
  margin-bottom: 40px;
  display: none;
}
.jod-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-soft); color: var(--accent);
  padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 800;
  text-transform: uppercase; margin-bottom: 16px;
}
.jod-text { font-size: 1.4rem; font-weight: 600; line-height: 1.4; margin-bottom: 24px; color: #fff; }
.jod-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.jod-actions { display: flex; align-items: center; gap: 12px; }

/* ── Action Buttons ── */
.action-link, .action-icon-btn, .mini-action-btn {
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  color: #fff; padding: 6px 14px; border-radius: 8px;
  display: flex; align-items: center; gap: 8px; font-size: 0.85rem;
  cursor: pointer; transition: 0.2s; font-weight: 600;
}
.action-link:hover, .action-icon-btn:hover, .mini-action-btn:hover { background: rgba(255,255,255,0.1); }
.mini-action-btn { padding: 8px; border: none; background: transparent; color: var(--text-muted); }
.mini-action-btn:hover { color: #fff; background: rgba(255,255,255,0.05); }

.featured-link { color: var(--accent); font-weight: 800; display: flex; align-items: center; gap: 6px; }

/* ── Feed & Grid ── */
.feed-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.sort-pills { display: flex; background: var(--surface); padding: 5px; border-radius: 12px; border: 1px solid var(--border); }
.sort-pill {
  background: none; border: none; color: var(--text-muted);
  padding: 6px 16px; border-radius: 8px; font-size: 0.85rem; font-weight: 700;
  cursor: pointer; transition: 0.2s;
}
.sort-pill.active { background: var(--bg); color: var(--accent); }

.jokes-grid {
  column-count: 3;
  column-gap: 24px;
}
@media (max-width: 900px) { .jokes-grid { column-count: 2; } }
@media (max-width: 560px) { .jokes-grid { column-count: 1; } }

/* ── Card Styles ── */
.joke-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: 0.3s;
  break-inside: avoid;
  margin-bottom: 24px;
}
.joke-card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,0.15); box-shadow: 0 10px 40px rgba(0,0,0,0.4); }

.joke-body { flex: 1; margin-bottom: 24px; }
.joke-text { font-size: 1.1rem; font-weight: 500; color: #eee; line-height: 1.6; }

.joke-footer { display: flex; justify-content: space-between; align-items: center; }
.joke-stats { display: flex; gap: 16px; }
.stat-up, .stat-down {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.85rem; font-weight: 800; color: var(--text-muted); padding: 4px 0;
  cursor: pointer; transition: 0.2s;
}
.stat-up:hover, .stat-up.active { color: var(--accent); }
.stat-down:hover, .stat-down.active { color: #f87171; }

/* ── Skeletons ── */
.skeleton {
  min-height: 240px; border-radius: var(--radius);
  background: linear-gradient(90deg, #15151a 25%, #1c1c24 50%, #15151a 75%);
  background-size: 200% 100%;
  animation: shine 1.5s infinite linear;
}
@keyframes shine { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Forms ── */
input[type="text"], input[type="email"], textarea {
  background: #0c0c0f; border: 1px solid var(--border); color: #fff;
  padding: 12px 18px; border-radius: 12px; width: 100%; font-family: inherit; transition: 0.2s;
}
input:focus, textarea:focus { border-color: var(--accent); outline: none; background: #121217; }

/* ── Newsletter ── */
.newsletter-banner {
  background: #0c0c0f; padding: 80px 0; border-top: 1px solid var(--border); margin-top: 80px;
}
.newsletter-inner { display: flex; justify-content: space-between; align-items: center; gap: 40px; max-width: 900px; margin: 0 auto; }
.newsletter-form { display: flex; gap: 12px; flex: 1; }

/* ── Load More ── */
.load-more-wrap { display: flex; justify-content: center; margin-top: 50px; }

/* ── Breadcrumb ── */
.breadcrumb { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 24px; display: flex; align-items: center; gap: 8px; }
.breadcrumb a:hover { color: var(--accent); }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(12px);
  z-index: 2000; display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal, .modal-content {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 40px; width: 100%; max-width: 500px; box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.modal-close { background: rgba(255,255,255,0.05); border: none; color: #fff; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.modal-close:hover { background: var(--accent); color: #000; }

@media (max-width: 800px) {
  .newsletter-inner { flex-direction: column; text-align: center; gap: 24px; }
  .jod-footer { flex-direction: column; align-items: flex-start; }
}
