/* ============================================
   My Fiddle Shack — v3 Stylesheet
   Matching v2: Georgia serif, tan accents,
   accordion cards, bordered title, fireflies
   ============================================ */

:root {
  --bg-1: #0f2a1a;
  --bg-2: #244a2e;
  --bg-3: #355d3b;
  --paper: #fffaf0;
  --ink: #2a2a2a;
  --tan: #c9b07a;
  --green: #2e4f31;
  --green-btn: #2f6244;
  --muted: #667;
}

html, body { height: 100%; }
body {
  margin: 0; font-family: Georgia, serif; color: var(--ink); overflow-x: hidden;
  background:
    radial-gradient(1200px 600px at 20% -10%, #274c30 0%, transparent 70%),
    radial-gradient(1000px 600px at 120% 10%, #2a5535 0%, transparent 70%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 60%, var(--bg-3) 100%);
}
a { color: var(--green-btn); }

/* ── Header ── */
header { position: relative; text-align: center; padding: 2.2rem 1rem 1.6rem; color: #fff; }
.title {
  display: inline-block; padding: .65rem 1rem; border: 3px solid var(--tan); border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(0,0,0,.12));
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
}
.title h1 { margin: .1rem 0; font-size: 2.1rem; letter-spacing: .5px; text-shadow: 0 1px 0 rgba(0,0,0,.4); }
.header-user { font-size: .9rem; color: #b8d4b0; }
.header-user a { color: #b8d4b0; }

/* ── Layout ── */
.wrap { max-width: 1100px; margin: 1.5rem auto 3rem; padding: 0 1rem; }
.narrow { max-width: 820px; }
.board {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem;
  background: rgba(255,255,255,.06); border: 3px solid var(--tan); border-radius: 16px;
  padding: 1.2rem; box-shadow: 0 20px 40px rgba(0,0,0,.35), inset 0 0 60px rgba(255,255,255,.05);
  backdrop-filter: blur(2px);
}
.column {
  background: linear-gradient(180deg, rgba(255,255,255,.85), rgba(255,255,255,.92));
  border: 2px solid #b7c7b2; border-radius: 12px; padding: 1rem 1.1rem;
  box-shadow: inset 0 0 18px rgba(0,0,0,.06), 0 6px 20px rgba(0,0,0,.18);
}
.column h2 { margin: 0 0 .6rem; font-size: 1.35rem; color: var(--green); border-bottom: 2px solid var(--tan); padding-bottom: .35rem; }

/* ── Accordions ── */
details { border-left: 6px solid var(--tan); background: var(--paper); border-radius: 10px; margin: 1rem 0; overflow: hidden; }
details[open] { box-shadow: 0 8px 24px rgba(0,0,0,.12); }
summary { list-style: none; cursor: pointer; padding: .9rem 1rem; font-weight: 700; color: var(--green); position: relative; }
summary::-webkit-details-marker { display: none; }
.caret { position: absolute; right: 1rem; top: 1.05rem; transition: transform .3s ease; }
details[open] .caret { transform: rotate(90deg); }
.acc-body { padding: 0 .9rem 1rem 1rem; line-height: 1.5; border-top: 1px dashed #d9caa4; }
.acc-body ul { margin: .5rem 0 0 1rem; }
.acc-body li { margin: .15rem 0; }
.note { color: #555; margin: 6px 0 16px; font-size: .95rem; }

/* ── Panels (used on student pages) ── */
.panel { background: var(--paper); border-radius: 14px; padding: 18px 20px; margin-bottom: 16px; box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.panel h2, .panel h3 { margin: 0 0 8px; color: var(--green); }

/* ── Buttons ── */
.btn {
  display: inline-block; background: var(--green-btn); color: #fff; border: 0;
  border-radius: 8px; padding: .55rem .9rem; cursor: pointer; text-decoration: none;
  font: inherit; font-size: .95rem;
}
.btn:hover { background: #274f38; }
@keyframes cta-pulse { 0% { box-shadow: 0 0 0 3px rgba(110,200,150,.22); } 50% { box-shadow: 0 0 10px 8px rgba(110,200,150,.35); } 100% { box-shadow: 0 0 0 3px rgba(110,200,150,.22); } }
.cta-ml {
  display: inline-block; background: var(--green-btn); color: #fff; border: 0; border-radius: 14px;
  padding: .9rem 1.6rem; text-decoration: none; font-weight: 700; font-size: 1.15rem; letter-spacing: .3px;
  box-shadow: 0 0 0 0 rgba(47,98,68,.6), 0 6px 14px rgba(0,0,0,.22);
  transition: transform .15s ease, box-shadow .3s ease, filter .2s ease; position: relative;
}
.cta-ml::after {
  content: ''; position: absolute; inset: -8px; border-radius: 20px; pointer-events: none;
  box-shadow: 0 0 16px 6px rgba(110,200,150,.45);
  opacity: .9; filter: blur(1px);
  animation: cta-pulse 1.8s ease-in-out infinite;
}
.cta-ml:hover { transform: translateY(-1px); filter: saturate(1.08); box-shadow: 0 10px 22px rgba(0,0,0,.26); }
.soft { background: #e9efe7; color: #2a3a2e; border: 1px solid rgba(0,0,0,.08); border-radius: 10px; padding: 6px 10px; cursor: pointer; font: inherit; font-size: .92rem; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.soft:hover { filter: brightness(98%); }
.small { padding: 5px 9px; font-size: .9rem; }

/* ── Sign-in ── */
.sign-in-form { display: flex; flex-direction: column; gap: 8px; max-width: 360px; }
.sign-in-form input { padding: .55rem .6rem; border: 1px solid #ccc; border-radius: 8px; font: inherit; font-size: 16px; }

/* ── Lesson rows ── */
.event { padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px; margin: 8px 0; background: #fff; display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.event .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.event input[type=checkbox] { accent-color: var(--green-btn); }
.event input.creditBox { accent-color: #3777cc; }
textarea { width: 100%; padding: .55rem .6rem; border: 1px solid #ccc; border-radius: 8px; font: inherit; font-size: 16px; resize: vertical; box-sizing: border-box; }

/* ── Booking slots ── */
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; margin-top: 8px; }
.slot-btn { background: #eef8ee; border: 1px solid #c3e0c3; border-radius: 8px; padding: 8px; cursor: pointer; text-align: center; font-size: .9rem; transition: background .15s; }
.slot-btn:hover { background: #d5f0d5; }

/* ── Footer ── */
footer { text-align: center; color: #e7f4e7; padding: 1rem; margin: 2rem 0 1rem; font-size: .95rem; }

/* ── Misc ── */
.pill { display: inline-block; background: #eef8ee; border: 1px solid #d7efd7; border-radius: 999px; padding: .2rem .6rem; color: #1a3b1f; margin: 0 0 10px; }
.muted { color: var(--muted); }
.small-text { font-size: .85rem; }

/* ── Student wrap (My Lessons page) ── */
.student-wrap { max-width: 820px; margin: 22px auto; background: #f8f1e3; color: #2a3a2e; padding: 22px 24px; border-radius: 14px; box-shadow: 0 14px 30px rgba(0,0,0,.25); }

/* ── Fireflies ── */
.fireflies { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.fly { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: radial-gradient(circle, #fff, #ffe08a 40%, transparent 60%); box-shadow: 0 0 12px 4px rgba(255,248,190,.8); animation: drift 16s ease-in-out infinite, blink 2.4s ease-in-out infinite; }
@keyframes drift { 0% { transform: translate(0,0); } 50% { transform: translate(40px,-60px); } 100% { transform: translate(0,0); } }
@keyframes blink { 0%,100% { opacity: .2; } 50% { opacity: 1; } }

/* ── Woodshed pill (warm wood with candlelight) ── */
.woodshed-pill {
  display: inline-block;
  padding: .6rem 1.3rem .6rem 1.1rem;
  background: linear-gradient(170deg, #5a3e28 0%, #3d2914 50%, #2e1e0e 100%);
  color: #eedcb0;
  font: 600 .95rem Georgia, serif;
  letter-spacing: .3px;
  text-decoration: none;
  border-radius: 12px;
  border: 1px solid rgba(160, 120, 60, .35);
  position: relative;
  overflow: visible;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, .3),
    0 0 12px 2px rgba(200, 140, 50, .08);
  transition: transform .25s ease, box-shadow .4s ease, color .3s;
  animation: ws-breathe 4s ease-in-out infinite;
}
.woodshed-pill:hover {
  transform: translateY(-1px);
  color: #fff3d4;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, .35),
    0 0 20px 6px rgba(220, 160, 60, .2),
    0 0 40px 10px rgba(200, 140, 50, .08);
}

/* Candlelight glow behind the pill */
.ws-candle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 110%;
  height: 160%;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    rgba(220, 160, 50, .12) 0%,
    rgba(200, 130, 40, .06) 40%,
    transparent 70%
  );
  pointer-events: none;
  animation: ws-flicker 3s ease-in-out infinite alternate;
  z-index: -1;
}

@keyframes ws-breathe {
  0%, 100% {
    box-shadow:
      0 2px 8px rgba(0, 0, 0, .3),
      0 0 12px 2px rgba(200, 140, 50, .08);
  }
  50% {
    box-shadow:
      0 2px 10px rgba(0, 0, 0, .3),
      0 0 18px 4px rgba(210, 150, 50, .14);
  }
}

@keyframes ws-flicker {
  0%   { opacity: .7; transform: translate(-50%, -50%) scale(1); }
  25%  { opacity: .9; transform: translate(-50%, -50%) scale(1.04); }
  50%  { opacity: .75; transform: translate(-50%, -50%) scale(.98); }
  75%  { opacity: .85; transform: translate(-50%, -50%) scale(1.02); }
  100% { opacity: .7; transform: translate(-50%, -50%) scale(1); }
}

/* ── Mobile ── */
@media (max-width: 720px) { .wrap { max-width: 100%; padding: 0 .6rem; } .board { grid-template-columns: 1fr; gap: 1rem; } .column { padding: .9rem; } .title h1 { font-size: 1.7rem; } }
