:root{
  --bg: #0b1220;
  --card: rgba(255,255,255,.06);
  --card2: rgba(255,255,255,.08);
  --text: #eaf0ff;
  --muted: rgba(234,240,255,.72);
  --line: rgba(234,240,255,.12);
  --line-strong: rgba(234,240,255,.22);
  --shadow: 0 18px 60px rgba(0,0,0,.45);
  --shadow-soft: 0 8px 30px rgba(0,0,0,.25);
  --radius: 18px;
  --focus: 0 0 0 4px rgba(99,102,241,.35);
  --btn: linear-gradient(135deg, #6366f1 0%, #22c55e 100%);
  --btn2: rgba(255,255,255,.10);
}

*{ box-sizing: border-box; }
body{
  margin:0;
  position: relative;
  overflow-x: hidden;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 20% 10%, rgba(99,102,241,.35), transparent 60%),
    radial-gradient(900px 500px at 80% 20%, rgba(34,197,94,.25), transparent 55%),
    radial-gradient(900px 700px at 40% 90%, rgba(59,130,246,.18), transparent 60%),
    var(--bg);
  min-height: 100vh;
}

body::before,
body::after{
  content: "";
  position: fixed;
  z-index: -1;
  width: 340px;
  height: 340px;
  border-radius: 999px;
  filter: blur(50px);
  opacity: .35;
  animation: floatGlow 12s ease-in-out infinite;
}

body::before{
  top: -90px;
  right: -70px;
  background: rgba(99,102,241,.65);
}

body::after{
  bottom: -120px;
  left: -80px;
  background: rgba(34,197,94,.5);
  animation-delay: -4s;
}

.container{
  max-width: 1040px;
  padding: 34px 18px 64px;
  margin: 0 auto;
}

header{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  backdrop-filter: blur(6px);
}

.brand{
  display:flex;
  flex-direction: column;
  gap: 6px;
}

.title{
  font-size: clamp(22px, 2.3vw, 30px);
  font-weight: 800;
  letter-spacing: .2px;
  margin:0;
  background: linear-gradient(90deg, #f0f4ff 0%, #c7d2fe 42%, #86efac 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle{
  margin:0;
  color: rgba(234,240,255,.8);
  line-height: 1.55;
  max-width: 60ch;
  font-size: 14.5px;
}

.toolbar{
  display:flex;
  gap: 10px;
  align-items:center;
  flex-wrap: wrap;
  justify-content: flex-end;
  width: min(100%, 430px);
}

.search{
  position: relative;
  min-width: 240px;
  flex: 1 1 280px;
}
.search input{
  width:100%;
  padding: 12px 12px 12px 40px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  outline: none;
  background: rgba(255,255,255,.08);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.search input::placeholder{
  color: rgba(234,240,255,.52);
}
.search input:focus{
  box-shadow: var(--focus);
  border-color: rgba(99,102,241,.55);
  background: rgba(255,255,255,.11);
}
.search svg{
  position:absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  opacity:.75;
}

.pill{
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,.09);
  color: rgba(234,240,255,.86);
  font-size: 13px;
  white-space: nowrap;
  display:flex;
  gap: 8px;
  align-items:center;
  box-shadow: var(--shadow-soft);
}

.pill-link{
  text-decoration: none;
  color: rgba(234,240,255,.9);
}

.pill-link:hover{
  border-color: rgba(234,240,255,.35);
  background: rgba(255,255,255,.13);
}

.os-groups{
  display:flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 14px;
}

.os-group{
  display:flex;
  flex-direction: column;
  gap: 10px;
}

.os-group-head{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 4px;
}

.os-group-title-wrap{
  display:flex;
  align-items:center;
  gap: 8px;
  min-width: 0;
}

.os-group-icon{
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  display:grid;
  place-items:center;
  font-size: 16px;
}

.os-group-title{
  margin: 0;
  font-size: 16px;
  font-weight: 760;
  letter-spacing: .2px;
}

.os-group-count{
  font-size: 12px;
  color: rgba(234,240,255,.78);
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.group-grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 15px;
}

.card{
  grid-column: span 12;
  background: linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,255,255,.04));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
  position: relative;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.card::before{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(125deg, rgba(99,102,241,.18), transparent 40%, rgba(34,197,94,.12));
  opacity: .45;
}

.card:hover{
  transform: translateY(-4px);
  border-color: rgba(234,240,255,.25);
  box-shadow: 0 22px 65px rgba(0,0,0,.5);
}

@media (min-width: 720px){
  .card{ grid-column: span 6; }
}
@media (min-width: 980px){
  .card{ grid-column: span 4; }
}

.card-inner{
  padding: 16px 16px 15px;
  display:flex;
  flex-direction: column;
  gap: 12px;
  min-height: 214px;
}

.row{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 10px;
}

.os{
  display:flex;
  gap: 10px;
  align-items:flex-start;
  min-width: 0;
}

.os-main{
  min-width: 0;
  display:flex;
  flex-direction: column;
  gap: 4px;
}

.icon{
  width: 40px; height: 40px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255,255,255,.16), rgba(255,255,255,.06));
  border: 1px solid rgba(255,255,255,.18);
  display:grid;
  place-items:center;
  flex: 0 0 auto;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 8px 20px rgba(0,0,0,.28);
}

.os-title{
  margin:0;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 760;
  letter-spacing:.2px;
  overflow:hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 28ch;
}

.os-subtitle{
  margin:0;
  color: rgba(234,240,255,.68);
  font-size: 12px;
  line-height: 1.2;
}

.badge{
  font-size: 12px;
  color: rgba(234,240,255,.9);
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.12);
  padding: 6px 10px;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: .4px;
  line-height: 1.1;
  align-self: flex-start;
}

.badge-coming{
  color: #ffe8b3;
  border-color: rgba(255,213,128,.35);
  background: rgba(245,158,11,.16);
}

.meta{
  display:flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: var(--muted);
  font-size: 12.5px;
}

.meta-item{
  display:grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items:center;
}

.meta-label{
  color: rgba(234,240,255,.62);
  font-size: 11.5px;
  letter-spacing: .35px;
  text-transform: uppercase;
  line-height: 1;
}

.meta code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono","Courier New", monospace;
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.14);
  padding: 5px 10px;
  border-radius: 10px;
  color: rgba(234,240,255,.96);
  display:block;
  width: 100%;
  max-width: 100%;
  overflow:hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.25;
}

.path-code{
  color: rgba(198,217,255,.95);
}

.actions{
  margin-top: auto;
  display:flex;
  gap: 10px;
  align-items:center;
}

.btn-main{
  flex: 1 1 auto;
}

.btn{
  appearance:none;
  border: 0;
  cursor:pointer;
  border-radius: 14px;
  padding: 11px 12px;
  font-weight: 700;
  color: #061024;
  background: var(--btn);
  display:flex;
  align-items:center;
  gap: 8px;
  width: 100%;
  justify-content:center;
  box-shadow: 0 10px 24px rgba(34,197,94,.18), inset 0 1px 0 rgba(255,255,255,.26);
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}
.btn:focus{ outline:none; box-shadow: var(--focus); }
.btn:hover{
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.btn-secondary{
  background: var(--btn2);
  border: 1px solid rgba(255,255,255,.14);
  color: var(--text);
  width: 48px;
  min-width: 48px;
  padding: 11px 12px;
  box-shadow: none;
}

.btn-copy{
  font-size: 16px;
}

.card-coming .icon{
  background: linear-gradient(145deg, rgba(245,158,11,.2), rgba(255,255,255,.06));
  border-color: rgba(255,213,128,.3);
}

.card-coming .os-subtitle{
  color: rgba(255,223,163,.88);
}

.btn:disabled,
.btn[aria-disabled="true"]{
  cursor: not-allowed;
  opacity: .7;
  filter: saturate(.8);
  transform: none;
  box-shadow: none;
}

.btn-secondary:hover{
  background: rgba(255,255,255,.16);
}

.empty{
  margin-top: 18px;
  padding: 24px 18px;
  border-radius: var(--radius);
  border: 1px dashed rgba(255,255,255,.22);
  color: rgba(234,240,255,.82);
  background: rgba(255,255,255,.05);
  text-align: center;
  font-size: 14px;
}

footer{
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.12);
  color: rgba(234,240,255,.6);
  font-size: 12.5px;
  display:flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

a.link{
  color: rgba(234,240,255,.8);
  text-decoration: none;
  border-bottom: 1px dashed rgba(234,240,255,.35);
}
a.link:hover{ color: rgba(255,255,255,.95); border-bottom-color: rgba(255,255,255,.55); }

@keyframes floatGlow{
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(14px, -12px) scale(1.06); }
}

@media (max-width: 680px){
  header{
    padding: 12px;
  }

  .toolbar{
    width: 100%;
  }

  .search{
    min-width: 100%;
  }

  .os-group-head{
    padding: 6px 2px;
  }
}

.older-page{
  --btn: linear-gradient(135deg, #f59e0b 0%, #fb7185 100%);
}

.older-page .title{
  background: linear-gradient(90deg, #fff1cc 0%, #fecaca 55%, #fda4af 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.older-page .os-group-count{
  border-color: rgba(245,158,11,.35);
  background: rgba(245,158,11,.18);
}
