@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;1,400&family=Nunito:wght@300;400;500;600;700&display=swap');

:root {
  --bg:          #d4d6d9;
  --bg2:         #c4c6ca;
  --surface:     #e8eaec;
  --border:      #bbbec4;
  --text:        #1c2127;
  --text-dim:    #888c94;
  --card-bg:     #44474e;
  --card-border: #55585f;
  --gold:        #d4a843;
  --gold-light:  rgba(212,168,67,0.15);
  --gold-dim:    rgba(212,168,67,0.3);
  --red:         #c94040;
  --red-light:   #fce8e8;
  --green:       #7ec89a;
  --green-light: #d8f0e4;
  --shadow:      0 2px 14px rgba(0,0,0,0.1);
  --shadow-lg:   0 8px 30px rgba(0,0,0,0.15);
  --radius:      12px;
  --radius-sm:   8px;
  --radius-lg:   22px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── HEADER ─────────────────────────────────────── */
.header {
  background: linear-gradient(135deg, #18304a 0%, #1e4266 100%);
  padding: 20px 20px 40px;
  position: relative;
  overflow: hidden;
}
.header::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 26px;
  background: var(--bg);
  border-radius: 26px 26px 0 0;
}
.trinity-watermark {
  position: absolute;
  right: -10px; top: -10px;
  z-index: 0;
  pointer-events: none;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}
.logo {
  font-family: 'Lora', serif;
  font-size: 30px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: -1px;
}
.tagline {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.5px;
  margin-top: 2px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.btn-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--gold-light);
  border: 1.5px solid var(--gold-dim);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  cursor: pointer;
  color: var(--gold);
  text-decoration: none;
  transition: background 0.2s;
}
.btn-icon:active { background: var(--gold-dim); }

.btn-new {
  background: transparent;
  color: var(--gold);
  border: 1.5px solid var(--gold);
  border-radius: 50px;
  padding: 9px 18px;
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

/* ── BACK NAV ────────────────────────────────────── */
.nav-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}
.back-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--gold-light);
  border: 1.5px solid var(--gold-dim);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  cursor: pointer;
  color: var(--gold);
  text-decoration: none;
}
.header-title {
  font-family: 'Lora', serif;
  font-size: 20px;
  font-weight: 400;
  color: #fff;
}
.header-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  background: var(--gold-light);
  border: 1px solid var(--gold-dim);
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

/* ── CONTENT ─────────────────────────────────────── */
.content { padding: 0 16px 100px; }

/* ── FORM ────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
  display: block;
}
.form-input, .form-textarea {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}
.form-input:focus, .form-textarea:focus { border-color: var(--gold); }
.form-textarea { resize: none; line-height: 1.5; }
.form-hint { font-size: 12px; color: var(--text-dim); margin-top: 5px; line-height: 1.5; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── BUTTONS ─────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 50px;
  padding: 14px 24px;
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
  width: 100%;
}
.btn:active { transform: scale(0.98); }
.btn-primary  { background: var(--gold); color: #1c2127; box-shadow: 0 3px 14px rgba(212,168,67,0.3); }
.btn-teal     { background: #2e7d9a; color: #fff; box-shadow: 0 3px 14px rgba(46,125,154,0.28); }
.btn-pink     { background: #d96b8a; color: #fff; box-shadow: 0 3px 14px rgba(217,107,138,0.28); }
.btn-outline  { background: transparent; color: var(--text-dim); border: 1.5px solid var(--border); box-shadow: none; }
.btn-danger   { background: transparent; color: var(--red); border: 1.5px solid rgba(201,64,64,0.3); box-shadow: none; }

/* ── MEETUP CARDS ────────────────────────────────── */
.meetup-card {
  display: block; text-decoration: none; color: inherit;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 15px 15px 13px 19px; margin-bottom: 10px;
  box-shadow: var(--shadow); transition: all 0.2s;
  position: relative; overflow: hidden;
}
.meetup-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--gold);
  border-radius: 4px 0 0 4px;
}
.meetup-card:active { transform: scale(0.99); box-shadow: var(--shadow-lg); }
.card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.date-pill { background: var(--gold-light); color: var(--gold); border-radius: 20px; padding: 3px 10px; font-size: 11px; font-weight: 700; }
.time-pill { background: rgba(255,255,255,0.07); color: #9a9ea6; border-radius: 20px; padding: 3px 10px; font-size: 11px; font-weight: 600; }
.card-title { font-family: 'Lora', serif; font-size: 18px; font-weight: 600; margin-bottom: 4px; color: #f0f1f3; line-height: 1.3; }
.card-location { font-size: 13px; color: #9a9ea6; margin-bottom: 7px; }
.card-desc { font-size: 14px; color: #c2c5cb; opacity: 0.9; line-height: 1.5; margin-bottom: 9px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-footer { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid rgba(255,255,255,0.07); padding-top: 9px; }
.going-count { font-size: 13px; color: var(--green); font-weight: 700; }
.spots-warn { color: var(--red); }
.count-strip {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; padding: 0 2px;
}
.count-label { font-size: 10px; font-weight: 700; color: var(--text-dim); letter-spacing: 1.5px; text-transform: uppercase; }

/* ── EMPTY STATE ─────────────────────────────────── */
.empty-state { text-align: center; padding: 64px 20px; }
.empty-icon { margin-bottom: 16px; }
.empty-title { font-family: 'Lora', serif; font-size: 22px; font-weight: 400; margin-bottom: 8px; color: var(--text); }
.empty-text { font-size: 14px; color: var(--text-dim); line-height: 1.6; margin-bottom: 28px; }

/* ── ALERTS ──────────────────────────────────────── */
.alert { border-radius: var(--radius-sm); padding: 13px 16px; font-size: 14px; margin-bottom: 16px; line-height: 1.5; }
.alert-error   { background: var(--red-light);   border: 1px solid rgba(201,64,64,0.2);   color: var(--red);   }
.alert-success { background: var(--green-light);  border: 1px solid rgba(46,125,82,0.2);   color: #2e7d52;      }
.alert-info    { background: var(--gold-light);   border: 1px solid var(--gold-dim);        color: #a07820;      }
.alert-pink    { background: #fce8ef;             border: 1px solid rgba(217,107,138,0.2);  color: #d96b8a;      }

/* ── MISC ────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 20px 0; opacity: 0.6; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--bg2); border-radius: 20px;
  padding: 5px 12px; font-size: 13px; color: var(--text);
  margin: 0 4px 6px 0;
}
.section-label {
  font-size: 11px; font-weight: 700; color: var(--text-dim);
  letter-spacing: 1px; text-transform: uppercase; margin-bottom: 12px;
}
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.stat-card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 16px; text-align: center;
}
.stat-num { font-family: 'Lora', serif; font-size: 30px; font-weight: 600; color: var(--gold); }
.stat-label { font-size: 11px; font-weight: 700; color: #9a9ea6; letter-spacing: 1px; text-transform: uppercase; margin-top: 2px; }

/* ── LOCK MODAL ──────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(10,20,30,0.6);
  backdrop-filter: blur(5px);
  z-index: 200;
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.28s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-sheet {
  background: var(--card-bg);
  border-radius: 24px 24px 0 0;
  padding: 24px 20px 48px;
  width: 100%; max-width: 480px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}
.modal-overlay.open .modal-sheet { transform: translateY(0); }
.modal-handle { width: 40px; height: 4px; background: var(--card-border); border-radius: 2px; margin: 0 auto 22px; }
.modal-title { font-family: 'Lora', serif; font-size: 21px; text-align: center; margin-bottom: 5px; color: #f0f1f3; }
.modal-sub { font-size: 13px; color: #9a9ea6; text-align: center; margin-bottom: 24px; }
.modal-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.modal-option {
  background: rgba(255,255,255,0.05); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 22px 12px;
  text-align: center; cursor: pointer; text-decoration: none; color: #f0f1f3;
  transition: all 0.2s; display: block;
}
.modal-option:active { transform: scale(0.97); background: rgba(255,255,255,0.1); }
.modal-option-icon { font-size: 34px; margin-bottom: 10px; }
.modal-option-label { font-size: 14px; font-weight: 700; margin-bottom: 4px; color: var(--gold); }
.modal-option-sub { font-size: 12px; color: #9a9ea6; line-height: 1.4; }

/* ── INFO CARD ───────────────────────────────────── */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.info-card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 14px;
}
.info-label { font-size: 10px; font-weight: 700; color: #9a9ea6; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 4px; }
.info-value { font-size: 16px; font-weight: 600; color: #f0f1f3; }

/* ── KEY/TOKEN BOX ───────────────────────────────── */
.key-box {
  background: var(--card-bg); border: 1.5px dashed var(--gold);
  border-radius: var(--radius-sm); padding: 14px 16px;
  font-family: 'Courier New', monospace; font-size: 15px;
  color: var(--gold); word-break: break-all; line-height: 1.6;
  margin-bottom: 8px;
}
.token-box {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius-sm); padding: 10px 14px;
  font-size: 12px; color: #9a9ea6; word-break: break-all;
  margin-bottom: 14px;
}
