:root{
  --bg1:#0f2027;
  --bg2:#203a43;
  --bg3:#2c5364;

  --card: rgba(255,255,255,0.10);
  --card2: rgba(255,255,255,0.14);
  --stroke: rgba(255,255,255,0.18);

  --text: #ffffff;
  --muted: rgba(255,255,255,0.78);

  /* Yellow accent */
  --accent: #ffd54a;
  --accent2: #ffea86;

  --shadow: 0 18px 55px rgba(0,0,0,0.38);
  --shadow2: 0 10px 28px rgba(0,0,0,0.30);

  --radius: 22px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color: var(--text);
  background: radial-gradient(1000px 650px at 20% 15%, rgba(255,213,74,0.18), transparent 55%),
              linear-gradient(135deg, var(--bg1), var(--bg2), var(--bg3));
  overflow-x:hidden;
}

/* ===== Mobile app shell ===== */
.app{
  min-height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 28px 16px 40px;
  position:relative;
}

.phone{
  width: min(430px, 100%);
  border-radius: 34px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow:hidden;
  position:relative;
}

/* subtle “status bar” */
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 18px;
  background: linear-gradient(180deg, rgba(0,0,0,0.22), transparent);
}
.topbar .dotrow{
  display:flex; gap:8px; align-items:center;
}
.dot{
  width:8px; height:8px; border-radius:999px;
  background: rgba(255,255,255,0.55);
}
.battery{
  width:44px; height:20px; border-radius:999px;
  border:1px solid rgba(255,255,255,0.35);
  position:relative;
}
.battery::after{
  content:"";
  position:absolute; top:4px; left:4px; right:12px; bottom:4px;
  border-radius:999px;
  background: linear-gradient(90deg, var(--accent), rgba(255,255,255,0.65));
  opacity:0.95;
}
.battery::before{
  content:"";
  position:absolute; right:4px; top:7px;
  width:6px; height:6px; border-radius:2px;
  background: rgba(255,255,255,0.40);
}

/* ===== Content card ===== */
.screen{
  padding: 18px 18px 22px;
}

.card{
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 22px 18px;
  box-shadow: var(--shadow2);
  position:relative;
  overflow:hidden;
}

.card::before{
  content:"";
  position:absolute;
  inset:-120px -120px auto auto;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle at 30% 30%, rgba(255,213,74,0.26), transparent 60%);
  transform: rotate(15deg);
  pointer-events:none;
}

/* ===== Logo ===== */
.brand{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap: 12px;
  margin: 6px 0 18px;
}
.logoWrap{
  width: 82px;
  height: 82px;
  border-radius: 22px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.16);
  display:grid;
  place-items:center;
  box-shadow: 0 12px 30px rgba(0,0,0,0.28);
  position:relative;
  overflow:hidden;
}
.logoWrap::after{
  content:"";
  position:absolute;
  inset:-40% -40%;
  background: conic-gradient(from 180deg, rgba(255,213,74,0.0), rgba(255,213,74,0.30), rgba(255,213,74,0.0));
  animation: spinGlow 6s linear infinite;
}
.logoWrap svg{
  position:relative;
  z-index:1;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.25));
}

.brand h1{
  margin:0;
  font-size: 1.55rem;
  letter-spacing: 0.2px;
}
.brand p{
  margin:0;
  font-size: 0.96rem;
  color: var(--muted);
}

/* ===== Buttons ===== */
.actions{
  display:flex;
  flex-direction:column;
  gap: 12px;
  margin-top: 18px;
}
.btn{
  width:100%;
  border:none;
  padding: 13px 14px;
  border-radius: 999px;
  font-size: 1rem;
  cursor:pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
  position:relative;
  overflow:hidden;
  user-select:none;
}
.btn:active{ transform: scale(0.985); }

.btnPrimary{
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #1a2a32;
  box-shadow: 0 10px 22px rgba(255, 213, 74, 0.18);
}
.btnGhost{
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.20);
}
.btn:hover{
  transform: translateY(-1px);
  opacity: 0.95;
}

/* ripple effect */
.ripple{
  position:absolute;
  border-radius:999px;
  transform: scale(0);
  opacity: 0.55;
  background: rgba(255,255,255,0.75);
  animation: ripple 550ms ease-out;
  pointer-events:none;
}

/* ===== Forms ===== */
.headerRow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.back{
  display:flex;
  align-items:center;
  gap: 8px;
  color: rgba(255,255,255,0.90);
  text-decoration:none;
  font-size: 0.95rem;
  padding: 8px 10px;
  border-radius: 12px;
  transition: background 150ms ease;
}
.back:hover{ background: rgba(255,255,255,0.06); }

.title{
  margin: 8px 0 4px;
  font-size: 1.25rem;
}
.subtitle{
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

.field{
  display:flex;
  flex-direction:column;
  gap: 8px;
  margin-bottom: 12px;
}
label{
  font-size: 0.9rem;
  color: rgba(255,255,255,0.86);
}
.input{
  width:100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.18);
  color: var(--text);
  outline:none;
  transition: border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}
.input::placeholder{ color: rgba(255,255,255,0.45); }
.input:focus{
  border-color: rgba(255,213,74,0.65);
  box-shadow: 0 0 0 4px rgba(255,213,74,0.16);
  transform: translateY(-1px);
}

.row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin: 6px 0 14px;
}
.smallLink{
  font-size: 0.9rem;
  color: rgba(255,255,255,0.85);
  text-decoration:none;
}
.smallLink:hover{ text-decoration:underline; }

.checkbox{
  display:flex;
  align-items:center;
  gap: 8px;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.82);
}
.checkbox input{
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.divider{
  height:1px;
  background: rgba(255,255,255,0.12);
  margin: 16px 0;
}

.note{
  text-align:center;
  color: rgba(255,255,255,0.78);
  font-size: 0.92rem;
}
.note a{
  color: var(--accent2);
  text-decoration:none;
}
.note a:hover{ text-decoration:underline; }

/* ===== Page animations ===== */
.page{
  opacity: 0;
  transform: translateY(10px);
  animation: pageIn 520ms cubic-bezier(.2,.8,.2,1) forwards;
}
.pageOut{
  opacity: 1;
  transform: translateY(0);
  animation: pageOut 250ms ease forwards;
}

/* ===== Keyframes ===== */
@keyframes pageIn{
  to { opacity:1; transform: translateY(0); }
}
@keyframes pageOut{
  to { opacity:0; transform: translateY(8px); }
}
@keyframes ripple{
  to { transform: scale(3.2); opacity: 0; }
}
@keyframes spinGlow{
  to { transform: rotate(360deg); }
}

/* tiny footer spacing */
.footerSpace{ height: 14px; }

/* ===== Chips / small UI bits ===== */
.helper{
  margin-top: 6px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
}

.chips{
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
}
.chip{
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.92);
  border-radius: 999px;
  padding: 10px 12px;
  cursor:pointer;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}
.chip:hover{ transform: translateY(-1px); }
.chip.selected{
  border-color: rgba(255,213,74,0.7);
  box-shadow: 0 0 0 4px rgba(255,213,74,0.14);
  background: rgba(255,213,74,0.10);
}

/* ===== Feed ===== */
.feedControls{ margin: 6px 0 12px; }
.pill{
  display:inline-block;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.12);
  color: rgba(255,255,255,0.86);
  font-size: 0.9rem;
}

.feedList{
  display:flex;
  flex-direction:column;
  gap: 12px;
  margin-top: 10px;
}

.paperCard{
  padding: 14px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
  cursor:pointer;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}
.paperCard:hover{
  transform: translateY(-1px);
  border-color: rgba(255,213,74,0.55);
}
.paperTop{
  display:flex;
  justify-content:space-between;
  gap: 10px;
  align-items:flex-start;
}
.topicTag{
  font-size: 0.8rem;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(255,213,74,0.14);
  border: 1px solid rgba(255,213,74,0.28);
  color: rgba(255,255,255,0.92);
  white-space:nowrap;
}
.paperTitle{
  margin: 10px 0 6px;
  font-weight: 650;
  letter-spacing: 0.1px;
}
.paperMeta{
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.72);
}

/* ===== Paper details sections ===== */
.section{
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.10);
}
.sectionTitle{
  font-weight: 650;
  margin-bottom: 8px;
}
.sectionBody{
  margin: 0;
  color: rgba(255,255,255,0.80);
  line-height: 1.45;
}
.badge{
  display:inline-block;
  margin-left: 8px;
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.78);
}

/* ===== Skeleton loader ===== */
.skeleton{
  margin: 8px 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,0.10), rgba(255,255,255,0.18), rgba(255,255,255,0.10));
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}
@keyframes shimmer{
  0%{ background-position: 0% 0; }
  100%{ background-position: 200% 0; }
}

/* ===== Bottom nav ===== */
.bottomNav{
  position: sticky;
  bottom: 0;
  display:flex;
  justify-content:space-around;
  gap: 6px;
  padding: 12px 10px;
  background: rgba(0,0,0,0.28);
  border-top: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(10px);
}
.navItem{
  flex: 1;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap: 6px;
  padding: 8px 6px;
  border-radius: 14px;
  text-decoration:none;
  color: rgba(255,255,255,0.80);
  font-size: 0.82rem;
  transition: background 150ms ease, transform 150ms ease;
}
.navItem:hover{ background: rgba(255,255,255,0.06); transform: translateY(-1px); }
.navItem.active{
  color: rgba(255,255,255,0.95);
  background: rgba(255,213,74,0.10);
  border: 1px solid rgba(255,213,74,0.18);
}
.navIcon{
  font-size: 1.05rem;
}
/* ===== iPhone fit + safe scrolling ===== */
.phone{
  height: min(860px, 92vh);         /* “phone” stays phone-sized */
  display: flex;
  flex-direction: column;
}

/* Make the middle scrollable */
.screen{
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 90px;            /* space so content isn’t hidden behind bottom nav */
}

/* Keep bottom nav always visible */
.bottomNav{
  flex-shrink: 0;
}
/* Make <select> match your inputs */
select.input{
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 42px; /* room for arrow */
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255,255,255,0.75) 50%),
    linear-gradient(135deg, rgba(255,255,255,0.75) 50%, transparent 50%),
    linear-gradient(to right, transparent, transparent);
  background-position:
    calc(100% - 22px) 50%,
    calc(100% - 16px) 50%,
    0 0;
  background-size: 6px 6px, 6px 6px, 100% 100%;
  background-repeat: no-repeat;
}
select.input option{
  color: #0f2027; /* readable in dropdown list */
}
