:root{
  /* Sky painting theme */
  --bg0:#071326;
  --text:rgba(255,255,255,.93);
  --muted:rgba(255,255,255,.72);
  --muted2:rgba(255,255,255,.52);

  /* Accent (warm sunset hint) */
  --accent1:#bfe6ff;
  --sun1:#ffd6a3;

  --ok:#7CFFB2;
  --warn:#ffd27a;
  --bad:#ff6f8f;

  --radius: 20px;

  --shadow: 0 18px 55px rgba(0,0,0,.35);
  --shadow2: 0 10px 26px rgba(0,0,0,.22);

  --stroke: rgba(255,255,255,.16);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

/* ==============================
   ✅ Background as separate fixed layer (Brave/Chromium friendly)
   ============================== */
html{
  background: var(--bg0);
  overflow-x:hidden;
}
html::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-4;
  pointer-events:none;
  background: url("/media/back.jpg") center / cover no-repeat;
  transform: translateZ(0);
}

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color:var(--text);
  background: transparent;
}

/* Readability overlay */
body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-3;
  pointer-events:none;
  background:
    radial-gradient(1200px 800px at 18% 12%, rgba(255,255,255,.10), transparent 62%),
    radial-gradient(900px 700px at 78% 18%, rgba(255,214,163,.10), transparent 60%),
    radial-gradient(1100px 900px at 50% 100%, rgba(0,0,0,.28), transparent 55%),
    linear-gradient(180deg, rgba(7,19,38,.62), rgba(7,19,38,.32) 40%, rgba(7,19,38,.58));
  transform: translateZ(0);
}

/* Soft vignette */
body::after{
  content:"";
  position:fixed;
  inset:0;
  z-index:-2;
  pointer-events:none;
  background: radial-gradient(1200px 900px at 50% 50%, transparent 42%, rgba(0,0,0,.28) 100%);
  opacity:.75;
  transform: translateZ(0);
}

a{ color: rgba(191,230,255,.95); text-decoration:none; }
a:hover{ text-decoration:underline; }

.container{
  max-width: 1040px;
  margin: 0 auto;
  padding: 26px 18px 84px;
  min-height: 100vh;
  display:flex;
  flex-direction:column;
}

.row{
  display:flex;
  align-items:center;
  gap:12px;
}

.nav{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  margin-bottom: 18px;
}

.brand{
  font-size: 18px;
  font-weight: 850;
  letter-spacing: .45px;
  text-shadow: 0 6px 18px rgba(0,0,0,.25);
}

.h1{ font-size:20px; margin:0; }
.muted{ color: var(--muted); }
.muted2{ color: var(--muted2); }

/* ===== “Glass” WITHOUT backdrop-filter (no banding in Chrome) ===== */
.card,
.panel,
.notice,
.pill,
.badge,
.btn.secondary,
select,
input,
.modalCard{
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.07);
  box-shadow: var(--shadow2);
}

/* inner sheen base layer */
.card::before,
.panel::before,
.notice::before,
.pill::before,
.badge::before,
.btn.secondary::before,
.modalCard::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:-2;
  background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.06));
}

/* ==============================
   ✨ Light "sheen" (hover highlight) — no movement, no layout jump
   ============================== */
.card::after,
.panel::after,
.notice::after,
.modalCard::after{
  content:"";
  position:absolute;
  inset:-40%;
  z-index:-1;
  pointer-events:none;
  opacity:0;
  transform: translateX(-35%) rotate(12deg);
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,.10) 35%,
    rgba(191,230,255,.16) 50%,
    rgba(255,214,163,.10) 65%,
    transparent 100%
  );
  transition: opacity .22s ease, transform .35s ease;
}

.card:hover::after,
.panel:hover::after,
.notice:hover::after,
.modalCard:hover::after{
  opacity:1;
  transform: translateX(35%) rotate(12deg);
}

/* Some elements need their own radii/padding */
.notice{
  padding: 14px 14px;
  color: rgba(255,255,255,.88);
}

.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 9px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  user-select:none;
}

.pill.small{
  padding: 6px 10px;
  font-size: 12px;
}

.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.dot{
  width:8px;
  height:8px;
  border-radius:50%;
  background: rgba(255,255,255,.25);
}
.dot.ok{ background: var(--ok); box-shadow: 0 0 0 4px rgba(124,255,178,.10); }
.dot.warn{ background: var(--warn); box-shadow: 0 0 0 4px rgba(255,210,122,.10); }
.dot.bad{ background: var(--bad); box-shadow: 0 0 0 4px rgba(255,111,143,.10); }

/* Buttons */
.btn{
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 780;
  letter-spacing:.15px;
  font-size: 13px;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  white-space:nowrap;

  /* ✅ no movement on hover */
  transition: box-shadow .14s ease, background .14s ease, border-color .14s ease, opacity .14s ease;
}

.btn:active{ opacity:.92; }

.btn.primary{
  color: rgba(8,16,28,.92);
  background: linear-gradient(135deg, var(--accent1), var(--sun1));
  box-shadow:
    0 14px 36px rgba(124,199,255,.14),
    0 16px 44px rgba(255,214,163,.10);
}
.btn.primary:hover{
  box-shadow:
    0 18px 48px rgba(124,199,255,.16),
    0 22px 58px rgba(255,214,163,.12);
}

.btn.secondary{
  padding: 10px 14px;
  border-radius: 999px;
  color: rgba(255,255,255,.90);
  box-shadow: var(--shadow2);
}
.btn.secondary:hover{
  border-color: rgba(191,230,255,.28);
  box-shadow:
    0 14px 34px rgba(0,0,0,.28),
    0 0 0 1px rgba(191,230,255,.10),
    0 0 28px rgba(191,230,255,.10);
}

/* Inputs */
select, input{
  width:auto;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.92);
  outline: none;
}

select:focus, input:focus{
  border-color: rgba(191,230,255,.55);
  box-shadow: 0 0 0 4px rgba(191,230,255,.14);
}

.grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 900px){
  .grid{ grid-template-columns: 1fr; }
}

/* Cards */
.card{
  padding: 14px;
  box-shadow: var(--shadow);
  transition: box-shadow .18s ease, background .18s ease, border-color .18s ease;
}
.card:hover{
  /* ✅ no translate => no "jump" */
  border-color: rgba(191,230,255,.28);
  box-shadow:
    0 18px 55px rgba(0,0,0,.38),
    0 0 0 1px rgba(191,230,255,.10),
    0 0 28px rgba(191,230,255,.10);
  background: rgba(255,255,255,.085);
}

.cardTop{
  display:flex;
  gap:12px;
  align-items:flex-start;
}

.pfp{
  width: 40px;
  height: 40px;
  border-radius: 14px;
  overflow:hidden;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.18);
  flex: 0 0 auto;
  box-shadow: 0 10px 22px rgba(0,0,0,.18);
}
.pfp img{ width:100%; height:100%; object-fit:cover; display:block; }

.cardMeta{
  display:flex;
  flex-direction:column;
  gap: 8px;
  min-width:0;
  flex: 1 1 auto;
}

.cardTitle{
  font-size: 14px;
  font-weight: 820;
  line-height: 1.22;
  margin:0;
  text-shadow: 0 8px 22px rgba(0,0,0,.22);
}

.cardSub{
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.22;
}

.sepLine{
  height:1px;
  background: rgba(255,255,255,.10);
  margin: 10px 0;
}

/* Vote page panels */
.panel{
  padding: 14px;
  box-shadow: var(--shadow);
}

.panelTitle{
  font-size: 13.5px;
  font-weight: 820;
  margin:0 0 10px;
}

.optionBtn{
  width:100%;
  justify-content:flex-start;
  padding: 12px 14px;
  border-radius: 16px;
}

/* Result bars */
.barWrap{
  width:100%;
  height: 10px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  overflow:hidden;
}

.bar{
  height:100%;
  width:0%;
  background: linear-gradient(135deg, rgba(124,199,255,.85), rgba(255,214,163,.78));
}

.initRow{
  display:inline-flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

/* footer */
.footer{
  margin-top:auto;
  padding-top: 18px;
  display:flex;
  justify-content:center;
  text-align:center;
}

.built{
  font-size: 12px;
  color: rgba(255,255,255,.60);
  line-height: 1.55;
}

/* Modal (About) */
.modalOverlay{
  position:fixed;
  inset:0;
  background: rgba(7,19,38,.62);
  display:none;
  z-index: 999;
}
.modalOverlay.show{ display:block; }

.modal{
  max-width: 860px;
  margin: 70px auto 24px;
  padding: 18px;
}

.modalCard{
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 28px 90px rgba(0,0,0,.52);
}

.modalHd{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  margin-bottom: 10px;
}

.modalTitle{
  font-size: 14.5px;
  font-weight: 880;
  margin:0;
}

.modalBody{
  color: rgba(255,255,255,.88);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  max-height: 70vh;
  overflow: auto;
}

/* About modal content: compact spacing */
.aboutText{
  font-size: 13px;
  line-height: 1.25;
}
.aboutText p{ margin: 0 0 8px; }
.aboutText p:last-child{ margin-bottom: 0; }

.aboutText .scores{
  margin: 0 0 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 18px;
}

.aboutText ul{
  margin: 0 0 10px 16px;
  padding: 0;
}
.aboutText li{ margin: 4px 0; }

.aboutPre{
  white-space: pre-wrap;
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  letter-spacing: 0.01em;
}
.aboutPre a{
  color: inherit;
  text-decoration: underline;
  opacity: 0.9;
}

/* Native UI */
select, input, button{ color-scheme: dark; }

/* Compositing stability */
.card, .btn, .pill, .panel, select, input{
  transform: translateZ(0);
  will-change: box-shadow, background, border-color;
  backface-visibility: hidden;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .card::after, .panel::after, .notice::after, .modalCard::after{ display:none; }
  .btn, .card{ transition:none !important; }
}



   /*Mobile fixes for Base App*/


:root{
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

/* Make the app breathe inside mobile webview */
body{
  padding-top: var(--safe-top);
  padding-right: var(--safe-right);
  padding-bottom: var(--safe-bottom);
  padding-left: var(--safe-left);
}

/* Prevent horizontal overflow in webviews */
html, body{
  overflow-x: hidden;
}

/* Ensure long pills/labels don't push layout */
.pill{
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Buttons: mobile tap targets */
.btn{
  min-height: 44px; /* iOS friendly */
}

/* ----------- Small screens ----------- */
@media (max-width: 520px){
  .container{
    padding: 14px;
  }

  /* Top bar: stack nicely */
  .nav{
    gap: 10px;
    align-items: flex-start;
  }

  .nav .brand{
    font-size: 18px;
    line-height: 1.2;
  }

  /* Any .row used in headers should wrap cleanly */
  .row{
    gap: 10px;
  }

  /* Make header controls go full width */
  .nav .row{
    width: 100%;
    justify-content: flex-start !important;
  }

  /* Connect / pills: avoid cramping */
  #walletLabel{
    flex: 1 1 auto;
    max-width: 100%;
  }

  /* If you have multiple controls in one line, allow wrap */
  .nav .row > *{
    flex: 0 0 auto;
  }

  /* Panels / cards */
  .panel{
    padding: 14px;
    border-radius: 16px;
  }

  .notice{
    padding: 12px;
    border-radius: 16px;
  }

  /* Headings scale down */
  .h1{
    font-size: 22px;
    line-height: 1.15;
  }

  /* Grid: force single column */
  .grid{
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  /* Filters / toolbars area: stack */
  #filtersMount .row{
    flex-direction: column;
    align-items: stretch;
  }

  /* Buttons/inputs inside filters should be full width */
  #filtersMount .btn,
  #filtersMount select,
  #filtersMount input{
    width: 100%;
  }

  /* Vote page options buttons look better full width */
  .optionBtn{
    width: 100%;
  }

  /* Results bars area spacing */
  .barWrap{
    border-radius: 999px;
    overflow: hidden;
  }

  /* Footer breathing room */
  .footer{
    padding-bottom: calc(10px + var(--safe-bottom));
  }
}

/* ----------- Extra tiny devices ----------- */
@media (max-width: 380px){
  .container{ padding: 12px; }
  .h1{ font-size: 20px; }
  .btn{ font-size: 14px; }
  .pill{ font-size: 12px; }
}

/* ============================
   Mobile layout v2 (tighter + more native)
   ============================ */

@media (max-width: 520px){

  .nav{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding-top: 4px;
  }

  /* brand + actions */
  .nav .brand{
    font-size: 18px;
    font-weight: 800;
    letter-spacing: .2px;
    flex: 0 0 auto;
  }

  /* this is the right-side controls row */
  .nav .row{
    width: auto !important;
    justify-content: flex-end !important;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }

  /* keep About smaller */
  #aboutBtn{
    padding: 10px 12px;
    min-height: 40px;
  }

  /* wallet label: becomes its own full-width line */
  #walletLabel{
    display: block;
    width: 100%;
    max-width: 100%;
    margin-top: 10px;
  }

  /* connect button should not be huge */
  #connectBtn{
    padding: 10px 14px;
    min-height: 40px;
  }

  /* --- FILTERS: grid, not a tall column --- */
  /* The filtersMount is inside .notice on index page */
  #filtersMount{
    width: 100%;
  }

  /* If filters UI uses .row, we turn it into grid */
  #filtersMount .row{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: stretch;
  }

  /* Make selects/inputs/buttons fill grid cells */
  #filtersMount select,
  #filtersMount input,
  #filtersMount .btn{
    width: 100% !important;
  }

  /* If there is a Refresh button in the filters area, make it span */
  #filtersMount button,
  #filtersMount .btn.primary,
  #filtersMount .btn.secondary{
    justify-content: center;
  }

  /* Common id used in your UI */
  #refreshBtn,
  #refreshResultsBtn{
    width: 100%;
  }

  /* Reduce visual "balloon" effect */
  .notice{
    padding: 12px;
  }
  .panel{
    padding: 14px;
  }

  /* Pills look better not overly centered */
  .pill{
    text-align: left;
  }
}

/* On very narrow screens fall back to single column */
@media (max-width: 390px){
  #filtersMount .row{
    grid-template-columns: 1fr;
  }
}



select{
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  padding-right: 38px;

  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.82)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px 18px;
}

select::-ms-expand{ display:none; }


select{
  color-scheme: dark;                 
  background-color: rgba(255,255,255,.06);
}

select option,
select optgroup{
  background-color: #0b1f38;          
  color: rgba(255,255,255,.92);       
}


select option:checked{
  background-color: #123154;
}


.optionBtn{
  white-space: normal !important; 
  text-align: left;
  line-height: 1.25;
  align-items: flex-start;        
  height: auto;
}

