/* Zodiac Wheels UI
   - responsive two-column layout (desktop/tablet)
   - touch-friendly sizing
*/

:root{
  --bg: #b6c11a;
  --panel: rgba(255,255,255,0.06);
  --panel2: rgba(255,255,255,0.08);
  --stroke: rgba(255,255,255,0.14);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.70);
  --muted2: rgba(255,255,255,0.55);
  --accent: rgba(255,212,138,0.95);
  --accent2: rgba(126,231,255,0.95);
  --shadow: 0 14px 34px rgba(0,0,0,0.40);
  --radius: 18px;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 700px at 45% 0%, rgba(150,130,255,0.18), transparent 60%),
    radial-gradient(900px 600px at 80% 10%, rgba(126,231,255,0.12), transparent 55%),
    radial-gradient(900px 700px at 10% 40%, rgba(255,212,138,0.10), transparent 55%),
    var(--bg);
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;

  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.topbar{
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: rgba(11,15,26,0.55);
  border-bottom: 1px solid var(--stroke);
}

.topbar__inner{
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 16px;
  display:flex;
  gap: 12px;
  align-items:center;
  justify-content: space-between;
}

.brand__title{
  font-size: 18px;
  letter-spacing: 1px;
  font-weight: 700;
}
.brand__subtitle{
  font-size: 12px;
  color: var(--muted2);
  margin-top: 2px;
}

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

.btn{
  appearance:none;
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.06));
  color: var(--text);
  padding: 10px 12px;
  border-radius: 14px;
  cursor:pointer;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.5px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.22);
}
.btn:hover{ border-color: rgba(255,255,255,0.22); }
.btn:active{ transform: translateY(1px); }

.page{
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 16px 26px;
}

.grid{
  display:flex;
  gap: 16px;
  align-items: stretch;
  justify-content: space-between;
  flex-wrap: wrap;
}

.card{
  flex: 1 1 520px;
  min-width: 320px;
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}

.card__header{
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
}
.card__header h2{
  margin: 0 0 10px;
  font-size: 16px;
  letter-spacing: 0.8px;
}
.meta{
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pill{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--stroke);
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.12);
}

.wheelWrap{
  padding: 14px;
}

.wheel{
  width: min(520px, 42vw);
  max-width: 100%;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.10);
  position: relative;
  touch-action: none; /* enable drag rotation on touch */
  overflow: hidden;
}

.wheelObj{
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none; /* clicks handled via overlay mapping inside SVG */
}

.hint{
  padding: 0 16px 16px;
  color: var(--muted2);
  font-size: 12px;
}

.footerPanel{
  margin-top: 16px;
  background: var(--panel2);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.footerPanel__inner{
  padding: 16px;
  display:flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footerNote{
  font-size: 7px;
  line-height: 1.6;
  color: var(--muted);
}

.readout{
  flex: 1 1 260px;
}
.readout__title, .notes__title{
  font-weight: 800;
  letter-spacing: 0.6px;
  margin-bottom: 10px;
}
.readout__row{
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}
.label{
  color: var(--muted2);
  min-width: 90px;
  display:inline-block;
}

.notes{
  flex: 2 1 420px;
}
.notes__body{
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}
code{
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.10);
  padding: 2px 6px;
  border-radius: 8px;
  color: rgba(255,255,255,0.88);
}

@media (max-width: 900px){
  .wheel{ width: min(520px, 84vw); }
}


/* FIXED opal frame – full circular surround */
.wheel{
  position:relative;
}

/* Opal frame ONLY outside the wheel – no opacity over content */
.wheel::after{
  content:"";
  position:absolute;
  inset:-12px;
  border-radius:50%;
  pointer-events:none;

  background:
    radial-gradient(circle,
      rgba(255,255,255,0.0) 0%,
      rgba(255,255,255,0.0) 68%,
      rgba(255,255,255,0.12) 72%,
      rgba(255,255,255,0.22) 78%,
      rgba(255,255,255,0.0) 88%);

  box-shadow:
    inset 0 0 26px rgba(255,255,255,0.18),
    0 0 34px rgba(255,255,255,0.14);
}



/* Info box above wheels */
.infoBox{
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 16px;
  padding: 18px 20px;
  margin: 0 auto 22px;
  max-width: 820px;
  box-shadow: 0 14px 32px rgba(0,0,0,0.35);
  text-align: center;
}

.infoTitle{
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.infoDates{
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  margin-bottom: 10px;
}

.infoDesc{
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255,255,255,0.85);
}

.infoGrid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 1000px;
  margin: 0 auto 24px;
}
.infoHeader{
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  opacity: 0.65;
  margin-bottom: 6px;
}
@media(max-width:800px){
  .infoGrid{ grid-template-columns: 1fr; }
}


/* Make info boxes align exactly with wheel cards */
.infoGrid{
  max-width: 1200px; /* same as .page */
  margin-left: auto;
  margin-right: auto;
}

.infoBox{
  width: 100%;
}


.grid{
  justify-content: center;
}

/* 3-column layout for three wheels */
.grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(300px, 1fr));
  gap:18px;
}
@media(max-width:1100px){
  .grid{ grid-template-columns: 1fr 1fr; }
}
@media(max-width:700px){
  .grid{ grid-template-columns: 1fr; }
}

/* Force strict 3-column alignment for info + wheels */
.infoGrid, .grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(320px, 1fr));
  gap: 18px;
  align-items: stretch;
}

@media (max-width: 1100px){
  .infoGrid, .grid{
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px){
  .infoGrid, .grid{
    grid-template-columns: 1fr;
  }
}

/* HARD FIX: force 3 columns on desktop so Wu Xing never drops below */
@media (min-width: 1200px){
  .infoGrid,
  .grid{
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 18px;
  }
}

/* Prevent cards from forcing wrap */
.card,
.infoBox{
  min-width: 0;
}

/* SINGLE SOURCE OF TRUTH: unified 3-column grid */
.tripleGrid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Responsive behavior */
@media (max-width: 1100px){
  .tripleGrid{
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 700px){
  .tripleGrid{
    grid-template-columns: 1fr;
  }
}

/* Ensure no wrapping surprises */
.tripleGrid > *{
  min-width: 0;
}


/* Arrow indicator above wheels */
.wheelArrow {
  display: flex;
  justify-content: center;
  margin-bottom: 6px;
}
.wheelArrow img {
  width: 60px;
  height: auto;
}
