/* Free Room — styles.css (matches current index.html)
   Calm, anonymous, midnight-safe UI.
*/

:root{
  --bg0:#07080c;
  --bg1:#0b0f18;
  --panel: rgba(255,255,255,0.06);
  --panel2: rgba(255,255,255,0.09);
  --border: rgba(255,255,255,0.12);

  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.70);
  --soft: rgba(255,255,255,0.55);

  --aqua:#7efcff;
  --violet:#b38bff;
  --pink:#ff7ac8;
  --amber:#ffd08a;

  --shadow: 0 24px 70px rgba(0,0,0,0.55);
  --shadow2: 0 16px 46px rgba(0,0,0,0.45);

  --r-xl: 26px;
  --r-lg: 20px;
  --r-md: 16px;
  --r-sm: 12px;

  --max: 1100px;
  --ease: cubic-bezier(.2,.8,.2,1);
}

/* Reset */
*{ margin:0; padding:0; box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  font-family:"Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  line-height: 1.6;
  background:
    radial-gradient(circle at 18% 12%, rgba(179,139,255,0.14), transparent 55%),
    radial-gradient(circle at 82% 18%, rgba(126,252,255,0.10), transparent 55%),
    radial-gradient(circle at 50% 92%, rgba(255,122,200,0.08), transparent 60%),
    linear-gradient(180deg, var(--bg0) 0%, var(--bg1) 60%, var(--bg0) 100%);
  overflow-x:hidden;
}
img,svg,video,canvas{ display:block; max-width:100%; }

a{ color:inherit; text-decoration:none; }
a:hover{ opacity:0.98; }

:focus-visible{
  outline: 3px solid rgba(126,252,255,0.55);
  outline-offset: 3px;
  border-radius: 10px;
}

.container{
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

/* =========================
   Topbar
   ========================= */
.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(7,8,12,0.55);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.topbar-inner{
  min-height: 70px; /* CLS hardening */
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 16px;
}
.brand{
  display:flex;
  align-items:center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.01em;
}
.brand-mark{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(126,252,255,0.95);
  box-shadow: 0 0 14px rgba(126,252,255,0.35);
}
.brand-name{
  font-size: 1.05rem;
}
.topnav{
  display:flex;
  align-items:center;
  gap: 18px;
  font-weight: 800;
  color: rgba(255,255,255,0.80);
}
.topnav a{
  padding: 10px 10px;
  border-radius: 999px;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.topnav a:hover{
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
}

/* =========================
   Buttons
   ========================= */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  font-weight: 900;
  letter-spacing: 0.02em;
  cursor:pointer;
  user-select:none;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease);
}
.btn:hover{
  transform: translateY(-2px);
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.18);
  box-shadow: var(--shadow2);
}
.btn:active{ transform: translateY(0); box-shadow:none; }

.btn-primary{
  border:none;
  background: linear-gradient(135deg, rgba(126,252,255,0.95), rgba(179,139,255,0.92));
  color:#071018;
  box-shadow: 0 16px 50px rgba(126,252,255,0.10);
}
.btn-primary:hover{
  box-shadow: 0 20px 70px rgba(179,139,255,0.16);
}
.btn-secondary{
  background: rgba(0,0,0,0.0);
  border: 1px solid rgba(255,255,255,0.14);
}
.btn-ghost{
  background: rgba(0,0,0,0.0);
  border: 1px solid rgba(255,255,255,0.12);
}

/* =========================
   Hero
   ========================= */
.hero{
  position: relative;
  padding: 56px 0 26px;
  min-height: 340px; /* CLS hardening */
}
.hero-bg{
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(circle at 15% 30%, rgba(126,252,255,0.12), transparent 55%),
    radial-gradient(circle at 80% 20%, rgba(179,139,255,0.16), transparent 55%),
    radial-gradient(circle at 55% 90%, rgba(255,122,200,0.10), transparent 60%);
  opacity: 0.95;
}
.hero-inner{
  position:relative;
  z-index:1;
  display:flex;
  flex-direction:column;
  gap: 14px;
}
.hero-title{
  font-size: 2.55rem;
  line-height: 1.10;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.hero-subtitle{
  color: var(--muted);
  font-weight: 700;
  max-width: 70ch;
}
.hero-actions{
  display:flex;
  flex-wrap:wrap;
  gap: 12px;
  margin-top: 6px;
}

/* Promise */
.hero-promise{
  margin-top: 18px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.promise-card{
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: 0 10px 34px rgba(0,0,0,0.35);
}
.promise-title{
  font-weight: 900;
  margin-bottom: 10px;
  letter-spacing: 0.01em;
}
.promise-list{
  list-style:none;
  display:flex;
  flex-direction:column;
  gap: 8px;
  color: rgba(255,255,255,0.82);
  font-weight: 650;
}
.promise-list li{
  display:flex;
  gap:10px;
  align-items:flex-start;
}
.promise-list li::before{
  content:"";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(126,252,255,0.95);
  box-shadow: 0 0 12px rgba(126,252,255,0.35);
  margin-top: 7px;
}
.promise-text{
  color: rgba(255,255,255,0.78);
  font-weight: 650;
}

/* =========================
   Rooms section
   ========================= */
.rooms{
  padding: 26px 0 56px;
}
.section-head{
  margin-bottom: 18px;
}
.section-title{
  font-size: 1.45rem;
  font-weight: 900;
}
.section-subtitle{
  margin-top: 6px;
  color: var(--muted);
  font-weight: 700;
  max-width: 75ch;
}

.room-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.room-card{
  position:relative;
  display:block;
  padding: 18px;
  border-radius: var(--r-lg);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 10px 34px rgba(0,0,0,0.35);
  overflow:hidden;
  transition: transform .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease);
}
.room-card::before{
  content:"";
  position:absolute;
  inset:-2px;
  background:
    radial-gradient(circle at 18% 20%, rgba(126,252,255,0.12), transparent 55%),
    radial-gradient(circle at 85% 75%, rgba(179,139,255,0.12), transparent 58%);
  pointer-events:none;
  opacity: 0.9;
}
.room-card:hover{
  transform: translateY(-3px);
  border-color: rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.08);
}
.room-name{
  position:relative;
  z-index:1;
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}
.room-desc{
  position:relative;
  z-index:1;
  margin-top: 8px;
  color: rgba(255,255,255,0.74);
  font-weight: 650;
  line-height: 1.45;
}

/* Strong card: “I Just Need to Talk” */
.room-card-strong{
  border-color: rgba(126,252,255,0.18);
}
.room-card-strong::before{
  background:
    radial-gradient(circle at 18% 20%, rgba(126,252,255,0.16), transparent 55%),
    radial-gradient(circle at 85% 75%, rgba(255,122,200,0.10), transparent 58%);
}

/* How it works note */
.rooms-note{
  margin-top: 18px;
  background: rgba(0,0,0,0.20);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--r-xl);
  padding: 22px;
}
.rooms-note-title{
  font-size: 1.12rem;
  font-weight: 900;
  margin-bottom: 10px;
}
.rooms-steps{
  padding-left: 18px;
  color: rgba(255,255,255,0.82);
  font-weight: 650;
  display:flex;
  flex-direction:column;
  gap: 6px;
}
.rooms-note-sub{
  margin-top: 12px;
  color: rgba(255,255,255,0.68);
  font-weight: 650;
}

/* =========================
   Footer
   ========================= */
.footer{
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 28px 0 18px;
  color: rgba(255,255,255,0.62);
}
.footer-inner{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 16px;
}
.footer-brand{
  font-weight: 900;
  color: rgba(255,255,255,0.86);
}
.footer-sub{
  margin-top: 6px;
  color: rgba(255,255,255,0.62);
  font-weight: 650;
}
.footer-links{
  display:flex;
  gap: 14px;
  flex-wrap: wrap;
  font-weight: 900;
}
.footer-links a{
  padding: 10px 10px;
  border-radius: 999px;
  color: rgba(255,255,255,0.74);
  transition: background .18s var(--ease), color .18s var(--ease);
}
.footer-links a:hover{
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.90);
}
.footer-bottom{
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-weight: 650;
  color: rgba(255,255,255,0.52);
}

/* =========================
   Modal
   ========================= */
.modal{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1000;
}
.modal.is-open{ display:block; }

.modal-backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-card{
  position: relative;
  max-width: 560px;
  margin: 10vh auto;
  border-radius: var(--r-xl);
  background: rgba(10,12,18,0.88);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: var(--shadow);
  overflow:hidden;
  padding: 22px;
}
.modal-card::before{
  content:"";
  position:absolute;
  inset:-2px;
  background:
    radial-gradient(circle at 15% 20%, rgba(126,252,255,0.14), transparent 55%),
    radial-gradient(circle at 82% 28%, rgba(179,139,255,0.16), transparent 55%),
    radial-gradient(circle at 55% 95%, rgba(255,122,200,0.10), transparent 60%);
  pointer-events:none;
  opacity: 0.9;
}
.modal-close{
  position:absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.86);
  font-size: 22px;
  font-weight: 900;
  cursor:pointer;
  transition: transform .18s var(--ease), background .18s var(--ease);
  z-index:2;
}
.modal-close:hover{ transform: translateY(-2px); background: rgba(255,255,255,0.09); }

.modal-head{ position:relative; z-index:1; margin-bottom: 12px; }
.modal-kicker{
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.64);
}
.modal-title{
  margin-top: 6px;
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.modal-body{ position:relative; z-index:1; }

.field{ display:block; margin-top: 14px; }
.field-label{
  display:block;
  font-weight: 900;
  margin-bottom: 8px;
  color: rgba(255,255,255,0.84);
}
.field-row{
  display:flex;
  gap: 10px;
  align-items:center;
}
.input{
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.25);
  color: var(--text);
  font-family: inherit;
  font-weight: 700;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), transform .18s var(--ease);
}
.input::placeholder{ color: rgba(255,255,255,0.48); font-weight: 650; }
.input:focus{
  outline:none;
  border-color: rgba(126,252,255,0.35);
  box-shadow: 0 0 0 4px rgba(126,252,255,0.10);
  transform: translateY(-1px);
}
.field-help{
  display:block;
  margin-top: 8px;
  color: rgba(255,255,255,0.58);
  font-weight: 650;
  font-size: 0.92rem;
}

.check{
  margin-top: 14px;
  display:flex;
  align-items:center;
  gap: 10px;
  font-weight: 800;
  color: rgba(255,255,255,0.82);
}
.check input{
  width: 18px;
  height: 18px;
  accent-color: rgba(126,252,255,0.85);
}

.modal-actions{
  margin-top: 16px;
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}
.modal-footnote{
  margin-top: 14px;
  color: rgba(255,255,255,0.60);
  font-weight: 650;
  font-size: 0.92rem;
}

/* =========================
   Quiet Mode (optional visual)
   ========================= */
body.quiet-mode .hero-bg{
  opacity: 0.55;
  filter: saturate(0.85);
}
body.quiet-mode .room-card::before{
  opacity: 0.55;
}
body.quiet-mode .btn-primary{
  background: linear-gradient(135deg, rgba(126,252,255,0.85), rgba(179,139,255,0.80));
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 980px){
  .hero-title{ font-size: 2.15rem; }
  .hero-promise{ grid-template-columns: 1fr; }
}

@media (max-width: 860px){
  .room-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .topnav{ gap: 8px; }
}

@media (max-width: 560px){
  .topnav{ display:none; } /* keep it clean on tiny screens */
  .hero{ padding: 42px 0 22px; }
  .hero-title{ font-size: 1.85rem; }
  .room-grid{ grid-template-columns: 1fr; }
  .modal-card{ margin: 8vh 16px; }
  .field-row{ flex-direction: column; align-items: stretch; }
}

/* =========================
   ROOM PAGE (Stage-1 Shell)
========================= */

.room-shell { padding: 44px 0 70px; }

.room-head { margin: 12px 0 22px; }
.room-kicker { opacity: .8; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; }
.room-title { margin: 8px 0 10px; font-size: clamp(32px, 4vw, 46px); line-height: 1.05; }
.room-meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 10px; }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(10px);
  font-weight: 700;
  font-size: 13px;
}
.pill-soft { background: rgba(255,255,255,.10); }
.pill-outline { background: transparent; border-style: dashed; opacity: .9; }

.room-sub { max-width: 70ch; opacity: .9; }

.room-grid-shell {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 18px;
  margin-top: 18px;
}
@media (max-width: 980px) {
  .room-grid-shell { grid-template-columns: 1fr; }
}

.panel {
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.22);
  backdrop-filter: blur(12px);
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.panel-title { font-weight: 900; font-size: 16px; }
.panel-sub { opacity: .85; font-size: 13px; }

.panel-body { padding: 16px 18px 18px; }

.big-badge {
  display: inline-flex;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  font-weight: 800;
  margin-bottom: 12px;
}

.controls { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0 12px; }

.hint {
  opacity: .85;
  font-size: 13px;
  line-height: 1.35;
  border-left: 3px solid rgba(255,255,255,.18);
  padding-left: 10px;
}

.chat-log {
  height: 280px;
  overflow: auto;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.22);
  padding: 12px;
  margin-bottom: 12px;
}
.chat-msg { padding: 10px 10px; border-radius: 12px; background: rgba(255,255,255,.05); }
.chat-msg + .chat-msg { margin-top: 10px; }
.chat-name { font-weight: 900; font-size: 12px; opacity: .9; margin-bottom: 4px; }
.chat-text { opacity: .95; line-height: 1.35; }

.chat-compose { display: flex; gap: 10px; }
.chat-compose .input { flex: 1; }

.room-footer-note {
  margin-top: 18px;
  opacity: .9;
  font-size: 13px;
}
.room-bottom-actions { margin-top: 18px; }

