/* ===== Material-inspired tokens ===== */
:root{
  --bg:#f5f5f7;
  --surface:#ffffff;
  --surface-2:#f0f1f3;
  --text:#0f172a;
  --muted:#000000;
  --border:rgba(0,0,0,.08);

  --primary:#ff5702;

  --r-lg:22px;
  --r-md:16px;
  --r-sm:12px;

  --e1:0 1px 3px rgba(0,0,0,.12);
  --e2:0 6px 20px rgba(0,0,0,.12);

  --max:940px;
}

@media (prefers-color-scheme: dark){
  :root{
    --bg:#0b0c0f;          
    --surface:#121318;     
    --surface-2:#181a20;   
    --text:#e6e6eb;        
    --muted:#9a9aa3;       
    --border:rgba(255,255,255,.07);

    --primary:#ff5702;    

    --e1:0 1px 3px rgba(0,0,0,.75);
    --e2:0 10px 28px rgba(0,0,0,.75);
  }
}


/* ===== Base Reset-ish ===== */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: var(--link); text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }


/* ===== Top strip (brand + chips in one bar) ===== */
.topstrip{
  position: sticky;
  top: 0;
  z-index: 9999999999;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--e1);
}


.topstrip-inner{
  max-width:var(--max);
  margin:0 auto;
  padding:10px 18px;
  display:flex;
  gap:14px;
  align-items:center;
}

.brand {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    user-select: none;
}

.chips{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-end;
  flex:1;
}

.chip{
  border:1px solid var(--border);
  background:var(--surface);
  color:var(--muted);
  border-radius:999px;
  padding:7px 12px;
  font-size:14px;
  cursor:pointer;
  transition:background .15s ease, transform .15s ease, color .15s ease, border-color .15s ease;
}
.chip:hover{
  background:var(--surface-2);
  transform:translateY(-1px);
  color:var(--text);
}
.chip.active{
  border-color:rgba(249,115,22,.45);
  color:var(--primary);
  background:rgba(249,115,22,.08);
}



/* Desktop: chips visible, category button hidden */
@media (min-width: 769px) {
  .cat-btn { display: none; }
}

/* Mobile: chips hidden, category button visible */
@media (max-width: 768px) {
  .chips { display: none; }

  .cat-btn{
    border:1px solid var(--border);
    background:var(--surface);
    color:var(--text);
    padding:8px 12px;
    border-radius:12px;
    cursor:pointer;
  }
  .cat-btn:hover{ background:var(--surface-2); }
  .cat-btn span{ color:var(--primary); font-weight:700; }
}


/* ===== Main ===== */
.app{
  max-width:var(--max);
  margin:0 auto;
  padding:24px 18px 60px;
}

/* ===== Grid ===== */
.grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(260px, 1fr));
  gap:18px;
  margin-top:14px;
}

.card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--r-md);
  box-shadow:var(--e1);
  overflow:hidden;
  cursor:pointer;
  transition:transform .18s ease, box-shadow .18s ease;
}
.card:hover{
  transform:translateY(-3px);
  box-shadow:var(--e2);
}

.card-media{
  width:100%;
  aspect-ratio:16/9;
  background:linear-gradient(120deg, rgba(249,115,22,.20), rgba(0,0,0,.05));
  position:relative;
}
.card-media img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.card-body{
  padding:14px 14px 16px;
}
.card-title{
  margin:0 0 6px;
  font-size:16px;
  line-height:1.25;
}
.card-sub{
  margin:0;
  color:var(--muted);
  font-size:13px;
  line-height:1.35;
}
.badge{
  display:inline-flex;
  margin-top:10px;
  font-size:12px;
  color:var(--primary);
  border:1px solid rgba(249,115,22,.35);
  background:rgba(249,115,22,.08);
  border-radius:999px;
  padding:5px 10px;
}

.section-title{
  margin:20px 0 8px;
  font-size:18px;
  font-weight:600;
  color:var(--text);
}

/* ===== Overlay (post view) ===== */
.overlay{
  position:fixed;
  inset:0;
  z-index:50;
  background:rgba(0,0,0,.58);
  display:flex;
  justify-content:center;
  align-items:flex-start;
  overflow:auto;
  padding:42px 16px;
}

.hidden{ display:none !important; }

.post{
  width:100%;
  max-width:940px;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--r-lg);
  box-shadow:var(--e2);
  padding:18px 18px 10px;
  animation:pop .14s ease-out;
  cursor:default;
}
@keyframes pop{
  from{ transform:translateY(8px) scale(.99); opacity:.0; }
  to{ transform:translateY(0) scale(1); opacity:1; }
}

.post-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:6px;
}

.post-top .badge{
  cursor:default;
}

.back{
  border:0;
  background:var(--surface-2);
  color:var(--text);
  padding:8px 12px;
  border-radius:12px;
  cursor:pointer;
}
.back:hover{ filter:brightness(1.03); }

.post h1{
  margin:10px 0 6px;
  font-size:26px;
  letter-spacing:-.2px;
}
.post .sub{
  color:var(--muted);
  margin-bottom:14px;
}

.post .text{
  color:var(--text);
  line-height:1.6;
  margin:0 0 16px;
}

.post iframe{
  width:100%;
  aspect-ratio:16/9;
  border:0;
  border-radius:var(--r-md);
  background:#000;
  margin:14px 0;
}

.post .divider{
  height:1px;
  background:var(--border);
  margin:14px 0;
}

/* ===== Footer strip ===== */
.footer{
  position:sticky;
  bottom:0;
  z-index:15;

  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  border-top:1px solid var(--border);
  box-shadow:var(--e1);
}

.footer-inner{
  max-width:var(--max);
  margin:0 auto;
  padding:12px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  color:var(--muted);
  font-size:13px;
}
.footer-left{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.footer-dot{
  width:10px;height:10px;border-radius:50%;
  background:var(--primary);
  box-shadow:0 0 0 4px rgba(249,115,22,.12);
}
.footer-btn{
  border:1px solid var(--border);
  background:var(--surface);
  color:var(--text);
  padding:8px 12px;
  border-radius:12px;
  cursor:pointer;
}
.footer-btn:hover{ background:var(--surface-2); }

.footer-link{
  background:none;
  border:0;
  padding:0;
  color:var(--primary);
  cursor:pointer;
  font-size:13px;
  position:relative;
}

.footer-link::after{
  content:"⤴";
  font-size:12px;
  margin-left:1px;
  opacity:1;
}

.footer-link:hover::after{
  opacity:1;
}


.sep{ opacity:.4; margin:0 6px; }

.post a{
  color: var(--primary);
  text-decoration: none;
}

.post a:hover{
  text-decoration: underline;
}



/* ===== Bottom sheet (drop-up) ===== */
.sheet{
  position:fixed;
  inset:0;
  z-index:40;
  background:rgba(0,0,0,.40);
  display:flex;
  justify-content:center;
  align-items:flex-end;
  padding:18px;
}

.sheet-panel{
  width:100%;
  max-width:760px;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:24px;
  box-shadow:var(--e2);
  overflow:hidden;
  animation:sheetUp .16s ease-out;
}
@keyframes sheetUp{
  from{ transform:translateY(10px); opacity:0; }
  to{ transform:translateY(0); opacity:1; }
}
.sheet-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:14px 16px;
  background:var(--surface-2);
  border-bottom:1px solid var(--border);
}
.sheet-title{
  font-weight:800;
  letter-spacing:1px;
  color:var(--primary);
}
.icon-btn{
  border:0;
  background:transparent;
  color:var(--muted);
  font-size:16px;
  cursor:pointer;
  padding:6px 10px;
  border-radius:10px;
}
.icon-btn:hover{ background:rgba(0,0,0,.06); }
@media (prefers-color-scheme: dark){
  .icon-btn:hover{ background:rgba(255,255,255,.08); }
}

.sheet-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  padding:14px 16px;
}
.sheet-link{
  border:1px solid var(--border);
  background:var(--surface);
  color:var(--text);
  padding:10px 12px;
  border-radius:14px;
  cursor:pointer;
}
.sheet-link:hover{ background:var(--surface-2); }
.sheet-meta{
  padding:0 16px 16px;
  color:var(--muted);
  font-size:12px;
}

/* ===== Cookie toast ===== */
.toast{
  position:fixed;
  left:50%;
  bottom:78px; /* footer fölött */
  transform:translateX(-50%);
  z-index:60;
  width:calc(100% - 32px);
  max-width:720px;
}

.toast-inline{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;

  background:var(--surface);
  border:1px solid var(--border);
  border-radius:999px;
  box-shadow:var(--e2);
  padding:10px 14px 10px 18px;
}

.toast-text{
  color:var(--muted);
  font-size:13px;
  line-height:1.4;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.toast-btn{
  border:0;
  background:var(--primary);
  color:#fff;
  padding:6px 14px;
  border-radius:999px;
  cursor:pointer;
  font-size:13px;
  flex-shrink:0;
}

.toast-btn:hover{
  filter:brightness(.95);
}

.btn{
  border:0;
  background:var(--primary);
  color:#fff;
  padding:9px 12px;
  border-radius:12px;
  cursor:pointer;
}
.btn:hover{ filter:brightness(.95); }

.card{
  cursor:pointer;
}

.card::after{
  content:"→";
  position:absolute;
  right:16px;
  bottom:14px;
  font-size:14px;
  color:var(--primary);
  opacity:0;
  transition:opacity .15s ease, transform .15s ease;
}

.card:hover::after{
  opacity:1;
  transform:translateX(2px);
}

.loadmore-wrap{
  display:flex;
  justify-content:center;
  padding:18px 0 6px;
}
.loadmore-btn{
  border:1px solid var(--border);
  background:var(--surface);
  color:var(--text);
  padding:10px 14px;
  border-radius:14px;
  cursor:pointer;
  box-shadow:var(--e1);
}
.loadmore-btn:hover{
  background:var(--surface-2);
}

.no-js{
  max-width: var(--max);
  margin: 40px auto;
  padding: 0 18px;
}

.no-js-inner{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--e1);
  padding: 24px;
}

.no-js-inner h2{
  margin-top: 0;
  font-size: 20px;
}

.no-js-inner p{
  margin: 10px 0;
  color: var(--text);
}

.no-js-inner .muted{
  color: var(--muted);
  font-size: 14px;
}

.no-js-inner h2{
  color: var(--primary);
}

.tts-btn{
  border:1px solid var(--border);
  background:var(--surface);
  color:var(--text);
  padding:6px 10px;
  border-radius:10px;
  cursor:pointer;
  font-size:13px;
  display:flex;
  align-items:center;
  gap:6px;
}

.tts-btn:hover{
  background:var(--surface-2);
}

.tts-btn.active{
  border-color: rgba(249,115,22,.45);
  background: rgba(249,115,22,.08);
  color: var(--primary);
}

.ad-box {
    max-width: var(--max);
    margin: 10px auto;
    display: flex;
    justify-content: center;
}

/* Topstrip glass */
.topstrip{
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Dark mode */
@media (prefers-color-scheme: dark){
  .topstrip{
    background: rgba(20, 24, 33, 0.72);
  }
}

/* Light mode */
@media (prefers-color-scheme: light){
  .topstrip{
    background: rgba(255, 255, 255, 0.75);
  }
}

/* Topstrip glass */
  .footer{
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Dark mode */
@media (prefers-color-scheme: dark){
  .footer{
    background: rgba(20, 24, 33, 0.72);
  }
}

/* Light mode */
@media (prefers-color-scheme: light){
  .footer{
    background: rgba(255, 255, 255, 0.75);
  }
}

/* Topstrip glass */
.toast-inline{
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Dark mode */
@media (prefers-color-scheme: dark){
.toast-inline{
    background: rgba(20, 24, 33, 0.72);
  }
}

/* Light mode */
@media (prefers-color-scheme: light){
.toast-inline{
    background: rgba(255, 255, 255, 0.75);
  }

}
