/* ============================================================
   Quick Read Hotmail — "Azure" theme
   Electric blue → cyan, glassy & animated
   ============================================================ */

:root {
  --bg: #060a13;
  --bg-2: #0a1322;
  --card: rgba(16, 26, 46, 0.55);
  --ink: #eaf2ff;
  --muted: #93a6c4;
  --brand: #3b82f6;
  --brand-2: #2563eb;
  --accent: #0ea5e9;
  --cyan: #22d3ee;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --err: #ff7a90;
  --ok: #4ade80;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  --grad: linear-gradient(120deg, #2563eb, #3b82f6 50%, #22d3ee);
  --grad-soft: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(14, 165, 233, 0.95));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Animated nebula background */
body::before {
  content: "";
  position: fixed;
  inset: -25%;
  z-index: -2;
  background:
    radial-gradient(40% 40% at 15% 20%, rgba(37, 99, 235, 0.30), transparent 60%),
    radial-gradient(40% 40% at 85% 15%, rgba(14, 165, 233, 0.24), transparent 60%),
    radial-gradient(45% 45% at 70% 85%, rgba(34, 211, 238, 0.20), transparent 60%),
    radial-gradient(40% 40% at 25% 90%, rgba(59, 130, 246, 0.18), transparent 60%);
  filter: blur(30px);
  animation: float 22s ease-in-out infinite alternate;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 50% -10%, rgba(59, 130, 246, 0.14), transparent 45%),
    linear-gradient(180deg, rgba(6, 10, 19, 0.1), var(--bg) 85%);
}
@keyframes float {
  0%   { transform: translate3d(0,0,0) rotate(0deg) scale(1); }
  100% { transform: translate3d(2%, -4%, 0) rotate(4deg) scale(1.1); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero, .tool-card, #login-view, #panel-view { animation: rise .65s cubic-bezier(.2,.8,.2,1) both; }
.tool-card { animation-delay: .08s; }

@keyframes shimmer { to { background-position: 200% center; } }

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  background: rgba(10, 19, 34, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 13px; font-weight: 700; font-size: 20px; }
.logo {
  width: 42px; height: 42px; display: grid; place-items: center;
  background: var(--grad); background-size: 200% auto;
  color: #fff; border-radius: 14px; font-size: 20px; font-weight: 800;
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.5);
  animation: shimmer 5s linear infinite;
}
.brand-name {
  background: linear-gradient(90deg, #ffffff, #dbeafe, #a5f3fc);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  letter-spacing: -0.02em;
}
.brand-name .by {
  font-size: 0.62em; font-weight: 500; letter-spacing: 0.04em;
  -webkit-text-fill-color: var(--accent); color: var(--accent);
  opacity: 0.95;
}
.top-actions { display: flex; gap: 10px; }

.btn-ghost, .btn-solid {
  text-decoration: none; font-weight: 600; font-size: 13.5px;
  padding: 11px 20px; border-radius: 14px; cursor: pointer; border: 1px solid transparent;
  transition: all .25s cubic-bezier(.2,.8,.2,1); position: relative;
}
.btn-ghost { color: var(--ink); background: rgba(255,255,255,0.05); border-color: var(--line); }
.btn-ghost:hover { background: rgba(255,255,255,0.1); border-color: var(--line-strong); transform: translateY(-1px); }
.btn-solid {
  background: var(--grad); background-size: 200% auto;
  color: #fff; font-weight: 700;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.4);
}
.btn-solid:hover { background-position: right center; transform: translateY(-2px); box-shadow: 0 16px 40px rgba(14, 165, 233, 0.45); }
.btn-solid:active { transform: translateY(0); }
.btn-solid.big { font-size: 15px; padding: 15px 36px; }
.btn-solid:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------- Layout ---------- */
.content { max-width: 880px; margin: 0 auto; padding: 64px 24px 40px; }

/* ---------- Hero ---------- */
.hero { text-align: center; margin-bottom: 40px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .03em;
  color: #e0efff; background: rgba(59, 130, 246, 0.14);
  border: 1px solid rgba(59, 130, 246, 0.35);
  padding: 8px 18px; border-radius: 999px; margin-bottom: 22px;
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.25);
}
.hero h1 {
  font-family: "Sora", "Inter", sans-serif;
  font-size: clamp(36px, 6.5vw, 60px); margin: 0 0 16px; line-height: 1.03;
  letter-spacing: -0.035em; font-weight: 700;
  background: linear-gradient(100deg, #ffffff 20%, #bfdbfe 45%, #93c5fd 65%, #67e8f9 90%);
  background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 8s linear infinite;
}
.subtitle { color: var(--muted); max-width: 580px; margin: 0 auto; font-size: 16.5px; }

/* ---------- Glass card with animated gradient border ---------- */
.tool-card {
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
}
.tool-card::before {
  content: "";
  position: absolute; inset: 0; padding: 1.5px; border-radius: inherit;
  background: var(--grad); background-size: 200% auto;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .55; animation: shimmer 6s linear infinite;
  pointer-events: none;
}

.field-label {
  font-weight: 600; font-size: 12px; display: block; margin-bottom: 11px;
  text-transform: uppercase; letter-spacing: .12em; color: var(--muted);
}
textarea, input[type="password"], input[type="text"] {
  width: 100%; font-size: 14.5px; padding: 15px 17px; color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 16px;
  background: rgba(0, 0, 0, 0.28); transition: all .2s ease;
}
textarea { resize: vertical; font-family: ui-monospace, "JetBrains Mono", "Consolas", monospace; }
textarea::placeholder, input::placeholder { color: #6478a0; }
textarea:focus, input:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2), 0 0 40px rgba(14, 165, 233, 0.12);
  background: rgba(0, 0, 0, 0.4);
}
.hint { font-size: 13px; color: var(--muted); margin: 11px 0 24px; }
.hint code, code {
  background: rgba(59, 130, 246, 0.16); color: #cfe3ff; padding: 3px 9px;
  border-radius: 8px; font-size: 12.5px; border: 1px solid rgba(59,130,246,0.28);
}

.controls { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.auto-refresh { font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 8px; cursor: pointer; }
.auto-refresh input { accent-color: var(--brand); width: 17px; height: 17px; }

.status { margin-top: 22px; padding: 14px 17px; border-radius: 15px; font-size: 14px; font-weight: 500; border: 1px solid transparent; }
.status.loading { background: rgba(59, 130, 246, 0.1); color: #bfdbfe; border-color: rgba(59,130,246,0.3); }
.status.ok { background: rgba(74, 222, 128, 0.1); color: var(--ok); border-color: rgba(74,222,128,0.3); }
.status.err { background: rgba(255, 122, 144, 0.1); color: var(--err); border-color: rgba(255,122,144,0.3); }

.admin-note { margin-top: 18px; }
.admin-note a {
  font-weight: 600; text-decoration: none;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.admin-note a:hover { text-decoration: underline; }

/* ---------- Results ---------- */
.results { margin-top: 32px; }
.results-head { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 15px; }
.results-head h2 { margin: 0; font-size: 18px; font-family: "Sora", sans-serif; }
.count { color: var(--muted); font-size: 13px; }

/* Copyable email (click to copy) */
.email-copy {
  cursor: pointer;
  user-select: all;
  -webkit-user-select: all;
  padding: 1px 6px;
  border-radius: 7px;
  border-bottom: 1px dashed currentColor;
  transition: background .15s ease, color .15s ease;
}
.email-copy:hover { background: rgba(59, 130, 246, 0.18); }
.email-copy.copied {
  background: rgba(74, 222, 128, 0.22);
  color: var(--ok);
  border-bottom-color: transparent;
}

.email-list { margin-top: 14px; display: flex; flex-direction: column; gap: 5px; }
.empty { text-align: center; color: var(--muted); padding: 54px 0; font-size: 16px; }

.email-row {
  display: grid; grid-template-columns: 200px 1fr 130px; gap: 16px;
  padding: 17px 15px; border-radius: 16px; align-items: center;
  border: 1px solid transparent; transition: all .2s ease;
}
.email-row:hover { background: rgba(255,255,255,0.045); border-color: var(--line); transform: translateX(3px); }
.email-row.unread { background: rgba(59, 130, 246, 0.08); box-shadow: inset 3px 0 0 var(--brand); }
.email-from { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.email-from small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
.email-subject { font-size: 14px; overflow: hidden; }
.email-subject .preview { color: var(--muted); font-size: 12.5px; }

/* OTP / verification code badge, shown right after the headline */
.code-badge {
  display: inline-flex; align-items: center; gap: 4px;
  margin: 0 4px; padding: 2px 10px; border-radius: 8px;
  font-family: ui-monospace, "JetBrains Mono", "Consolas", monospace;
  font-size: 13px; font-weight: 700; letter-spacing: 0.06em;
  color: #fff; cursor: pointer; user-select: all; -webkit-user-select: all;
  background: var(--grad-soft); background-size: 200% auto;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
  vertical-align: middle; transition: transform .15s ease, box-shadow .15s ease;
}
.code-badge:hover { transform: translateY(-1px); box-shadow: 0 6px 22px rgba(14, 165, 233, 0.5); }
.code-badge.copied {
  background: rgba(74, 222, 128, 0.9);
  box-shadow: 0 4px 18px rgba(74, 222, 128, 0.5);
}

.email-date { color: var(--muted); font-size: 12.5px; text-align: right; }

/* ---------- Admin: account rows ---------- */
.acct-list { margin-top: 16px; display: flex; flex-direction: column; gap: 5px; }
.acct-row {
  display: grid; grid-template-columns: 1fr auto auto; gap: 18px; align-items: center;
  padding: 17px 10px; border-bottom: 1px solid var(--line); transition: background .2s ease;
}
.acct-row:last-child { border-bottom: none; }
.acct-row:hover { background: rgba(255,255,255,0.035); }
.acct-email { font-weight: 600; font-size: 14px; word-break: break-all; }
.acct-meta { display: flex; flex-direction: column; gap: 2px; color: var(--muted); font-size: 12.5px; text-align: right; }
.acct-meta em { color: var(--accent); font-style: normal; }
.btn-del {
  border: 1px solid rgba(255,122,144,0.3); background: rgba(255,122,144,0.08); color: var(--err);
  font-weight: 600; font-size: 13px; padding: 10px 17px; border-radius: 13px; cursor: pointer; transition: all .2s ease;
}
.btn-del:hover { background: rgba(255,122,144,0.18); transform: translateY(-1px); }

/* ---------- Footer ---------- */
.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 48px 24px; opacity: .75; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .content { padding-top: 40px; }
  .email-row { grid-template-columns: 1fr; gap: 4px; }
  .email-date { text-align: left; }
  .acct-row { grid-template-columns: 1fr; gap: 8px; }
  .acct-meta { text-align: left; }
}
