/* ════════════════════════════════════════════════════════════════════════════
   gate.css
   Site password gate (#finleys-gate) and access-denied overlay (#access-denied).
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Gate overlay ── */
#finleys-gate {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  font-family: 'DM Sans', system-ui, sans-serif;
}
#finleys-gate.hidden { display: none; }

.gate-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 22px;
  padding: 2.25rem 2.5rem 2rem;
  width: 90%; max-width: 380px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.09);
  backdrop-filter: blur(40px);
  display: flex; flex-direction: column; align-items: center;
  position: relative; overflow: hidden;
}
.gate-card::before {
  content: ''; position: absolute;
  top: 0; left: 10%; right: 10%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
}

.gate-lock  { font-size: 2rem; margin-bottom: 0.9rem; }
.gate-title { font-size: 1.05rem; font-weight: 800; color: var(--text); margin-bottom: 0.3rem; }
.gate-hint  { font-size: 0.78rem; color: rgba(255,255,255,0.4); margin-bottom: 1.4rem; text-align: center; }

.gate-input {
  width: 100%;
  background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px; color: var(--text);
  font-size: 0.9rem; padding: 0.65rem 0.9rem;
  outline: none; margin-bottom: 0.75rem;
  font-family: inherit; transition: border-color 0.15s;
}
.gate-input:focus { border-color: rgba(124,92,252,0.55); }

.gate-btn {
  width: 100%;
  background: linear-gradient(135deg, #7c5cfc, #6344e0);
  border: none; border-radius: 10px;
  color: var(--text); font-size: 0.88rem; font-weight: 700;
  padding: 0.7rem 1rem; cursor: pointer;
  font-family: inherit; transition: opacity 0.15s;
}
.gate-btn:hover { opacity: 0.9; }

.gate-err {
  font-size: 0.78rem; color: var(--red);
  margin-top: 0.6rem; min-height: 1em; text-align: center;
}

.gate-spinner {
  width: 36px; height: 36px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: gate-spin 0.75s linear infinite;
  margin-bottom: 1.1rem; display: none;
}
@keyframes gate-spin { to { transform: rotate(360deg); } }

/* Remember-me checkbox */
.gate-remember-wrap {
  display: none; align-items: center; gap: 0.5rem;
  font-size: 0.74rem; color: var(--text-dim);
  cursor: pointer; align-self: flex-start;
  margin-top: -0.35rem; margin-bottom: 0.65rem;
  user-select: none;
}
.gate-remember-wrap input[type=checkbox] { display: none; }
.gate-check-box {
  width: 15px; height: 15px; border-radius: 4px;
  border: 1.5px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.3); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; font-size: 0.62rem; color: transparent;
}
.gate-remember-wrap input:checked ~ .gate-check-box {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.gate-remember-wrap:hover .gate-check-box { border-color: var(--accent-border); }

/* ── Access denied overlay ── */
#access-denied {
  display: none; position: fixed; inset: 0; z-index: 9998;
  background: var(--bg);
  flex-direction: column; align-items: center; justify-content: center;
}
#access-denied.visible { display: flex; }

.ad-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 22px; padding: 2.25rem 2.5rem 2rem;
  width: 90%; max-width: 380px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.09);
  backdrop-filter: blur(40px);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center;
  gap: 0.5rem; text-align: center;
}
.ad-card::before {
  content: ''; position: absolute;
  top: 0; left: 10%; right: 10%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
}
.ad-icon  { font-size: 2rem; margin-bottom: 0.5rem; }
.ad-title { font-size: 1.05rem; font-weight: 800; color: var(--text); }
.ad-hint  { font-size: 0.78rem; color: rgba(255,255,255,0.4); margin-bottom: 1rem; }
.ad-home  {
  display: inline-block; padding: 0.55rem 1.3rem;
  background: linear-gradient(135deg, #7c5cfc, #6344e0);
  border: none; border-radius: 10px;
  color: var(--text); font-size: 0.85rem; font-weight: 700;
  text-decoration: none; font-family: inherit;
}
.ad-home:hover { opacity: 0.9; }
