/* ================================================================
   OŚ CZASU
================================================================ */
#page-osczasu .container { max-width: 100%; padding: 24px 32px 40px; }
#page-osczasu .title-top { white-space: nowrap; font-size: clamp(16px, 5vw, 76px); }

/* OŚ CZASU tło — linia czasu z kropkami */
#page-osczasu::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    /* pozioma linia czasu w środku */
    linear-gradient(transparent 49.8%, rgba(245,200,66,0.06) 49.8%, rgba(245,200,66,0.06) 50.2%, transparent 50.2%),
    /* pionowe kreski jak znaczniki lat */
    radial-gradient(ellipse 60% 30% at 50% 50%, rgba(26,122,58,0.1) 0%, transparent 70%),
    radial-gradient(ellipse 30% 50% at 5% 50%, rgba(245,200,66,0.05) 0%, transparent 60%),
    radial-gradient(ellipse 30% 50% at 95% 50%, rgba(245,200,66,0.05) 0%, transparent 60%);
}

.ot-instructions { font-size: 14px; letter-spacing: 1px; color: rgba(240,244,239,0.55); text-align: center; line-height: 1.6; }

/* Timeline track */
.timeline-wrap {
  width: 100%;
  position: relative;
  padding: 8px 0 16px;
}
.timeline-line {
  display: none;
}
.timeline-line::after { display: none; }

.timeline-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.timeline-header-line {
  flex: 1;
  height: 3px;
  background: linear-gradient(90deg, var(--green), var(--gold));
  border-radius: 2px;
  position: relative;
}
.timeline-header-line::after {
  content: '';
  position: absolute;
  right: -10px; top: 50%;
  transform: translateY(-50%);
  border-left: 12px solid var(--gold);
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
}
.timeline-header-label {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 13px;
  letter-spacing: 3px;
  color: rgba(240,244,239,0.35);
  white-space: nowrap;
}
.timeline-cards {
  display: flex;
  gap: 10px;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
  padding: 12px 8px;
  justify-content: center;
  align-items: flex-start;
}
.timeline-cards::-webkit-scrollbar { height: 5px; }
.timeline-cards::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); border-radius: 3px; }
.timeline-cards::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 3px; }

@media (max-width: 600px) {
  .timeline-cards {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    justify-content: flex-start;
    align-items: center;
    padding: 12px 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--gold) rgba(255,255,255,0.05);
  }
  .tl-drop { min-height: 80px; }
  #page-osczasu { overflow-y: auto; overflow-x: clip; }
  #page-osczasu .container { overflow-x: clip; }
}

.tl-card {
  flex-shrink: 0;
  width: 130px;
  background: #1a2e20;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
  cursor: default;
  position: relative;
  transition: all 0.3s;
  user-select: none;
  z-index: 2;
  animation: cardIn 1.4s ease;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.tl-card.correct { border-color: #2ecc71; background: #0d3320; }
.tl-card.wrong { border-color: var(--red); background: #3a1010; animation: shake 0.4s ease; }

@keyframes shake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  60% { transform: translateX(6px); }
}

.tl-year {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 4px;
}
.tl-emoji { font-size: 22px; margin-bottom: 4px; display: block; }
.tl-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: rgba(240,244,239,0.8);
  letter-spacing: 0.5px;
  line-height: 1.2;
}

/* Drop zone between cards */
.tl-drop {
  flex-shrink: 0;
  width: 44px;
  min-height: 100px;
  border-radius: 6px;
  border: 2px dashed rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.04);
  transition: all 0.2s;
  cursor: pointer;
  position: relative;
}
.tl-drop:hover, .tl-drop.drag-over {
  width: 70px;
  border-color: var(--gold);
  background: rgba(245,200,66,0.12);
}
.tl-drop .drop-hint {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  font-size: 18px;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.tl-drop:hover .drop-hint, .tl-drop.drag-over .drop-hint { opacity: 1; }

/* New event card to place */
.ot-event-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.ot-event-card {
  width: 200px;
  background: linear-gradient(145deg, rgba(245,200,66,0.12), rgba(245,200,66,0.06));
  border: 2px solid var(--gold);
  border-radius: 12px;
  padding: 16px 14px;
  text-align: center;
  cursor: grab;
  transition: all 0.2s;
  box-shadow: 0 0 20px rgba(245,200,66,0.2);
}
.ot-event-card:active { cursor: grabbing; transform: scale(0.97); }
.ot-event-emoji { font-size: 32px; display: block; margin-bottom: 6px; }
.ot-event-title { font-family: 'Barlow Condensed', sans-serif; font-size: 16px; font-weight: 700; color: var(--white); letter-spacing: 1px; line-height: 1.3; margin-bottom: 4px; }
.ot-event-cat { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); opacity: 0.7; }
.ot-drag-hint { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: rgba(240,244,239,0.35); }

/* Mobile tap buttons */
.ot-tap-btns {
  display: none;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}
@media (pointer: coarse) {
  .ot-tap-btns { display: flex; }
  .ot-drag-hint { display: none; }
}
.ot-tap-btn {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}
.ot-tap-btn:hover { border-color: var(--gold); color: var(--gold); }

.ot-feedback {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
  min-height: 24px;
  transition: all 0.3s;
  opacity: 0;
}
.ot-feedback.show { opacity: 1; }
.ot-feedback.fade-out { opacity: 0; transition: opacity 0.8s ease; }
.ot-feedback.correct { color: #2ecc71; }
.ot-feedback.wrong { color: var(--red); }

.ot-progress {
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(240,244,239,0.7);
}

/* Result overlay extras */
.ot-grade { font-size: 14px; letter-spacing: 3px; text-transform: uppercase; color: rgba(240,244,239,0.55); text-align: center; }


/* ===== OŚ CZASU — KARTA WSKAKUJE ===== */
@keyframes tlCardBounce {
  0%   { opacity: 0; transform: translateY(-30px) scale(0.85); }
  55%  { transform: translateY(6px) scale(1.04); }
  75%  { transform: translateY(-3px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.tl-card.bounce-in {
  animation: tlCardBounce 1s cubic-bezier(0.4,0,0.2,1) forwards;
}


/* ===== OŚ CZASU — ANIMACJE ===== */
@keyframes otWrongBounce {
  0%   { transform: translateX(0) scale(1); }
  15%  { transform: translateX(-10px) scale(1.03); }
  35%  { transform: translateX(10px) scale(1.03); }
  55%  { transform: translateX(-6px); }
  75%  { transform: translateX(6px); }
  90%  { transform: translateX(-3px); }
  100% { transform: translateX(0) scale(1); }
}
.ot-event-card.wrong-bounce {
  animation: otWrongBounce 0.6s cubic-bezier(0.4,0,0.2,1);
  border-color: var(--red) !important;
}
@keyframes tlDropPulse {
  0%,100% { border-color: rgba(245,200,66,0.3); background: rgba(245,200,66,0.04); }
  50%     { border-color: rgba(245,200,66,0.8); background: rgba(245,200,66,0.14); }
}
.tl-drop.pulsing {
  animation: tlDropPulse 1s ease infinite;
}

