/* ─── ResearchKit AI · Web Frontend ────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@600;700;800&family=DM+Sans:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-0:    #070b14;
  --bg-1:    #0d1424;
  --bg-2:    #111827;
  --bg-3:    #1a2236;
  --border:  rgba(255,255,255,0.07);
  --cyan:    #00d4ff;
  --violet:  #7c3aed;
  --green:   #10b981;
  --red:     #ef4444;
  --amber:   #f59e0b;
  --text-1:  #e2e8f0;
  --text-2:  #94a3b8;
  --text-3:  #475569;
  --grad:    linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
  --sidebar: 220px;
  --radius:  12px;
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

html, body {
  height: 100%;
  background: var(--bg-0);
  color: var(--text-1);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  overflow: hidden;
}

/* ── Layout ──────────────────────────────────────────────────────────────────*/
body { display: flex; }

/* ── Sidebar ─────────────────────────────────────────────────────────────────*/
.sidebar {
  width: var(--sidebar);
  flex-shrink: 0;
  background: var(--bg-1);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 12px 16px;
  height: 100vh;
  overflow: hidden;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 6px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.logo-icon {
  width: 32px; height: 32px;
  background: var(--grad);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.logo-text {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 14px;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

/* ── Navigation ──────────────────────────────────────────────────────────────*/
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: none;
  border: none;
  border-radius: 8px;
  color: var(--text-3);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  width: 100%;
}
.nav-item:hover  { background: var(--bg-3); color: var(--text-2); }
.nav-item.active { background: rgba(0,212,255,0.08); color: var(--cyan); }

.nav-icon { font-size: 15px; flex-shrink: 0; }

/* ── Sidebar footer ──────────────────────────────────────────────────────────*/
.sidebar-footer {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.backend-status {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 4px;
}

.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--red);
  flex-shrink: 0;
  transition: background 0.3s;
  position: relative;
}
.status-dot.online  { background: var(--green); }
.status-dot.online::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: rgba(16,185,129,0.3);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { opacity:.6; transform:scale(1); }
  50%      { opacity:0;  transform:scale(1.8); }
}

.status-label { font-size: 11px; color: var(--text-3); font-family: 'JetBrains Mono', monospace; }

.backend-url-row { display: flex; gap: 4px; }

.backend-url-input {
  flex: 1;
  background: var(--bg-0);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-2);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  padding: 5px 8px;
  outline: none;
  min-width: 0;
}
.backend-url-input:focus { border-color: rgba(0,212,255,0.3); }

.btn-connect {
  background: rgba(0,212,255,0.1);
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: 6px;
  color: var(--cyan);
  font-size: 10px;
  font-weight: 600;
  padding: 5px 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.btn-connect:hover { background: rgba(0,212,255,0.2); }

/* ── Main area ───────────────────────────────────────────────────────────────*/
.main {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* ── Views ───────────────────────────────────────────────────────────────────*/
.view {
  display: none;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  animation: fadeIn 0.2s ease;
}
.view.active { display: flex; }
@keyframes fadeIn { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:none; } }

/* ── View header ─────────────────────────────────────────────────────────────*/
.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.view-title {
  font-family: 'Syne', sans-serif;
  font-size: 22px;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.view-subtitle { font-size: 12px; color: var(--text-3); margin-top: 3px; }

.view-actions { display: flex; gap: 8px; align-items: center; }

/* ── Buttons ─────────────────────────────────────────────────────────────────*/
.btn-primary {
  background: var(--grad);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 11px 20px;
  cursor: pointer;
  transition: opacity 0.2s;
  width: 100%;
}
.btn-primary:hover    { opacity: 0.88; }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-secondary {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-2);
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  padding: 7px 14px;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-secondary:hover { border-color: var(--cyan); color: var(--cyan); }

/* ── Scrollable content ──────────────────────────────────────────────────────*/
.scroll-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 28px;
}
.scroll-content::-webkit-scrollbar { width: 5px; }
.scroll-content::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 3px; }

/* ── Papers ──────────────────────────────────────────────────────────────────*/
.upload-progress {
  margin: 8px 28px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.upload-bar {
  flex: 1;
  height: 6px;
  background: var(--bg-3);
  border-radius: 3px;
  overflow: hidden;
}
.upload-bar-fill {
  height: 100%;
  background: var(--grad);
  border-radius: 3px;
  width: 0%;
  transition: width 0.4s ease;
}

.papers-grid {
  flex: 1;
  overflow-y: auto;
  padding: 20px 28px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
  align-content: start;
}
.papers-grid::-webkit-scrollbar { width: 5px; }
.papers-grid::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 3px; }

.paper-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: border-color 0.2s;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.paper-card:hover { border-color: rgba(0,212,255,0.25); }

.paper-source-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  font-family: 'JetBrains Mono', monospace;
  align-self: flex-start;
}
.badge-arxiv        { background: rgba(239,68,68,0.15);   color: #f87171; }
.badge-pubmed       { background: rgba(16,185,129,0.15);  color: #34d399; }
.badge-semantic_scholar { background: rgba(124,58,237,0.15); color: #a78bfa; }
.badge-pdf_upload   { background: rgba(245,158,11,0.15);  color: #fbbf24; }
.badge-bibtex       { background: rgba(99,102,241,0.15);  color: #818cf8; }

.paper-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-1);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.paper-authors {
  font-size: 11px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.paper-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.paper-venue {
  font-size: 10px;
  color: var(--text-3);
  font-family: 'JetBrains Mono', monospace;
  margin-left: auto;
}
.paper-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.tag { font-size: 10px; padding: 2px 8px; border-radius: 20px; font-weight: 500; white-space: nowrap; }
.tag-task    { background: rgba(0,212,255,0.12); color: var(--cyan); border: 1px solid rgba(0,212,255,0.2); }
.tag-method  { background: rgba(124,58,237,0.12); color: #a78bfa;   border: 1px solid rgba(124,58,237,0.2); }
.tag-dataset { background: rgba(16,185,129,0.12); color: #34d399;   border: 1px solid rgba(16,185,129,0.2); }
.paper-result {
  font-size: 11px; color: var(--text-3); margin-top: 4px;
  font-style: italic; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.paper-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}
.btn-chip {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-3);
  font-size: 11px;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-chip:hover        { color: var(--text-2); border-color: var(--text-3); }
.btn-chip.ask:hover    { color: var(--cyan);   border-color: var(--cyan); }
.btn-chip.delete:hover { color: var(--red);    border-color: var(--red); }

/* ── Empty state ─────────────────────────────────────────────────────────────*/
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-3);
  grid-column: 1/-1;
}
.empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state p { font-size: 14px; line-height: 1.7; }
.empty-state strong { color: var(--cyan); }

/* ── Chat ────────────────────────────────────────────────────────────────────*/
.chat-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat-messages::-webkit-scrollbar { width: 5px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 3px; }

.msg {
  max-width: 720px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.6;
  animation: msgIn 0.2s ease;
}
@keyframes msgIn { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }

.msg-user {
  background: linear-gradient(135deg, rgba(0,212,255,0.12), rgba(124,58,237,0.12));
  border: 1px solid rgba(0,212,255,0.18);
  align-self: flex-end;
}
.msg-ai {
  background: var(--bg-2);
  border: 1px solid var(--border);
  align-self: flex-start;
}
.msg-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--cyan);
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 6px;
}
.msg-sources {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.source-chip {
  display: inline-block;
  font-size: 11px;
  background: rgba(0,212,255,0.08);
  color: var(--cyan);
  border: 1px solid rgba(0,212,255,0.18);
  border-radius: 4px;
  padding: 2px 8px;
  text-decoration: none;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.source-chip:hover { background: rgba(0,212,255,0.15); }

.thinking-dots span {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--cyan);
  border-radius: 50%;
  margin: 0 2px;
  animation: dot 1.2s infinite;
}
.thinking-dots span:nth-child(2) { animation-delay: .2s; }
.thinking-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes dot { 0%,80%,100%{opacity:.2;transform:scale(.8)} 40%{opacity:1;transform:scale(1)} }

.chat-input-bar {
  display: flex;
  gap: 10px;
  padding: 14px 28px;
  border-top: 1px solid var(--border);
  background: var(--bg-1);
  flex-shrink: 0;
}
.chat-textarea {
  flex: 1;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-1);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  padding: 10px 14px;
  outline: none;
  resize: none;
  min-height: 44px;
  max-height: 120px;
  transition: border-color 0.2s;
}
.chat-textarea:focus { border-color: rgba(0,212,255,0.35); }
.chat-textarea::placeholder { color: var(--text-3); }

.btn-send {
  width: 44px; height: 44px;
  background: var(--grad);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.2s;
}
.btn-send:hover { opacity: 0.85; }
.btn-send:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Synthesis ───────────────────────────────────────────────────────────────*/
.synth-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 0;
  flex: 1;
  overflow: hidden;
}
.synth-form-card {
  border-right: 1px solid var(--border);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}
.synth-results {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
}
.synth-results::-webkit-scrollbar { width: 5px; }
.synth-results::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 3px; }

.synth-text { font-size: 14px; color: var(--text-2); line-height: 1.75; }

/* ── Result cards (shared) ───────────────────────────────────────────────────*/
.result-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.result-card-header {
  font-size: 11px;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 10px;
}

.list-item {
  font-size: 13px;
  color: var(--text-2);
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  line-height: 1.55;
  display: flex;
  gap: 8px;
}
.list-item:last-child { border-bottom: none; }
.list-item::before { color: var(--cyan); flex-shrink: 0; }
.list-item.contradiction::before { content: '⚡'; }
.list-item.gap::before           { content: '🔭'; }
.list-item.action::before        { content: '→'; }

/* ── Fields ──────────────────────────────────────────────────────────────────*/
.field-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 6px;
}
.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.field-group { display: flex; flex-direction: column; gap: 6px; }

.field-textarea {
  width: 100%;
  background: var(--bg-0);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-1);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  line-height: 1.55;
  padding: 10px 12px;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
}
.field-textarea:focus { border-color: rgba(0,212,255,0.35); }
.field-textarea::placeholder { color: var(--text-3); }

.field-input {
  flex: 1;
  background: var(--bg-0);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-1);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  padding: 8px 12px;
  outline: none;
  transition: border-color 0.2s;
}
.field-input:focus { border-color: rgba(0,212,255,0.35); }

.field-select {
  background: var(--bg-0);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-2);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  padding: 8px 12px;
  outline: none;
  cursor: pointer;
  width: 100%;
}

/* ── Digest ──────────────────────────────────────────────────────────────────*/
.digest-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  flex: 1;
  overflow: hidden;
}
.digest-sidebar-panel {
  border-right: 1px solid var(--border);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}
.interest-input-row { display: flex; gap: 6px; }
.interest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 28px;
}
.no-tags { font-size: 11px; color: var(--text-3); }
.interest-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(124,58,237,0.12);
  color: #a78bfa;
  border: 1px solid rgba(124,58,237,0.25);
  border-radius: 20px;
  font-size: 11px;
  padding: 3px 8px 3px 10px;
  font-weight: 500;
}
.interest-tag button {
  background: none; border: none;
  color: #a78bfa; cursor: pointer;
  font-size: 14px; line-height: 1;
  opacity: 0.6; transition: opacity .15s;
}
.interest-tag button:hover { opacity: 1; }
.digest-meta { font-size: 11px; color: var(--text-3); font-family: 'JetBrains Mono', monospace; margin-top: 4px; }

.digest-results-panel { overflow-y: auto; padding: 16px 20px; }
.digest-results-panel::-webkit-scrollbar { width: 5px; }
.digest-results-panel::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 3px; }

.digest-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 10px;
  transition: border-color 0.2s;
}
.digest-card:hover { border-color: rgba(124,58,237,0.3); }
.digest-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 6px;
}
.digest-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-1);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.digest-score {
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
  flex-shrink: 0;
}
.score-high   { color: #34d399; }
.score-medium { color: #f59e0b; }
.score-low    { color: var(--text-3); }
.digest-abstract {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.5;
  margin: 5px 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.digest-interest {
  display: inline-block;
  font-size: 10px;
  background: rgba(124,58,237,0.1);
  color: #a78bfa;
  border-radius: 4px;
  padding: 1px 7px;
  margin-bottom: 8px;
  font-family: 'JetBrains Mono', monospace;
}
.digest-actions { display: flex; align-items: center; gap: 6px; }
.digest-date { font-size: 10px; color: var(--text-3); margin-left: auto; }

/* ── JD Analyzer ─────────────────────────────────────────────────────────────*/
.jd-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  flex: 1;
  overflow: hidden;
}
.jd-inputs {
  border-right: 1px solid var(--border);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
}
.jd-results {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.jd-results::-webkit-scrollbar { width: 5px; }
.jd-results::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 3px; }

.score-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.score-ring {
  width: 100px; height: 100px;
  border-radius: 50%;
  background: conic-gradient(var(--cyan) 0deg, var(--bg-3) 0deg);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.score-ring::before {
  content: '';
  position: absolute;
  inset: 12px;
  background: var(--bg-2);
  border-radius: 50%;
}
.score-number {
  position: relative;
  z-index: 1;
  font-family: 'Syne', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--cyan);
}
.score-label   { font-size: 12px; color: var(--text-3); }
.score-summary { font-size: 12px; color: var(--text-2); text-align: center; line-height: 1.5; }

.skills-wrap { display: flex; flex-wrap: wrap; gap: 5px; }
.skill-chip {
  display: inline-block;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 500;
}
.chip-match { background: rgba(16,185,129,0.12); color: #34d399; border: 1px solid rgba(16,185,129,0.22); }
.chip-gap   { background: rgba(239,68,68,0.12);  color: #f87171; border: 1px solid rgba(239,68,68,0.22); }

/* ── Toast ───────────────────────────────────────────────────────────────────*/
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--bg-3);
  color: var(--text-1);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 9999;
  transition: transform 0.3s ease;
  pointer-events: none;
  border: 1px solid var(--border);
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { border-color: rgba(16,185,129,0.4); color: #34d399; }
.toast.error   { border-color: rgba(239,68,68,0.4);  color: #f87171; }

/* ── Spinner ─────────────────────────────────────────────────────────────────*/
.spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }
