
:root{
  --bg:#f6f7fb;
  --card:#ffffff;
  --card2:#ffffff;
  --text:#0f172a;
  --muted:#5b647a;
  --line:rgba(15,23,42,.10);
  --accent:#2f6bff;
  --accent2:#14b8a6;
  --shadow:0 10px 30px rgba(15,23,42,.12);
  --radius:18px;
  --radius2:22px;
  --maxw:1120px;
  --gap:14px;
}

html[data-theme="dark"]{
  --bg:#0b1020;
  --card:#0f1630;
  --card2:#0c132a;
  --text:#e9eefc;
  --muted:#a9b3d3;
  --line:rgba(255,255,255,.10);
  --accent:#7aa2ff;
  --accent2:#9bffcf;
  --shadow:0 10px 30px rgba(0,0,0,.35);
}

*{ box-sizing:border-box; }

html{
  height:auto;
  min-height:100%;
}

body{
  min-height:100vh;
  margin:0;
  background:
    radial-gradient(1200px 700px at 20% -10%, rgba(47,107,255,.16), transparent 60%),
    radial-gradient(1200px 700px at 95% 10%, rgba(20,184,166,.12), transparent 55%),
    var(--bg);
  color:var(--text);
  font:16px/1.5 system-ui,-apple-system,Segoe UI,Roboto,Inter,Arial,sans-serif;
}

html[data-theme="dark"] body{
  background:
    radial-gradient(1200px 700px at 20% -10%, rgba(122,162,255,.25), transparent 60%),
    radial-gradient(1200px 700px at 95% 10%, rgba(155,255,207,.12), transparent 55%),
    var(--bg);
}

[lang="ar"]{
	direction:rtl;
	text-align:right;
	unicode-bidi:isolate;
}

a{ color:inherit; text-decoration:none; }
button,input,select{ font:inherit; color:inherit; }
.wrap{ max-width:var(--maxw); margin:0 auto; padding:22px 18px 38px; }

header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:6px 0 14px;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
  text-decoration:none;
  color:inherit;
}

.brand h1{
  margin:0;
  font-size:18px;
  letter-spacing:.2px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  font-weight:600;
}

.brand h1 span:last-child{
  opacity:.7;
}

.brandDotcom{
  opacity:.65;
  font-weight:500;
}

.brand24{
  color:#d4a800; /* amarillo más oscuro */
  font-weight:700;
}
html[data-theme="dark"] .brand24{
  color:#facc15; /* amarillo original */
}

.logo{
  width:64px;
  height:64px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
}

.logo img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}

/*
html[data-theme="dark"] .logo{
  background:linear-gradient(135deg, rgba(122,162,255,.90), rgba(155,255,207,.70));
  box-shadow:0 12px 28px rgba(0,0,0,.25);
}
*/

.tagline{
  margin:2px 0 0;
  color:var(--muted);
  font-size:13px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.topActions{
  display:flex;
  align-items:center;
  gap:10px;
  flex:0 0 auto;
}

.pill{
  border:1px solid var(--line);
  background:rgba(15,23,42,.04);
  padding:9px 12px;
  border-radius:999px;
  cursor:pointer;
  transition:transform .05s ease, background .15s ease, border-color .15s ease;
  user-select:none;
  white-space:nowrap;
}

html[data-theme="dark"] .pill{
  background:rgba(255,255,255,.06);
}

.pill:hover{ background:rgba(15,23,42,.07); }
html[data-theme="dark"] .pill:hover{ background:rgba(255,255,255,.09); }

.pill:active{ transform:translateY(1px); }

.pill.primary{
  border-color:rgba(47,107,255,.35);
  background:rgba(47,107,255,.12);
}

html[data-theme="dark"] .pill.primary{
  border-color:rgba(122,162,255,.40);
  background:rgba(122,162,255,.18);
}

.pill.primary:hover{ background:rgba(47,107,255,.16); }
html[data-theme="dark"] .pill.primary:hover{ background:rgba(122,162,255,.25); }

#themeBtn{
  width:40px;
  height:40px;
  padding:0;
  border-radius:50%;
  font-size:16px;
  line-height:1;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 40px;
}

.hero{
  margin-top:8px;
  padding:18px;
  border-radius:var(--radius2);
  background:linear-gradient(180deg, rgba(255,255,255,.70), rgba(255,255,255,.45));
  border:1px solid var(--line);
  box-shadow:var(--shadow);
}

html[data-theme="dark"] .hero{
  background:linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
}

.heroRow{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}

.heroText{
  min-width:260px;
  flex:1 1 420px;
}

.heroTitle{
  margin:0 0 6px;
  font-size:22px;
  letter-spacing:.2px;
}

.heroSub{
  margin:0;
  color:var(--muted);
  font-size:14px;
  max-width:680px;
}

.searchBlock{
  margin-top:14px;
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
}

.searchBar{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 12px;
  border-radius:16px;
  background:rgba(15,23,42,.04);
  border:1px solid var(--line);
}

html[data-theme="dark"] .searchBar{
  background:rgba(0,0,0,.18);
}

.searchIcon{
  width:18px;
  height:18px;
  opacity:.8;
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.searchIcon svg{
  width:18px;
  height:18px;
}

.q{
  width:100%;
  border:0;
  outline:none;
  background:transparent;
  color:var(--text);
  font-size:15px;
}

.clearBtn{
  border:0;
  background:transparent;
  cursor:pointer;
  padding:6px 8px;
  border-radius:10px;
  opacity:.9;
}

.clearBtn:hover{ background:rgba(15,23,42,.06); }
html[data-theme="dark"] .clearBtn:hover{ background:rgba(255,255,255,.06); }

/* Contenedor de filtros (sin scroll) */
.filters{
  display:flex;
  gap:10px;
  align-items:center;
  overflow:hidden;
}

/* Wrapper de cada select */
.select{
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-radius:999px;
  background:rgba(15,23,42,.04);
  border:1px solid var(--line);
  white-space:nowrap;

  /* clave para que se adapten */
  flex:1 1 0;
  min-width:0;
}

/* Los dos únicos selects */
.select select{
  min-width:0;
  width:100%;
  border:none;
  background:transparent;
  outline:none;
  font-size:14px;

  /* para truncar texto en móvil */
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

html[data-theme="dark"] .select{
  background:rgba(0,0,0,.18);
}

.select label{
  color:var(--muted);
  font-size:13px;
}

.select select option{
  color:#111;
}

.section{
  margin-top:18px;
}

.sectionHead{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
  margin:0 0 10px;
}

.sectionHead h2{
  margin:0;
  font-size:16px;
  letter-spacing:.2px;
}

.hint{
  margin:0;
  color:var(--muted);
  font-size:13px;
}

.grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:var(--gap);
}

@media (min-width:720px){
  .grid{
    grid-template-columns:repeat(3, minmax(0,1fr));
  }

  .heroTitle{
    font-size:24px;
  }
}

@media (min-width:980px){
  .grid{
    grid-template-columns:repeat(4, minmax(0,1fr));
  }
}

.card{
  background:linear-gradient(180deg, rgba(255,255,255,.80), rgba(255,255,255,.55));
  border:1px solid var(--line);
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 10px 26px rgba(15,23,42,.10);
  transition:transform .08s ease, border-color .15s ease, background .15s ease;
  min-height:112px;
}

html[data-theme="dark"] .card{
  background:linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  box-shadow:0 10px 26px rgba(0,0,0,.25);
}

.card:hover{
  transform:translateY(-1px);
  border-color:rgba(15,23,42,.18);
  background:linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.62));
}

html[data-theme="dark"] .card:hover{
  border-color:rgba(255,255,255,.18);
  background:linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
}

.cardInner{
  padding:12px;
  display:flex;
  gap:12px;
  align-items:flex-start;
  min-width:0;
}

.appIcon{
  width:48px;
  height:48px;
  border-radius:14px;
  background:rgba(15,23,42,.04);
  border:1px solid rgba(15,23,42,.10);
  flex:0 0 auto;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
}

html[data-theme="dark"] .appIcon{
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.12);
}

.appIcon img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.meta{
  min-width:0;
  flex:1 1 auto;
}

.appName{
  margin:0;
  font-size:14px;
  line-height:1.25;
  letter-spacing:.1px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.subrow{
  margin-top:6px;
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
  flex-wrap:wrap;
}

.badge{
  font-size:11px;
  padding:4px 8px;
  border-radius:999px;
  background:rgba(15,23,42,.04);
  border:1px solid rgba(15,23,42,.10);
  color:var(--muted);
  max-width:100%;
  white-space:nowrap;
}

html[data-theme="dark"] .badge{
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.12);
}

.badge.cat{
  color:#1d3fa8;
  border-color:rgba(47,107,255,.25);
  background:rgba(47,107,255,.10);
}

html[data-theme="dark"] .badge.cat{
  color:#d7ddff;
  border-color:rgba(122,162,255,.25);
  background:rgba(122,162,255,.12);
}

.badge.lang{
  color:#0f766e;
  border-color:rgba(20,184,166,.22);
  background:rgba(20,184,166,.10);
}

html[data-theme="dark"] .badge.lang{
  color:#dfffe9;
  border-color:rgba(155,255,207,.22);
  background:rgba(155,255,207,.10);
}

.badge.new{
  color:#7a4d00;
  border-color:rgba(245,158,11,.28);
  background:rgba(245,158,11,.12);
}

html[data-theme="dark"] .badge.new{
  color:#ffe9b8;
  border-color:rgba(255,233,184,.25);
  background:rgba(255,233,184,.10);
}

.badge.upd{
  color:#7a1f78;
  border-color:rgba(217,70,239,.22);
  background:rgba(217,70,239,.10);
}

html[data-theme="dark"] .badge.upd{
  color:#ffd7ff;
  border-color:rgba(255,215,255,.25);
  background:rgba(255,215,255,.10);
}

.featuredGrid{
  display:grid;
  grid-template-columns:1fr;
  gap:var(--gap);
}

@media (min-width:720px){
  .featuredGrid{
    grid-template-columns:repeat(2, minmax(0,1fr));
  }
}

.fcard{
  display:block;
  min-height:220px;
  background:linear-gradient(180deg, rgba(47,107,255,.10), rgba(20,184,166,.06), rgba(255,255,255,.72));
  border:1px solid rgba(47,107,255,.18);
  border-radius:22px;
  overflow:hidden;
  box-shadow:0 14px 34px rgba(15,23,42,.12);
  transition:transform .08s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

html[data-theme="dark"] .fcard{
  background:linear-gradient(180deg, rgba(122,162,255,.14), rgba(155,255,207,.07), rgba(255,255,255,.04));
  border:1px solid rgba(122,162,255,.22);
  box-shadow:0 14px 34px rgba(0,0,0,.30);
}

.fcard:hover{
  transform:translateY(-1px);
  border-color:rgba(47,107,255,.28);
  box-shadow:0 18px 38px rgba(15,23,42,.16);
}

html[data-theme="dark"] .fcard:hover{
  border-color:rgba(122,162,255,.30);
  box-shadow:0 18px 38px rgba(0,0,0,.38);
}

.fcardInner{
  padding:16px;
  min-height:220px;
  display:flex;
  flex-direction:column;
}

.fTop{
  display:flex;
  align-items:flex-start;
  gap:14px;
  min-width:0;
}

.fcard .appIcon{
  width:64px;
  height:64px;
  border-radius:18px;
}

.fText{
  min-width:0;
  flex:1 1 auto;
}

.fName{
  margin:0;
  font-size:18px;
  line-height:1.25;
  letter-spacing:.1px;
}

.fDesc{
  margin:14px 0 0;
  font-size:14px;
  color:var(--muted);
  display:-webkit-box;
  -webkit-line-clamp:5;
  -webkit-box-orient:vertical;
  overflow:hidden;
  min-height:105px;
}

.loadMoreWrap{
  margin-top:14px;
  display:flex;
  justify-content:center;
}

.loadMore{
  width:100%;
  max-width:360px;
  border:1px solid var(--line);
  background:rgba(15,23,42,.04);
  padding:12px 14px;
  border-radius:14px;
  cursor:pointer;
  transition:transform .05s ease, background .15s ease, border-color .15s ease;
}

html[data-theme="dark"] .loadMore{
  background:rgba(255,255,255,.06);
}

.loadMore:hover{ background:rgba(15,23,42,.07); }
html[data-theme="dark"] .loadMore:hover{ background:rgba(255,255,255,.09); }

.loadMore:active{
  transform:translateY(1px);
}

.loadMore[disabled]{
  opacity:.55;
  cursor:not-allowed;
}

.empty{
  margin-top:12px;
  padding:16px;
  border-radius:16px;
  border:1px dashed rgba(15,23,42,.18);
  color:var(--muted);
  text-align:center;
  background:rgba(255,255,255,.55);
}

html[data-theme="dark"] .empty{
  border:1px dashed rgba(255,255,255,.18);
  background:rgba(0,0,0,.14);
}

footer{
  margin-top:22px;
  padding-top:14px;
  border-top:1px solid var(--line);
  color:var(--muted);
  font-size:12px;
  text-align:center;
}

footer a{
  color:inherit;
  text-decoration:none;
  opacity:0.9;
}

footer a:hover{
  text-decoration:underline;
  opacity:1;
}

.footerSep{
  display:inline;
}

.footerLegal,
.footerSeo{
  display:inline;
}

@media (max-width:560px){
  header{
    flex-direction:column;
    align-items:stretch;
    gap:10px;
  }

  #footerText,
  .footerLegal,
  .footerSeo{
    display:block;
    margin:6px 0;
  }

  .footerSep{
    display:none;
  }

  .brand{
    justify-content:flex-start;
  }

  .tagline{
    white-space:normal;
    overflow:visible;
    text-overflow:clip;
  }

  .topActions{
    justify-content:space-between;
  }

  .topActions .pill{
    flex:1 1 auto;
    text-align:center;
  }

  #createBtn{
    flex:2 1 auto;
  }
  
   .grid .cardInner{
    flex-direction:column;
    gap:10px;
  }

  .grid .appIcon{
    width:56px;
    height:56px;
    border-radius:16px;
  }

  .grid .meta{
    width:100%;
    min-width:0;
  }

  .grid .appName{
    white-space:normal;
    overflow:hidden;
    text-overflow:clip;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    line-height:1.3;
    min-height:0;
  }
  .grid .appName + .subrow{
    margin-top:10px;
  }
}

.rating{
  margin-top:4px;
  font-size:13px;
  color:var(--muted);
  display:flex;
  align-items:center;
  gap:4px;
}

.star{
  color:#f59e0b;
  font-size:14px;
}


