/* ================================================================
   yoga.css — Yoga 50 Pose Guide with Chakra & Energy
   ================================================================ */

/* ── Screen ── */
#screen-yoga { background: #0a0e1a; min-height: 100vh; }
#screen-yoga .nav-bar {
  background: linear-gradient(135deg, #1a1e2e 0%, #0d1117 100%);
  border-bottom: 1px solid rgba(156,39,176,0.15);
}

/* ── Category bar ── */
.yoga-cats {
  display: flex; gap: 6px; padding: 12px 16px 8px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.yoga-cats::-webkit-scrollbar { display: none; }
.yoga-cat-btn {
  flex-shrink: 0; padding: 6px 14px; border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: #aaa; font-size: 12.5px; font-weight: 500;
  cursor: pointer; transition: all .25s;
  white-space: nowrap;
}
.yoga-cat-btn.active {
  background: linear-gradient(135deg, #9C27B0, #BA68C8);
  color: #fff; border-color: transparent;
  box-shadow: 0 2px 12px rgba(156,39,176,0.35);
}
.yoga-cat-btn:not(.active):hover { border-color: rgba(156,39,176,0.3); color: #ddd; }

/* ── Search bar ── */
.yoga-search-wrap {
  padding: 4px 16px 10px; position: relative;
}
.yoga-search {
  width: 100%; padding: 9px 14px 9px 36px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.05);
  color: #eee; font-size: 13px; outline: none;
  transition: border-color .2s;
}
.yoga-search::placeholder { color: #666; }
.yoga-search:focus { border-color: rgba(156,39,176,0.4); }
.yoga-search-icon {
  position: absolute; left: 28px; top: 50%; transform: translateY(-50%);
  font-size: 14px; color: #666; pointer-events: none;
}

/* ── Grid ── */
.yoga-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 12px; padding: 8px 16px 100px;
}
.yoga-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px; padding: 14px 12px;
  cursor: pointer; transition: all .25s;
  position: relative; overflow: hidden;
}
.yoga-card:hover {
  transform: translateY(-2px);
  border-color: rgba(156,39,176,0.3);
  box-shadow: 0 4px 20px rgba(156,39,176,0.15);
}
.yoga-card:active { transform: scale(0.97); }

/* Card icon area */
.yoga-card-icon {
  width: 100%; aspect-ratio: 1; border-radius: 10px;
  background: linear-gradient(135deg, rgba(156,39,176,0.08), rgba(186,104,200,0.04));
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px; position: relative; overflow: hidden;
}
.yoga-card-icon img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 10px;
}

/* Difficulty badge */
.yoga-diff {
  position: absolute; top: 6px; right: 6px;
  background: rgba(0,0,0,0.5); border-radius: 6px;
  padding: 2px 6px; font-size: 10px; color: #CE93D8;
  backdrop-filter: blur(4px);
}

/* Chakra dot on card */
.yoga-chakra-dot {
  position: absolute; top: 6px; left: 6px;
  width: 12px; height: 12px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(4px);
}

/* Card text */
.yoga-card-name {
  font-size: 12.5px; font-weight: 600; color: #eee;
  line-height: 1.3; margin-bottom: 2px;
}
.yoga-card-sanskrit {
  font-size: 10px; color: #BA68C8; font-style: italic;
  margin-bottom: 4px;
}
.yoga-card-muscles {
  font-size: 10.5px; color: #888; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.yoga-card-cat-badge {
  display: inline-block; margin-top: 6px;
  font-size: 9.5px; padding: 2px 8px; border-radius: 10px;
  background: rgba(255,255,255,0.06);
  color: #999;
}

/* ── Detail modal ── */
.yoga-modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: yogaFadeIn .25s ease;
}
@keyframes yogaFadeIn { from { opacity: 0; } }

.yoga-modal {
  width: 100%; max-width: 480px; max-height: 92vh;
  background: linear-gradient(180deg, #1a1e2e 0%, #0d1117 100%);
  border-radius: 20px 20px 0 0;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  animation: yogaSlideUp .3s ease;
}
@keyframes yogaSlideUp { from { transform: translateY(40px); opacity: 0; } }

/* Modal header */
.yoga-modal-header {
  position: sticky; top: 0; z-index: 2;
  padding: 16px 20px 12px;
  background: linear-gradient(180deg, #1a1e2e, rgba(26,30,46,0.95));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.yoga-modal-back {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 6px 12px 6px 8px; border-radius: 18px;
  background: rgba(156,39,176,0.15); border: 1px solid rgba(156,39,176,0.3);
  color: #CE93D8; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .2s; margin-bottom: 8px;
}
.yoga-modal-back:hover { background: rgba(156,39,176,0.25); }
.yoga-modal-close {
  position: absolute; top: 14px; right: 16px;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,0.08); border: none;
  color: #aaa; font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.yoga-modal-close:hover { background: rgba(255,255,255,0.15); }
.yoga-modal-title {
  font-size: 18px; font-weight: 700; color: #fff;
  margin-bottom: 2px; padding-right: 40px;
}
.yoga-modal-sanskrit {
  font-size: 13px; color: #BA68C8; font-style: italic;
  margin-bottom: 6px;
}
.yoga-modal-subtitle {
  font-size: 12px; color: #888;
}
.yoga-modal-meta {
  display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap;
}
.yoga-meta-tag {
  display: flex; align-items: center; gap: 4px;
  font-size: 11px; color: #aaa;
  padding: 4px 10px; border-radius: 8px;
  background: rgba(255,255,255,0.05);
}
.yoga-meta-tag .tag-icon { font-size: 13px; }

/* ── Photo gallery (3 photos) ── */
.yoga-gallery {
  display: flex; gap: 8px; padding: 12px 16px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.yoga-gallery::-webkit-scrollbar { display: none; }
.yoga-gallery-item {
  flex: 0 0 80%; scroll-snap-align: center;
  border-radius: 14px; overflow: hidden;
  aspect-ratio: 4/3;
}
.yoga-gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
}
.yoga-gallery-dots {
  display: flex; justify-content: center; gap: 6px;
  padding: 8px 0 4px;
}
.yoga-gallery-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.2);
  transition: background .2s;
}
.yoga-gallery-dot.active {
  background: #BA68C8; width: 18px; border-radius: 3px;
}

/* ── Chakra section ── */
.yoga-chakra-section {
  margin: 0 16px 8px; padding: 12px;
  border-radius: 12px;
  background: rgba(156,39,176,0.06);
  border: 1px solid rgba(156,39,176,0.12);
}
.yoga-chakra-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
}
.yoga-chakra-orb {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 12px rgba(156,39,176,0.3);
  animation: yogaOrbPulse 3s ease-in-out infinite;
}
@keyframes yogaOrbPulse {
  0%, 100% { box-shadow: 0 0 12px rgba(156,39,176,0.3); }
  50% { box-shadow: 0 0 20px rgba(156,39,176,0.5); }
}
.yoga-chakra-orb-inner {
  width: 16px; height: 16px; border-radius: 50%;
  background: rgba(255,255,255,0.3);
}
.yoga-chakra-name {
  font-size: 13px; font-weight: 600; color: #CE93D8;
}
.yoga-chakra-element {
  font-size: 11px; color: #888; margin-top: 1px;
}
.yoga-energy-text {
  font-size: 12px; color: #ccc; line-height: 1.5;
  padding: 8px 0 0;
  border-top: 1px solid rgba(255,255,255,0.05);
  margin-top: 8px;
}

/* Modal body */
.yoga-modal-body { padding: 0 20px 30px; }

/* Section tabs */
.yoga-tabs {
  display: flex; gap: 4px; margin-bottom: 16px;
  background: rgba(255,255,255,0.04); border-radius: 10px;
  padding: 3px;
}
.yoga-tab {
  flex: 1; padding: 8px 0; border-radius: 8px;
  background: transparent; border: none;
  color: #888; font-size: 12px; font-weight: 500;
  cursor: pointer; transition: all .2s; text-align: center;
}
.yoga-tab.active {
  background: rgba(156,39,176,0.15);
  color: #CE93D8;
}

/* Tab content panels */
.yoga-tab-content { display: none; }
.yoga-tab-content.active { display: block; animation: yogaFadeIn .2s; }

/* Steps section */
.yoga-section-title {
  font-size: 13px; font-weight: 600; color: #CE93D8;
  margin-bottom: 10px; display: flex; align-items: center; gap: 6px;
}
.yoga-step {
  display: flex; gap: 10px; margin-bottom: 12px;
  padding: 10px 12px; border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border-left: 3px solid rgba(156,39,176,0.3);
}
.yoga-step-num {
  flex-shrink: 0; width: 24px; height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #9C27B0, #BA68C8);
  color: #fff; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.yoga-step-text {
  font-size: 13px; color: #ddd; line-height: 1.5;
}

/* Benefits section */
.yoga-benefit {
  display: flex; align-items: flex-start; gap: 8px;
  margin-bottom: 8px; padding: 8px 12px;
  border-radius: 8px; background: rgba(76,175,80,0.06);
}
.yoga-benefit-icon {
  flex-shrink: 0; color: #66bb6a; font-size: 14px; margin-top: 1px;
}
.yoga-benefit-text {
  font-size: 13px; color: #ccc; line-height: 1.4;
}

/* Info cards (breathing, duration, caution) */
.yoga-info-row {
  display: flex; gap: 8px; margin-bottom: 8px;
}
.yoga-info-card {
  flex: 1; padding: 10px; border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}
.yoga-info-label {
  font-size: 10px; color: #888; margin-bottom: 4px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.yoga-info-value {
  font-size: 12px; color: #ddd; line-height: 1.4;
}

/* Caution box */
.yoga-caution {
  margin-top: 12px; padding: 10px 12px; border-radius: 10px;
  background: rgba(244,67,54,0.08);
  border: 1px solid rgba(244,67,54,0.15);
  display: flex; gap: 8px; align-items: flex-start;
}
.yoga-caution-icon { color: #ef5350; font-size: 16px; flex-shrink: 0; }
.yoga-caution-text { font-size: 12px; color: #ef9a9a; line-height: 1.4; }

/* ── Stats bar ── */
.yoga-stats {
  display: flex; justify-content: space-around;
  padding: 10px 16px; margin-bottom: 4px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.yoga-stat { text-align: center; }
.yoga-stat-num {
  font-size: 20px; font-weight: 700;
  background: linear-gradient(135deg, #9C27B0, #CE93D8);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.yoga-stat-label {
  font-size: 10px; color: #666; margin-top: 2px;
}

/* ── Empty state ── */
.yoga-empty {
  text-align: center; padding: 60px 20px;
  color: #555; font-size: 14px;
}
.yoga-empty-icon { font-size: 40px; margin-bottom: 10px; opacity: 0.5; }

/* ── Medical tab ── */
.yoga-med-tags {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0 8px;
}
.yoga-med-tag {
  padding: 4px 12px; border-radius: 20px; font-size: 11.5px; font-weight: 600;
  background: linear-gradient(135deg, rgba(0,184,240,0.15), rgba(13,56,128,0.15));
  color: #64b5f6; border: 1px solid rgba(0,184,240,0.2);
}
.yoga-med-mechanism {
  font-size: 12.5px; color: #ccc; line-height: 1.65; padding: 10px 12px;
  background: rgba(255,255,255,0.03); border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.06);
}
.yoga-med-evidence {
  font-size: 12px; color: #a5d6a7; line-height: 1.5; padding: 10px 12px;
  background: rgba(76,175,80,0.06); border-radius: 10px;
  border: 1px solid rgba(76,175,80,0.12); font-style: italic;
}

/* ── Responsive ── */
@media (min-width: 600px) {
  .yoga-grid { grid-template-columns: repeat(3, 1fr); }
  .yoga-modal { border-radius: 20px; max-height: 85vh; margin-bottom: 20px; }
  .yoga-gallery-item { flex: 0 0 60%; }
}
@media (min-width: 900px) {
  .yoga-grid { grid-template-columns: repeat(4, 1fr); }
}
