@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=DM+Sans:wght@300;400;500&display=swap');

/* ── Variables ── */
:root {
  --bg:        #0a0a0f;
  --surface:   #111118;
  --border:    #1e1e2e;
  --border-hi: #2e2e4e;
  --accent:    #c9a84c;
  --accent-lo: rgba(201,168,76,0.12);
  --accent-md: rgba(201,168,76,0.25);
  --text:      #e8e8f0;
  --text-dim:  #7070a0;
  --text-mute: #3a3a5a;
  --danger:    #c0444a;
  --radius:    12px;
  --radius-lg: 20px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  overflow: hidden;
}

/* ── Screens ── */
.screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  overflow-y: auto;
}
.screen.active { opacity: 1; pointer-events: all; }

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.4;
  pointer-events: none;
}
.bg-glow {
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(ellipse at center, rgba(201,168,76,0.08) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Header ── */
.site-header {
  text-align: center;
  margin-bottom: 2rem;
  animation: fadeUp 0.6s ease both;
}
.site-logo-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 0.5rem;
  animation: fadeUp 0.5s ease both;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.logo span { color: var(--accent); }
.logo.small { font-size: 1.1rem; }
.tagline { margin-top: 0.4rem; color: var(--text-dim); font-size: 0.9rem; font-weight: 300; }

/* ── Landing ── */
.landing-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
  max-width: 500px;
  padding: 0 1.25rem 3rem;
  animation: fadeUp 0.6s 0.1s ease both;
  position: relative;
  z-index: 1;
}

.card {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}
.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  margin-bottom: 1.25rem;
}

.field { display: flex; flex-direction: column; gap: 0.45rem; margin-bottom: 1.1rem; }
.field:last-of-type { margin-bottom: 0.5rem; }

label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

input[type="text"] {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  padding: 0.7rem 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input[type="text"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-lo);
}
input::placeholder { color: var(--text-mute); }

/* ── Faith Picker ── */
.faith-picker {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  z-index: 100;
}
.faith-selected {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.9rem;
  cursor: pointer;
  user-select: none;
  font-size: 0.9rem;
  color: var(--text);
}
.faith-selected:hover { background: rgba(255,255,255,0.03); }
.faith-icon {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  background: var(--surface);
  border-radius: 6px;
  flex-shrink: 0;
}
.fp-arrow {
  margin-left: auto;
  color: var(--text-dim);
  font-size: 0.8rem;
  transition: transform 0.2s;
}
.faith-picker.open .fp-arrow { transform: rotate(180deg); }

.faith-dropdown {
  display: none;
  border-top: 1px solid var(--border);
  max-height: 300px;
  overflow-y: auto;
  background: var(--bg);
}
.faith-dropdown::-webkit-scrollbar { width: 4px; }
.faith-dropdown::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 4px; }
.faith-picker.open .faith-dropdown { display: block; }

.faith-group-label {
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-mute);
  padding: 0.6rem 0.9rem 0.3rem;
  background: var(--surface);
  position: sticky;
  top: 0;
}
.faith-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  font-size: 0.87rem;
  color: var(--text-dim);
  transition: background 0.1s, color 0.1s;
}
.faith-option:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.faith-option.selected { background: var(--accent-lo); color: var(--accent); }
.faith-option .faith-icon { background: rgba(255,255,255,0.04); }

.custom-faith-wrap {
  display: none;
  margin-top: 0.5rem;
}
.custom-faith-wrap.show { display: block; }

/* ── Match Picker dropdown ── */
.mp-picker {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  z-index: 99;
}
.mp-selected {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.9rem;
  cursor: pointer;
  user-select: none;
  font-size: 0.9rem;
  color: var(--text);
}
.mp-selected:hover { background: rgba(255,255,255,0.03); }
.mp-picker.open .fp-arrow { transform: rotate(180deg); }

.mp-dropdown {
  display: none;
  border-top: 1px solid var(--border);
  max-height: 300px;
  overflow-y: auto;
  background: var(--bg);
}
.mp-dropdown::-webkit-scrollbar { width: 4px; }
.mp-dropdown::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 4px; }
.mp-picker.open .mp-dropdown { display: block; }

.mp-search-bar {
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 1;
}
.mp-search-bar input {
  padding: 0.45rem 0.7rem;
  font-size: 0.82rem;
  background: var(--surface);
}

.mp-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  font-size: 0.87rem;
  color: var(--text-dim);
  transition: background 0.1s, color 0.1s;
}
.mp-option:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.mp-option.selected { background: var(--accent-lo); color: var(--accent); }

.mp-empty {
  padding: 1rem;
  font-size: 0.82rem;
  color: var(--text-mute);
  text-align: center;
  font-style: italic;
}

/* ── Toggle group ── */
.toggle-group { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.toggle-btn {
  flex: 1;
  min-width: 90px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-dim);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  padding: 0.55rem 0.6rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.toggle-btn:hover { border-color: var(--border-hi); color: var(--text); }
.toggle-btn.active { background: var(--accent-lo); border-color: var(--accent); color: var(--accent); }

/* ── Buttons ── */
.btn-primary {
  width: 100%;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  color: #0a0a0f;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.85rem;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  margin-top: 0.5rem;
}
.btn-primary:hover:not(:disabled) { opacity: 0.88; transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.3; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-dim);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  padding: 0.65rem 1.25rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-ghost:hover { border-color: var(--border-hi); color: var(--text); }
.btn-ghost.small { padding: 0.4rem 0.8rem; font-size: 0.8rem; }

.btn-danger {
  background: rgba(192,68,74,0.15);
  border: 1px solid rgba(192,68,74,0.35);
  border-radius: var(--radius);
  color: #e07070;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-danger:hover { background: rgba(192,68,74,0.28); }

.disclaimer { text-align: center; font-size: 0.75rem; color: var(--text-mute); margin-top: 0.65rem; }

/* ── Stats ── */
.stats-strip {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.65rem 1.5rem;
}
.stat { display: flex; flex-direction: column; align-items: center; gap: 0.05rem; }
.stat-num { font-family: 'Playfair Display', serif; font-size: 1.05rem; color: var(--accent); }
.stat-label { font-size: 0.7rem; color: var(--text-dim); white-space: nowrap; }
.stat-divider { width: 1px; height: 26px; background: var(--border); }

/* ── Waiting ── */
.waiting-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  position: relative;
  z-index: 1;
}
.waiting-title { font-family: 'Playfair Display', serif; font-size: 1.5rem; }
.waiting-sub { color: var(--text-dim); font-size: 0.9rem; }

.spinner-ring {
  width: 56px;
  height: 56px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 0.4rem;
}
.disc-icon { font-size: 2.2rem; color: var(--accent); margin-bottom: 0.4rem; animation: pulse 2s ease infinite; }

/* ── Chat ── */
#screen-chat { flex-direction: column; justify-content: flex-start; align-items: stretch; }

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
  gap: 1rem;
}
.chat-header-left { display: flex; align-items: center; gap: 0.9rem; }
.chat-header-right { display: flex; align-items: center; gap: 0.5rem; }
.match-info { display: flex; flex-direction: column; gap: 0.05rem; }
.match-name { font-weight: 500; font-size: 0.9rem; }
.match-faith { font-size: 0.73rem; color: var(--accent); }
.style-badge {
  font-size: 0.7rem;
  padding: 0.22rem 0.6rem;
  border-radius: 100px;
  background: var(--accent-lo);
  border: 1px solid var(--accent-md);
  color: var(--accent);
  white-space: nowrap;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  scroll-behavior: smooth;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 4px; }

.message { display: flex; flex-direction: column; max-width: 70%; animation: fadeUp 0.25s ease both; }
.message.mine { align-self: flex-end; align-items: flex-end; }
.message.theirs { align-self: flex-start; align-items: flex-start; }
.message-bubble {
  padding: 0.6rem 0.95rem;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.5;
  word-break: break-word;
}
.message.mine .message-bubble { background: var(--accent); color: #0a0a0f; border-bottom-right-radius: 4px; }
.message.theirs .message-bubble { background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.message-meta { font-size: 0.68rem; color: var(--text-mute); margin-top: 0.2rem; padding: 0 0.2rem; }

.system-msg {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-mute);
  padding: 0.35rem 1rem;
  background: var(--accent-lo);
  border: 1px solid var(--border);
  border-radius: 100px;
  align-self: center;
}
.system-msg:empty { display: none; }

.chat-input-bar {
  display: flex;
  align-items: flex-end;
  gap: 0.7rem;
  padding: 0.9rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}
#chat-input {
  flex: 1;
  resize: none;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  padding: 0.65rem 0.9rem;
  outline: none;
  max-height: 120px;
  overflow-y: auto;
  transition: border-color 0.2s;
  line-height: 1.5;
}
#chat-input:focus { border-color: var(--accent); }
#chat-input::placeholder { color: var(--text-mute); }
.btn-send {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  color: #0a0a0f;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s, transform 0.15s;
}
.btn-send:hover { opacity: 0.85; transform: scale(1.05); }
.btn-send svg { width: 15px; height: 15px; }

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ── Responsive ── */
@media (max-width: 520px) {
  .landing-main { padding: 0 1rem 3rem; }
  .card { padding: 1.25rem; }
  .toggle-btn { min-width: 80px; }
  .message { max-width: 88%; }
  .stats-strip { gap: 1rem; padding: 0.6rem 1.1rem; }
}

/* ══════════════════════════════════════════════
   VIDEO CHAT — style additions
   Append these rules to the bottom of style.css
   ══════════════════════════════════════════════ */

/* ── Mode picker on landing ── */
.mode-picker {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  margin-bottom: 0.2rem;
}
.mode-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.9rem 0.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-dim);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.mode-btn:hover { border-color: var(--border-hi); color: var(--text); }
.mode-btn.active {
  background: var(--accent-lo);
  border-color: var(--accent);
  color: var(--accent);
}
.mode-btn-icon { font-size: 1.35rem; }
.mode-btn-label { font-size: 0.78rem; }
.mode-btn-badge {
  position: absolute;
  top: 0.3rem; right: 0.4rem;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.12rem 0.35rem;
  border-radius: 100px;
  background: var(--accent);
  color: #0a0a0f;
  opacity: 0.9;
}

/* ── Video Screen ── */
#screen-video {
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  background: #080810;
}

.video-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
  height: 100%;
}

/* ── Video Stage (left) ── */
.video-stage {
  flex: 1;
  position: relative;
  background: #050508;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.video-remote {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #050508;
}

.video-remote-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-mute);
}
.video-remote-placeholder .placeholder-icon { font-size: 3rem; opacity: 0.4; }
.video-remote-placeholder p { font-size: 0.82rem; }

/* Local pip */
.video-local-pip {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  width: 160px;
  aspect-ratio: 4/3;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.1);
  background: #0a0a14;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  transition: transform 0.2s;
  z-index: 10;
}
.video-local-pip:hover { transform: scale(1.03); }
.video-local-pip video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1); /* mirror */
}
.pip-label {
  position: absolute;
  bottom: 0.3rem;
  left: 0.4rem;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(255,255,255,0.5);
  pointer-events: none;
}
.pip-cam-off {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: #0a0a14;
  font-size: 1.5rem;
  color: var(--text-mute);
}
.pip-cam-off.show { display: flex; }

/* Match name overlay */
.video-match-overlay {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 100px;
  padding: 0.3rem 0.75rem 0.3rem 0.45rem;
  z-index: 10;
}
.video-match-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #4caf50;
  flex-shrink: 0;
}
.video-match-overlay-name { font-size: 0.8rem; color: #fff; }
.video-match-overlay-faith { font-size: 0.72rem; color: var(--accent); }

/* Controls bar */
.video-controls {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(10,10,20,0.75);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 100px;
  padding: 0.6rem 1rem;
  z-index: 20;
  white-space: nowrap;
}
.ctrl-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.18s;
  background: rgba(255,255,255,0.08);
  color: #fff;
}
.ctrl-btn:hover { background: rgba(255,255,255,0.15); transform: scale(1.08); }
.ctrl-btn.off { background: rgba(192,68,74,0.35); color: #ff9090; }
.ctrl-btn.danger { background: rgba(192,68,74,0.8); }
.ctrl-btn.danger:hover { background: rgba(192,68,74,1); }
.ctrl-divider { width: 1px; height: 22px; background: rgba(255,255,255,0.1); margin: 0 0.1rem; }

/* Camera selector */
.cam-select-wrap {
  position: relative;
}
.cam-select {
  appearance: none;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 100px;
  color: rgba(255,255,255,0.7);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  max-width: 120px;
  outline: none;
  transition: background 0.15s;
}
.cam-select:focus, .cam-select:hover { background: rgba(255,255,255,0.14); }
.cam-select option { background: #111118; color: #e8e8f0; }

/* ── Side panel (right) ── */
.video-side-panel {
  width: 300px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
  background: var(--surface);
}
.side-panel-header {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.side-panel-title {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}
.side-panel-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  scroll-behavior: smooth;
}
.side-panel-msgs::-webkit-scrollbar { width: 3px; }
.side-panel-msgs::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 3px; }
.side-panel-input-bar {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
#video-chat-input {
  flex: 1;
  resize: none;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  padding: 0.55rem 0.8rem;
  outline: none;
  max-height: 90px;
  overflow-y: auto;
  transition: border-color 0.2s;
  line-height: 1.5;
}
#video-chat-input:focus { border-color: var(--accent); }
#video-chat-input::placeholder { color: var(--text-mute); }

/* Connecting overlay */
.video-connecting-overlay {
  position: absolute;
  inset: 0;
  background: rgba(8,8,16,0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  z-index: 30;
  backdrop-filter: blur(4px);
}
.video-connecting-overlay.hidden { display: none; }
.connecting-spinner {
  width: 44px; height: 44px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
.connecting-text { font-size: 0.88rem; color: var(--text-dim); }

/* Responsive: collapse side panel on small screens */
@media (max-width: 640px) {
  .video-side-panel { width: 0; overflow: hidden; border: none; }
  .video-layout { flex-direction: column; }
  .video-stage { flex: 1; min-height: 0; }
  .video-local-pip { width: 100px; }
  .cam-select { max-width: 80px; font-size: 0.65rem; }
}

/* ── Developer Badge ── */
.dev-badge {
  position: fixed;
  top: 1rem;
  left: 1rem;

  display: flex;
  align-items: center;
  gap: 0.75rem;

  padding: 0.7rem 0.95rem;

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0.04),
      rgba(255,255,255,0.015)
    );

  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;

  backdrop-filter: blur(12px);

  text-decoration: none;
  color: var(--text);

  z-index: 1000;

  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.dev-badge:hover {
  transform: translateY(-2px);
  border-color: var(--accent-md);

  background:
    linear-gradient(
      180deg,
      rgba(201,168,76,0.10),
      rgba(201,168,76,0.04)
    );

  box-shadow:
    0 10px 30px rgba(0,0,0,0.35),
    0 0 0 1px rgba(201,168,76,0.12);
}

.dev-badge:active {
  transform: translateY(0);
}

.dev-badge-icon {
  width: 38px;
  height: 38px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 12px;

  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);

  color: var(--accent);

  flex-shrink: 0;
}

.dev-badge-icon svg {
  width: 18px;
  height: 18px;
}

.dev-badge-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.dev-badge-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-mute);
}

.dev-badge-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);

  transition: color 0.2s ease;
}

.dev-badge:hover .dev-badge-link {
  color: var(--accent);
}

/* Mobile */
@media (max-width: 640px) {
  .dev-badge {
    top: 0.75rem;
    left: 0.75rem;

    padding: 0.6rem 0.8rem;
    gap: 0.6rem;
  }

  .dev-badge-icon {
    width: 34px;
    height: 34px;
  }

  .dev-badge-link {
    font-size: 0.74rem;
  }
}

.dev-badge-icon img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}