@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #111;
  --card: #1a1a1a;
  --card-hover: #222;
  --yellow: #FFE600;
  --yellow-dim: #bfab00;
  --green: #22c55e;
  --red: #ef4444;
  --orange: #f97316;
  --blue: #3b82f6;
  --purple: #a855f7;
  --white: #fff;
  --gray: #888;
  --gray-light: #333;
  --radius: 12px;
}

.emoji-brusle {
  display: inline-block;
  width: 1.2em;
  height: 1.2em;
  vertical-align: -0.15em;
  background: url('https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f6fc.svg') center/contain no-repeat;
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--white);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Bebas Neue', cursive;
  letter-spacing: 1px;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px;
}

.container-wide {
  max-width: 1000px;
  margin: 0 auto;
  padding: 16px;
}

/* Badge */
.badge {
  display: inline-block;
  background: var(--gray-light);
  color: var(--yellow);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

/* Card */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}

/* Hlavní nadpis */
.main-title {
  font-size: 2.4rem;
  color: var(--yellow);
  line-height: 1.1;
  margin-bottom: 4px;
}

.subtitle {
  color: var(--gray);
  font-size: 14px;
  margin-bottom: 24px;
}

/* Formulář */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="password"],
.form-group select {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 2px solid var(--gray-light);
  border-radius: 8px;
  color: var(--white);
  font-size: 16px;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--yellow);
}

/* Tlačítka aktivit */
.activity-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.activity-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 18px 8px;
  background: var(--bg);
  border: 2px solid var(--gray-light);
  border-radius: var(--radius);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.activity-btn .emoji {
  font-size: 32px;
}

.activity-btn .rate {
  font-size: 11px;
  color: var(--gray);
}

.activity-btn:hover {
  border-color: var(--yellow);
  background: #1a1a1a;
}

.activity-btn.active {
  border-color: var(--yellow);
  background: rgba(255, 230, 0, 0.1);
  color: var(--yellow);
}

/* Upload zóna */
.upload-zone {
  border: 2px dashed var(--gray-light);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.upload-zone:hover {
  border-color: var(--yellow);
}

.upload-zone.has-file {
  border-color: var(--green);
  border-style: solid;
}

.upload-zone input[type="file"] {
  display: none;
}

.upload-zone .upload-icon {
  font-size: 36px;
  margin-bottom: 8px;
}

.upload-zone .upload-text {
  font-size: 14px;
  color: var(--gray);
}

.upload-preview {
  max-width: 100%;
  max-height: 200px;
  border-radius: 8px;
  margin-top: 10px;
  display: none;
}

.upload-preview.visible {
  display: block;
}

/* OCR status */
.ocr-status {
  margin-top: 8px;
  font-size: 13px;
  display: none;
}

.ocr-status.loading {
  display: block;
  color: var(--yellow);
}

.ocr-status.success {
  display: block;
  color: var(--green);
}

.ocr-status.error {
  display: block;
  color: var(--orange);
}

/* Spinner */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--gray-light);
  border-top-color: var(--yellow);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Hlavní tlačítko */
.btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--yellow);
  color: #000;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  font-family: 'Bebas Neue', cursive;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: var(--yellow-dim);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: opacity 0.2s;
}

.btn-sm:hover { opacity: 0.8; }

.btn-green { background: var(--green); color: #000; }
.btn-red { background: var(--red); color: #fff; }
.btn-orange { background: var(--orange); color: #000; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-gray { background: var(--gray-light); color: var(--white); }

/* Výsledek */
.result-card {
  display: none;
  background: rgba(34, 197, 94, 0.1);
  border: 2px solid var(--green);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  animation: fadeInUp 0.5s ease;
}

.result-card.visible {
  display: block;
}

.result-card .check {
  font-size: 48px;
  margin-bottom: 8px;
}

.result-card .result-text {
  font-family: 'Bebas Neue', cursive;
  font-size: 1.6rem;
  color: var(--green);
}

.result-card .result-sub {
  color: var(--gray);
  font-size: 14px;
  margin-top: 4px;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========= STAV STRÁNKA ========= */

.big-number {
  font-family: 'Bebas Neue', cursive;
  font-size: 4rem;
  color: var(--yellow);
  text-align: center;
  line-height: 1;
}

.big-label {
  text-align: center;
  color: var(--gray);
  font-size: 14px;
  margin-bottom: 16px;
}

/* Progress bar */
.progress-wrap {
  background: var(--gray-light);
  border-radius: 8px;
  height: 20px;
  overflow: hidden;
  margin-bottom: 6px;
}

.progress-bar {
  height: 100%;
  background: var(--yellow);
  border-radius: 8px;
  transition: width 1s ease;
  min-width: 2%;
}

.progress-label {
  text-align: center;
  font-size: 13px;
  color: var(--gray);
  margin-bottom: 20px;
}

/* Stat boxy */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.stat-box {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.stat-box .stat-value {
  font-family: 'Bebas Neue', cursive;
  font-size: 2rem;
  color: var(--white);
}

.stat-box .stat-label {
  font-size: 12px;
  color: var(--gray);
  text-transform: uppercase;
}

/* Bar chart (CSS) */
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 160px;
  padding: 10px 0;
  margin-bottom: 20px;
}

.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.bar-col .bar {
  width: 100%;
  border-radius: 6px 6px 0 0;
  transition: height 1s ease;
  min-height: 4px;
}

.bar-col .bar-value {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
}

.bar-col .bar-label {
  font-size: 12px;
  color: var(--gray);
  margin-top: 6px;
}

.bar-chuze { background: var(--green); }
.bar-beh { background: var(--orange); }
.bar-kolo { background: var(--blue); }
.bar-brusle { background: var(--purple); }

/* Tabulka */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th {
  text-align: left;
  padding: 10px 8px;
  color: var(--gray);
  font-size: 12px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--gray-light);
}

td {
  padding: 10px 8px;
  border-bottom: 1px solid #1f1f1f;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Žebříček */
.leaderboard-item {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #1f1f1f;
}

.leaderboard-item:last-child {
  border-bottom: none;
}

.leaderboard-rank {
  font-family: 'Bebas Neue', cursive;
  font-size: 1.4rem;
  width: 40px;
  text-align: center;
  color: var(--gray);
}

.leaderboard-rank.gold { color: #FFD700; }
.leaderboard-rank.silver { color: #C0C0C0; }
.leaderboard-rank.bronze { color: #CD7F32; }

.leaderboard-name {
  flex: 1;
  font-weight: 600;
}

.leaderboard-value {
  font-family: 'Bebas Neue', cursive;
  font-size: 1.2rem;
  color: var(--yellow);
}

/* ========= ADMIN ========= */

.login-card {
  max-width: 360px;
  margin: 80px auto;
}

/* Záložky */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab {
  padding: 10px 16px;
  background: var(--card);
  border: 2px solid transparent;
  border-radius: 8px 8px 0 0;
  color: var(--gray);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.tab:hover {
  color: var(--white);
}

.tab.active {
  border-color: var(--yellow);
  color: var(--yellow);
  background: var(--card);
}

.tab .badge-count {
  background: var(--red);
  color: #fff;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 10px;
  margin-left: 6px;
}

.tab-panel {
  display: none;
}

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

/* Admin karty */
.pending-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.pending-card .thumb {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--gray-light);
  cursor: pointer;
}

.pending-card .info {
  flex: 1;
  min-width: 200px;
}

.pending-card .info h4 {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  margin-bottom: 4px;
}

.pending-card .info .meta {
  font-size: 12px;
  color: var(--gray);
  margin-bottom: 8px;
}

.pending-card .actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.pending-card .actions input {
  width: 80px;
  padding: 6px 8px;
  background: var(--bg);
  border: 2px solid var(--gray-light);
  border-radius: 6px;
  color: var(--white);
  font-size: 14px;
}

.pending-card .actions input:focus {
  outline: none;
  border-color: var(--yellow);
}

/* Filtry */
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.filters select,
.filters input {
  padding: 8px 10px;
  background: var(--bg);
  border: 2px solid var(--gray-light);
  border-radius: 6px;
  color: var(--white);
  font-size: 13px;
}

.filters select:focus,
.filters input:focus {
  outline: none;
  border-color: var(--yellow);
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.85);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-overlay.visible {
  display: flex;
}

.modal-content {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: var(--gray);
  font-size: 24px;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--white);
}

.modal-img {
  max-width: 100%;
  border-radius: 8px;
}

/* Checkbox */
input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--yellow);
}

/* Nastavení toggle */
.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-light);
}

.toggle-row:last-child {
  border-bottom: none;
}

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gray-light);
  border-radius: 24px;
  transition: 0.3s;
}

.toggle-slider:before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--yellow);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

/* Hromadné akce bar */
.bulk-bar {
  display: none;
  position: sticky;
  top: 0;
  background: var(--card);
  border: 2px solid var(--yellow);
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 12px;
  z-index: 10;
  justify-content: space-between;
  align-items: center;
}

.bulk-bar.visible {
  display: flex;
}

/* Aktivita emoji helper */
.emoji-aktivita::before {
  margin-right: 4px;
}

/* Responsive */
@media (max-width: 480px) {
  .main-title { font-size: 2rem; }
  .big-number { font-size: 3rem; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .pending-card { flex-direction: column; }
  .pending-card .thumb { width: 100%; height: 120px; }
  .container { padding: 12px; }
  table { font-size: 12px; }
  th, td { padding: 8px 4px; }
  .tabs { gap: 2px; }
  .tab { padding: 8px 12px; font-size: 13px; }
}

/* Potvrzení smazání */
.confirm-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1001;
  justify-content: center;
  align-items: center;
}

.confirm-overlay.visible {
  display: flex;
}

.confirm-box {
  background: var(--card);
  border: 2px solid var(--red);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  max-width: 360px;
}

.confirm-box h3 {
  color: var(--red);
  margin-bottom: 10px;
}

.confirm-box p {
  color: var(--gray);
  margin-bottom: 16px;
  font-size: 14px;
}

.confirm-box .btns {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--gray);
}

.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 10px;
}
