/* styles.css - FictaQ PWA */
:root{
  --bg:#0b1020;
  --card:#111827;
  --muted:#9ca3af;
  --text:#f9fafb;
  --primary:#7c3aed;
  --primary2:#22d3ee;
  --border:rgba(255,255,255,.08);
  --shadow: 0 20px 60px rgba(0,0,0,.45);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 20% 0%, rgba(124,58,237,.25), transparent 60%),
              radial-gradient(900px 500px at 90% 10%, rgba(34,211,238,.16), transparent 55%),
              var(--bg);
  color:var(--text);
}

.topbar{
  position:sticky;
  top:0;
  z-index:10;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 16px;
  border-bottom:1px solid var(--border);
  backdrop-filter: blur(10px);
  background: rgba(11,16,32,.6);
}

.brand{display:flex; gap:12px; align-items:center}
.logo-img{
  width:44px;height:44px;border-radius:14px;
  border:1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.brand-title{font-weight:800; letter-spacing:.2px}
.brand-sub{font-size:12px; color:var(--muted); margin-top:2px}

.actions{display:flex; gap:10px; align-items:center}

.container{max-width:1080px; margin:0 auto; padding:18px 16px 48px}
.hero{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap:18px;
  margin-top:16px;
  align-items:stretch;
}
.hero-copy{
  padding:22px;
  border:1px solid var(--border);
  border-radius:22px;
  background: rgba(17,24,39,.55);
  box-shadow: var(--shadow);
}
.hero-copy h1{
  margin:0 0 10px;
  font-size: clamp(26px, 4vw, 44px);
  line-height:1.05;
}
.hero-copy p{
  margin:0 0 16px;
  color:var(--muted);
  font-size: clamp(14px, 2vw, 16px);
  line-height:1.6;
}
.hero-ctas{display:flex; gap:10px; flex-wrap:wrap; margin:10px 0 14px}

.chips{display:flex; gap:8px; flex-wrap:wrap}
.chip{
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: #e5e7eb;
}

.hero-card{display:flex; flex-direction:column; gap:10px}
.card{
  border:1px solid var(--border);
  border-radius:22px;
  background: rgba(17,24,39,.55);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.card-header{
  display:flex;
  justify-content:space-between;
  padding:16px;
  border-bottom:1px solid var(--border);
}
.card-title{font-weight:700}
.card-badge{
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  background: rgba(124,58,237,.20);
  border:1px solid rgba(124,58,237,.45);
}
.card-body{padding:16px}
.story{display:flex; gap:12px; align-items:center; margin-bottom:14px}
.cover{
  width:64px;height:86px;border-radius:12px;
  background: linear-gradient(145deg, rgba(34,211,238,.18), rgba(124,58,237,.16));
  border:1px solid var(--border);
}
.story-title{font-weight:800}
.story-sub{font-size:12px; color:var(--muted); margin-top:4px}
.progress{
  height:8px; border-radius:999px;
  background: rgba(255,255,255,.06);
  border:1px solid var(--border);
  margin-top:10px;
  overflow:hidden;
}
.progress-bar{
  height:100%;
  background: linear-gradient(90deg, var(--primary), var(--primary2));
}
.grid{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap:10px;
}
.mini{
  border:1px solid var(--border);
  border-radius:16px;
  padding:10px;
  background: rgba(255,255,255,.03);
  display:flex; gap:10px; align-items:center;
}
.mini-cover{
  width:36px;height:48px;border-radius:10px;
  background: linear-gradient(145deg, rgba(124,58,237,.25), rgba(34,211,238,.10));
  border:1px solid var(--border);
}
.mini-title{font-size:13px; font-weight:650; color:#e5e7eb}

.note{
  font-size:13px;
  color: #e5e7eb;
  padding:12px 14px;
  border-radius:18px;
  border:1px solid rgba(34,211,238,.25);
  background: rgba(34,211,238,.08);
}

.section{margin-top:22px}
.section h2{margin:0 0 12px; font-size:20px}
.feature-grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap:12px;
}
.feature{
  border:1px solid var(--border);
  border-radius:18px;
  background: rgba(17,24,39,.45);
  padding:14px;
}
.feature h3{margin:0 0 6px; font-size:14px}
.feature p{margin:0; color:var(--muted); font-size:13px; line-height:1.55}

.footer{margin-top:26px; color:var(--muted)}

.btn{
  border:1px solid var(--border);
  background: rgba(255,255,255,.04);
  color:var(--text);
  padding:10px 14px;
  border-radius:14px;
  cursor:pointer;
  font-weight:650;
}
.btn:hover{filter:brightness(1.1)}
.btn:active{transform: translateY(1px)}
.btn-primary{
  border-color: rgba(124,58,237,.55);
  background: linear-gradient(90deg, rgba(124,58,237,.9), rgba(34,211,238,.55));
}
.btn-ghost{background: rgba(255,255,255,.02)}

.icon-btn{
  border:none;
  background: transparent;
  color: var(--text);
  cursor:pointer;
  font-size:16px;
  padding:8px;
  border-radius:12px;
}
.icon-btn:hover{background: rgba(255,255,255,.06)}

.overlay{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.55);
  display:grid;
  place-items:center;
  padding:16px;
  z-index:9999;
}
.modal{
  width:min(560px, 100%);
  border-radius:22px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(17,24,39,.92);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.modal-header{
  display:flex;
  gap:12px;
  align-items:flex-start;
  padding:16px 16px 12px;
  border-bottom:1px solid var(--border);
}
.modal-appicon{
  width:44px;height:44px;border-radius:14px;
  border:1px solid var(--border);
}
.modal-title{font-weight:900}
.modal-subtitle{font-size:13px; color:var(--muted); margin-top:3px}
.modal-body{padding:14px 16px}
.status{
  font-size:13px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.03);
  color:#e5e7eb;
}
.manual{margin-top:12px}
.manual-title{font-weight:800; margin:10px 0 6px}
.manual-list{
  margin:0;
  padding-left:18px;
  color:#e5e7eb;
  line-height:1.5;
}
.manual-hint{
  margin-top:10px;
  font-size:12px;
  color:var(--muted);
}

.modal-actions{
  display:flex;
  gap:10px;
  padding:12px 16px 16px;
  border-top:1px solid var(--border);
  justify-content:flex-end;
  flex-wrap:wrap;
}

/* Responsivo */
@media (max-width: 980px){
  .feature-grid{grid-template-columns: repeat(2, 1fr)}
}
@media (max-width: 860px){
  .hero{grid-template-columns: 1fr}
}
@media (max-width: 480px){
  .actions{gap:8px}
  .btn{padding:10px 12px; border-radius:13px}
  .grid{grid-template-columns: 1fr}
}


/* ===== FictaQ additions (Netflix-ish + Admin) ===== */

.top-actions{display:flex; gap:10px; align-items:center; flex-wrap:wrap;}
.btn.danger{border:1px solid rgba(255,255,255,.14); background: rgba(255, 64, 64, .25); color:#fff;}
.btn.ghost{background: rgba(255,255,255,.06);}

.input{
  width:100%;
  padding:10px 12px;
  border-radius: 12px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color:#fff;
  outline:none;
}

.link{color: rgba(180, 170, 255, 1); text-decoration: none;}
.link:hover{text-decoration: underline;}

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

/* Select dropdown readability */
select.btn{
  background: rgba(255,255,255,.06);
  color:#fff;
  border:1px solid rgba(255,255,255,.14);
}
select.btn option{
  background: #0b1220;
  color: #ffffff;
}

/* Better grid on small screens */
@media (max-width: 520px){
  #categoriesGrid{grid-template-columns: 1fr !important;}
  #storiesGrid{grid-template-columns: repeat(2, minmax(0, 1fr)) !important;}
}
