/* =========================
   Dark App Store UI (App Page)
   assets/app.css - FULL
   ========================= */

:root{
  --bg: #0b0f17;
  --bg2:#0f1726;
  --card:#101a2b;
  --card2:#0e1625;
  --muted:#95a3b8;
  --text:#eef2ff;
  --line: rgba(255,255,255,.08);
  --accent:#6ee7ff;
  --accent2:#a78bfa;
  --shadow: 0 18px 45px rgba(0,0,0,.45);
  --radius: 18px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background:
    radial-gradient(900px 500px at 20% -5%, rgba(110,231,255,.16), transparent 60%),
    radial-gradient(900px 500px at 90% 0%, rgba(167,139,250,.16), transparent 55%),
    linear-gradient(180deg, var(--bg), #070a11 70%);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
}

a{ color: inherit; text-decoration:none; }
img{ display:block; }

/* =========================
   Container / breadcrumb
   ========================= */

.container{
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 12px 38px;
}
@media (min-width: 720px){
  .container{ padding: 18px 16px 44px; }
}

.breadcrumb{
  font-size: 13px;
  color: rgba(238,242,255,.62);
  margin: 6px 0 14px;
  display:flex;
  gap: 8px;
  align-items:center;
  flex-wrap: wrap;
}
.breadcrumb a{
  color: var(--accent);
  border: 1px solid rgba(110,231,255,.18);
  background: rgba(110,231,255,.06);
  padding: 6px 10px;
  border-radius: 999px;
  transition: .12s ease;
}
@media (hover:hover){
  .breadcrumb a:hover{
    border-color: rgba(110,231,255,.32);
    background: rgba(110,231,255,.10);
    transform: translateY(-1px);
  }
}

/* =========================
   Layout
   ========================= */

.layout{
  display:grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 980px){
  .layout{ grid-template-columns: 1.35fr .65fr; gap: 14px; }
}

/* =========================
   Panels (glass)
   ========================= */

.panel{
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.014));
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  padding: 14px;
}
@media (min-width: 720px){
  .panel{ padding: 16px; }
}

/* =========================
   Header block
   ========================= */

.head{
  display:flex;
  gap: 12px;
  align-items:center;
}

.icon{
  width: 74px;
  height: 74px;
  border-radius: 18px;
  object-fit: cover;
  flex: 0 0 auto;

  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 10px 26px rgba(0,0,0,.25);
}

.title{
  margin: 0;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: .2px;
  line-height: 1.15;
}

.slug{
  margin-top: 6px;
  font-size: 13px;
  color: rgba(238,242,255,.62);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width: 72vw;
}
@media (min-width: 980px){
  .slug{ max-width: 560px; }
}

/* =========================
   Badges
   ========================= */

.badges{
  display:flex;
  flex-wrap:wrap;
  gap: 8px;
  margin-top: 10px;
}

.badge{
  font-size: 12px;
  color: rgba(238,242,255,.70);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
}

/* =========================
   Description
   ========================= */

.desc{
  margin-top: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
  color: rgba(238,242,255,.82);
}

/* =========================
   Preview carousel
   ========================= */

.preview-block{ margin-top: 16px; }
.preview-title{
  margin: 0 0 10px 0;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .2px;
}

.preview-shell{
  position:relative;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.012));
  overflow:hidden;
  transition: height .18s ease;
}

/* track paging */
.preview-track{
  display:flex;
  overflow-x:auto;
  scroll-snap-type:x mandatory;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  scrollbar-width: thin;
}

.preview-track::-webkit-scrollbar{ height: 8px; }
.preview-track::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,.14);
  border-radius: 999px;
}

.preview-slide{
  flex: 0 0 100%;
  scroll-snap-align: start;
  padding: 10px;
}

/* preview card: JS set height */
.preview-card{
  width:100%;
  border-radius: 14px;
  overflow:hidden;
  cursor: zoom-in;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.16);
  transition: height .18s ease, border-color .12s ease, transform .12s ease;
}

@media (hover:hover){
  .preview-card:hover{
    border-color: rgba(110,231,255,.25);
    transform: translateY(-1px);
  }
}

.preview-img{
  width:100%;
  height:100%;
  object-fit: contain;
  display:block;
  background: rgba(0,0,0,.12);
}

/* arrows */
.pnav{
  position:absolute;
  top:50%;
  transform: translateY(-50%);
  border: 0;
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.12);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  color: rgba(238,242,255,.9);
  font-size: 22px;
  line-height: 1;
  cursor:pointer;
  user-select:none;
  display:grid;
  place-items:center;
  backdrop-filter: blur(10px);
  transition: .12s ease;
}
.pnav.left{ left: 10px; }
.pnav.right{ right: 10px; }

@media (hover:hover){
  .pnav:hover{
    border-color: rgba(110,231,255,.25);
    background: rgba(110,231,255,.10);
    transform: translateY(-50%) scale(1.03);
  }
}
.pnav:active{ transform: translateY(-50%) scale(.98); }

/* dots */
.dots{
  display:flex;
  gap: 6px;
  justify-content:center;
  padding: 10px 10px 12px;
  background: rgba(0,0,0,.12);
  border-top: 1px solid rgba(255,255,255,.08);
}

.dot{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.22);
}
.dot.active{
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}

/* =========================
   Right side actions
   ========================= */

.side-title{
  margin: 0 0 10px 0;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .2px;
}

.actions{
  display:flex;
  flex-direction: column;
  gap: 10px;
}

/* each action row */
.action{
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.016));
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
  position: relative;
  overflow:hidden;
}

.action::before{
  content:"";
  position:absolute;
  inset:-2px;
  background:
    radial-gradient(600px 220px at 30% 10%, rgba(110,231,255,.16), transparent 55%),
    radial-gradient(600px 220px at 80% 90%, rgba(167,139,250,.16), transparent 55%);
  opacity:0;
  transition: opacity .18s ease;
}

@media (hover:hover){
  .action:hover{
    border-color: rgba(110,231,255,.28);
    box-shadow: 0 14px 34px rgba(0,0,0,.40);
    transform: translateY(-1px);
  }
  .action:hover::before{ opacity: 1; }
}

.action:active{ transform: scale(.99); }

.action .left{ min-width: 0; position: relative; z-index: 1; }

.action .k{
  font-weight: 900;
  letter-spacing: .1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* pill */
.pill{
  flex: 0 0 auto;
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(110,231,255,.20);
  background: rgba(110,231,255,.08);
  color: rgba(238,242,255,.92);
  font-weight: 900;
  position: relative;
  z-index: 1;
}

/* if you ever use .note later */
.note{
  margin-top: 8px;
  font-size: 12px;
  color: rgba(238,242,255,.62);
  line-height: 1.45;
}

/* =========================
   Lightbox
   ========================= */

.lightbox{
  position: fixed;
  inset: 0;
  display:none;
  background: rgba(0,0,0,.86);
  z-index: 9999;
  padding: 16px;
}

.lightbox.show{
  display:flex;
  align-items:center;
  justify-content:center;
}

.lightbox img{
  max-width: 96vw;
  max-height: 90vh;
  border-radius: 16px;
  background: rgba(0,0,0,.35);
  box-shadow: 0 24px 90px rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.12);
}

.lightbox .close{
  position:absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.12);
  color:#fff;
  font-size: 22px;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  backdrop-filter: blur(10px);
  transition: .12s ease;
}

@media (hover:hover){
  .lightbox .close:hover{
    border-color: rgba(110,231,255,.25);
    background: rgba(110,231,255,.10);
    transform: translateY(-1px);
  }
}

.lightbox .close:active{ transform: scale(.98); }

/* =========================
   Toast (your inline style already exists)
   Optional: make it match theme if you remove inline
   ========================= */

/* If you keep inline toast style in app.php, ignore these.
.toast-alert{
  background: linear-gradient(90deg, rgba(110,231,255,.95), rgba(167,139,250,.95));
  color: #0b0f17;
}
*/

/* =========================
   Small mobile polish
   ========================= */

@media (max-width: 420px){
  .icon{ width: 66px; height: 66px; border-radius: 16px; }
  .title{ font-size: 18px; }
  .panel{ padding: 13px; }
  .action{ padding: 12px; }
}
