/* ============================================
   TAROT.CZ — Kartové animace a design
   ============================================ */

/* ============================
   Základní karta (3D flip)
   ============================ */
.tarot-card {
  perspective: 1000px;
  cursor: pointer;
  display: inline-block;
}

.tarot-card.size-small  { width: 90px;  height: 150px; }
.tarot-card.size-medium { width: 130px; height: 220px; }
.tarot-card.size-large  { width: 180px; height: 300px; }

.card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.tarot-card:hover .card-inner {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* ── Přední strana ── */
.card-front {
  background: linear-gradient(160deg, #1a1a3e 0%, #0d0d28 100%);
  border: 2px solid var(--gold-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.6rem;
  box-shadow: var(--shadow-card), inset 0 0 30px rgba(212, 175, 55, 0.05);
  overflow: hidden;
}

/* Barevné varianty podle barvy */
.suit-major .card-front  { border-color: #D4AF37; background: linear-gradient(160deg, #1e1040, #0d0d28); }
.suit-wands .card-front  { border-color: #c0622a; background: linear-gradient(160deg, #2a1505, #0d0d1a); }
.suit-cups .card-front   { border-color: #2a6fa8; background: linear-gradient(160deg, #051428, #0a0d22); }
.suit-swords .card-front { border-color: #5a4fa0; background: linear-gradient(160deg, #0d0828, #080d22); }
.suit-pentacles .card-front { border-color: #2e7d4a; background: linear-gradient(160deg, #051a0e, #070d12); }

.card-corner {
  position: absolute;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.65rem;
  color: var(--gold-dim);
  letter-spacing: 0.05em;
}

.card-corner-tl { top: 0.4rem; left: 0.5rem; }
.card-corner-tr { top: 0.4rem; right: 0.5rem; transform: rotate(180deg); }

.card-symbol-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  width: 100%;
}

.card-symbol {
  font-size: 2.5rem;
  color: var(--gold);
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.6);
  line-height: 1;
}

.tarot-card.size-small .card-symbol  { font-size: 1.5rem; }
.tarot-card.size-large .card-symbol  { font-size: 3.5rem; }

.card-name-wrap {
  text-align: center;
  padding: 0 0.3rem 0.3rem;
  width: 100%;
}

.card-suit-label {
  display: block;
  font-size: 0.45rem;
  color: var(--gold-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.1rem;
  opacity: 0.7;
}

.card-name {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.7rem;
  color: var(--cream);
  letter-spacing: 0.03em;
  font-weight: 500;
}

.tarot-card.size-small .card-name  { font-size: 0.55rem; }
.tarot-card.size-large .card-name  { font-size: 0.9rem; }
.tarot-card.size-large .card-suit-label { font-size: 0.6rem; }

/* Ornament rohy */
.card-border-ornament {
  position: absolute;
  color: var(--gold-dim);
  font-size: 0.5rem;
  opacity: 0.6;
}

.card-border-ornament.top-left     { top: 1.5rem; left: 0.4rem; }
.card-border-ornament.top-right    { top: 1.5rem; right: 0.4rem; }
.card-border-ornament.bottom-left  { bottom: 1.5rem; left: 0.4rem; }
.card-border-ornament.bottom-right { bottom: 1.5rem; right: 0.4rem; }

/* ── Zadní strana ── */
.card-back {
  background: linear-gradient(135deg, #1a0533, #0d0d2b);
  border: 2px solid var(--gold-dim);
  transform: rotateY(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card-back-inner {
  width: 80%;
  height: 80%;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background:
    repeating-linear-gradient(
      45deg,
      rgba(212, 175, 55, 0.03) 0px,
      rgba(212, 175, 55, 0.03) 2px,
      transparent 2px,
      transparent 12px
    );
}

.card-back-star {
  font-size: 1.5rem;
  color: var(--gold);
  opacity: 0.7;
  position: relative;
  z-index: 1;
}

.tarot-card.size-large .card-back-star { font-size: 2.5rem; }

.card-back-mandala {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background:
    radial-gradient(circle at center, rgba(212, 175, 55, 0.15) 0%, transparent 60%);
}

/* ── Obrácená karta ── */
.tarot-card.reversed .card-front {
  transform: rotate(180deg);
}

/* ============================
   Balíček karet (deck visual)
   ============================ */
.card-deck-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  position: relative;
  margin-bottom: 1rem;
}

.deck-card {
  position: absolute;
  width: 100px;
  height: 160px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.deck-card:hover {
  transform: translateY(-15px) !important;
}

.deck-card-back {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a0533, #0d0d2b);
  border: 2px solid var(--gold-dim);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.deck-ornament {
  color: var(--gold);
  font-size: 1.5rem;
  opacity: 0.7;
}

.deck-hint {
  text-align: center;
  color: var(--cream-dim);
  font-style: italic;
  font-size: 0.9rem;
  margin-top: 180px;
}

/* ============================
   Pozicovací karty (výklady)
   ============================ */
.position-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.position-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.85rem;
  color: var(--gold);
  text-align: center;
  font-style: italic;
  letter-spacing: 0.05em;
}

.position-reversed-label {
  font-size: 0.7rem;
  color: rgba(138, 43, 226, 0.7);
  height: 1em;
}

.position-card {
  width: 110px;
  height: 185px;
  border-radius: 12px;
  cursor: pointer;
  perspective: 1000px;
  position: relative;
}

.position-card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.position-card.flipped .position-card-inner {
  transform: rotateY(180deg);
}

.position-card-back,
.position-card-front {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.position-card-back {
  background: linear-gradient(135deg, #1a0533, #0d0d2b);
  border: 2px solid var(--gold-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.back-ornament {
  color: var(--gold);
  font-size: 1.8rem;
  opacity: 0.7;
}

.position-card-front {
  transform: rotateY(180deg);
  border: 2px solid var(--gold-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem;
  background: linear-gradient(160deg, #1a1a3e 0%, #0d0d28 100%);
  box-shadow: 0 10px 40px rgba(0,0,0,0.7), var(--glow-gold);
  cursor: pointer;
  overflow: hidden;
}

.suit-wands  .position-card-front { border-color: #c0622a; background: linear-gradient(160deg, #2a1505, #0d0d1a); }
.suit-cups   .position-card-front { border-color: #2a6fa8; background: linear-gradient(160deg, #051428, #0a0d22); }
.suit-swords .position-card-front { border-color: #5a4fa0; background: linear-gradient(160deg, #0d0828, #080d22); }
.suit-pentacles .position-card-front { border-color: #2e7d4a; background: linear-gradient(160deg, #051a0e, #070d12); }
.suit-major  .position-card-front { border-color: #D4AF37; background: linear-gradient(160deg, #1e1040, #0d0d28); }

.pcard-corner {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.6rem;
  color: var(--gold-dim);
  align-self: flex-start;
  width: 100%;
}

.pcard-symbol {
  font-size: 2rem;
  color: var(--gold);
  text-shadow: 0 0 15px rgba(212, 175, 55, 0.6);
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pcard-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.7rem;
  color: var(--cream);
  text-align: center;
  padding-bottom: 0.2rem;
  width: 100%;
}

.pcard-border-tl, .pcard-border-tr,
.pcard-border-bl, .pcard-border-br {
  position: absolute;
  color: var(--gold-dim);
  font-size: 0.45rem;
  opacity: 0.5;
}

.pcard-border-tl { top: 1.5rem; left: 0.3rem; }
.pcard-border-tr { top: 1.5rem; right: 0.3rem; }
.pcard-border-bl { bottom: 1.5rem; left: 0.3rem; }
.pcard-border-br { bottom: 1.5rem; right: 0.3rem; }

/* Obrácená pozicovací karta */
.position-card.reversed .position-card-front {
  transform: rotateY(180deg) rotate(180deg);
}

/* Hover efekt na flipped kartu */
.position-card.flipped:hover {
  z-index: 10;
}

.position-card.flipped:hover .position-card-inner {
  transform: rotateY(180deg) scale(1.08);
}

/* ============================
   Layouty výkladů
   ============================ */
.cards-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  align-items: flex-start;
  margin: 2rem 0;
}

.layout-1 { justify-content: center; }

.layout-celtic {
  display: grid;
  grid-template-columns: repeat(5, 110px);
  grid-template-rows: auto auto auto;
  gap: 0.8rem 1.2rem;
  justify-content: center;
}

.layout-celtic .position-wrap:nth-child(1) { grid-column: 2; grid-row: 2; }
.layout-celtic .position-wrap:nth-child(2) { grid-column: 2; grid-row: 2; position: relative; margin-top: 20px; opacity: 0.95; }
.layout-celtic .position-wrap:nth-child(3) { grid-column: 2; grid-row: 1; }
.layout-celtic .position-wrap:nth-child(4) { grid-column: 2; grid-row: 3; }
.layout-celtic .position-wrap:nth-child(5) { grid-column: 1; grid-row: 2; }
.layout-celtic .position-wrap:nth-child(6) { grid-column: 3; grid-row: 2; }
.layout-celtic .position-wrap:nth-child(7) { grid-column: 5; grid-row: 3; }
.layout-celtic .position-wrap:nth-child(8) { grid-column: 5; grid-row: 2; }
.layout-celtic .position-wrap:nth-child(9) { grid-column: 5; grid-row: 1; }
.layout-celtic .position-wrap:nth-child(10) { grid-column: 4; grid-row: 2; }

/* ============================
   Karty v gridu (karty.html)
   ============================ */
.cards-grid-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 1.2rem;
  margin: 2rem 0;
}

.grid-card-item {
  cursor: pointer;
  transition: transform 0.3s ease;
  position: relative;
}

.grid-card-item:hover {
  transform: translateY(-8px);
  z-index: 5;
}

.grid-card-item:hover .card-front {
  box-shadow: 0 20px 50px rgba(0,0,0,0.7), var(--glow-gold);
}

/* Filter čipy */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.filter-chip {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(212, 175, 55, 0.2);
  color: var(--cream-dim);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Lato', sans-serif;
}

.filter-chip:hover,
.filter-chip.active {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold);
  color: var(--gold);
}

/* Search */
.search-box {
  position: relative;
  margin-bottom: 1.5rem;
}

.search-input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(212, 175, 55, 0.2);
  color: var(--cream);
  padding: 0.8rem 1rem 0.8rem 2.8rem;
  border-radius: 50px;
  font-size: 0.95rem;
  font-family: 'Lato', sans-serif;
  outline: none;
  transition: all 0.3s ease;
}

.search-input:focus {
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.04);
}

.search-input::placeholder { color: rgba(245, 240, 232, 0.4); }

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold-dim);
  font-size: 1rem;
}

/* ============================
   Karta dne (karta-dne.html)
   ============================ */
.daily-card-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  padding: 4rem 0;
  text-align: center;
}

.daily-card-display {
  animation: float 4s ease-in-out infinite;
}

.daily-card-info {
  max-width: 600px;
}

.daily-card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.5rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.daily-date {
  color: var(--cream-dim);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

/* ============================
   Výkladové tabs
   ============================ */
.spread-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.spread-tab {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(212, 175, 55, 0.2);
  color: var(--cream-dim);
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  min-width: 130px;
  font-family: 'Lato', sans-serif;
}

.spread-tab:hover {
  background: rgba(212, 175, 55, 0.08);
  border-color: var(--gold);
}

.spread-tab.active {
  background: rgba(212, 175, 55, 0.12);
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.15);
}

.spread-tab-icon {
  font-size: 1.2rem;
  color: var(--gold);
}

.spread-tab-name {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* ============================
   Interpretace
   ============================ */
.interpretation-box {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 16px;
  padding: 2.5rem;
  margin-top: 2rem;
}

.interpretation-box h3 {
  color: var(--gold);
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  text-align: center;
}

.interp-card-entry {
  padding: 1.5rem 0;
}

.interp-position-name {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 0.3rem;
}

.interp-position-desc {
  font-style: italic;
  font-size: 0.9rem;
  color: var(--cream-dim);
  margin-bottom: 0.8rem;
}

.interp-meaning {
  font-size: 1rem;
  color: var(--cream);
  margin-bottom: 0.8rem;
}

.interp-desc {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--cream-dim);
}

.interp-divider {
  border: none;
  border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.interp-footer {
  text-align: center;
  margin-top: 2rem;
}

/* Yes/No */
.yesno-answer {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3.5rem;
  font-weight: 600;
  text-align: center;
  margin: 1rem 0 1.5rem;
  text-shadow: 0 0 30px currentColor;
}

.answer-yes { color: #4ade80; }
.answer-no  { color: #f87171; }

/* ============================
   Spread info
   ============================ */
.spread-info-box {
  background: rgba(212, 175, 55, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  margin-bottom: 2rem;
  text-align: center;
}

.spread-info-box h3 { color: var(--gold); margin-bottom: 0.3rem; }
.spread-info-box p { margin: 0; font-size: 0.95rem; color: var(--cream-dim); }

/* ============================
   Responsive karty
   ============================ */
@media (max-width: 768px) {
  .cards-grid-wrap {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.8rem;
  }

  .position-card { width: 85px; height: 145px; }
  .pcard-symbol { font-size: 1.5rem; }

  .layout-celtic {
    grid-template-columns: repeat(3, 85px);
    gap: 0.5rem;
  }

  .layout-celtic .position-wrap:nth-child(7),
  .layout-celtic .position-wrap:nth-child(8),
  .layout-celtic .position-wrap:nth-child(9),
  .layout-celtic .position-wrap:nth-child(10) {
    grid-column: auto;
    grid-row: auto;
  }

  .spread-tab {
    min-width: 100px;
    padding: 0.6rem 1rem;
  }

  .daily-card-title { font-size: 1.8rem; }
}

@media (max-width: 480px) {
  .cards-grid-wrap {
    grid-template-columns: repeat(3, 1fr);
  }

  .tarot-card.size-medium { width: 100px; height: 170px; }
  .card-symbol { font-size: 2rem; }
}

/* Print styles */
@media print {
  .nav, .footer, .btn-primary, .btn-secondary, #stars-canvas { display: none; }
  body { background: white; color: black; }
  .interpretation-box { border: 1px solid #ccc; }
  h2, h3, h4 { color: #333; }
}
