:root{
    --bg: #EEF1EF;
    --surface: #F7F9F8;
    --ink: #16302C;
    --ink-soft: #5C7168;
    --line: #CBD6D0;
    --red: #D9483E;
    --green: #1F8F6F;
    --amber: #C9A227;
    --panel-dark: #12241F;
  }

  *{ box-sizing: border-box; }

  body{
    margin:0;
    background: var(--bg);
    color: var(--ink);
    font-family: "Marhey", sans-serif;
    -webkit-font-smoothing: antialiased;
    position: relative;
  }

  a{ color:inherit; text-decoration:none; }
  .mono{ font-family:"Marhey", monospace; direction: ltr; unicode-bidi: isolate; }

  /* ---------- Ambient background pulse ---------- */
  .ambient{
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 0.06;
    overflow: hidden;
    pointer-events: none;
  }
  .ambient svg{
    width: 220%;
    height: 100%;
    animation: driftLine 26s linear infinite;
  }
  .ambient path{ fill:none; stroke: var(--green); stroke-width: 1.4; }
  @keyframes driftLine{
    from{ transform: translateX(0); }
    to{ transform: translateX(-50%); }
  }

  .wrap{
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
  }

  /* ---------- Header ---------- */
  header{ padding: 24px 0 0; }
  .header-row{
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
    display:flex;
    align-items:center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
  }
  .logo{
    display:flex;
    align-items:center;
    gap:10px;
    font-family:"Marhey", sans-serif;
    font-weight:700;
    font-size: 25px;
    color: var(--ink);
  }
  .logo .dot{
    width:9px; height:9px; border-radius:50%;
    background: var(--green);
    box-shadow: 0 0 0 0 rgba(31,143,111,0.5);
    animation: livePulse 1.6s ease-out infinite;
  }
  @keyframes livePulse{
    0%{ box-shadow: 0 0 0 0 rgba(31,143,111,0.45); }
    70%{ box-shadow: 0 0 0 9px rgba(31,143,111,0); }
    100%{ box-shadow: 0 0 0 0 rgba(31,143,111,0); }
  }

  .monitor-readout{
    display:flex;
    align-items:center;
    gap: 10px;
    background: var(--panel-dark);
    border-radius: 8px;
    padding: 7px 14px;
    color: #DDEDE7;
  }
  .monitor-readout svg{ width: 70px; height: 22px; }
  .monitor-readout path{
    fill:none; stroke: var(--green); stroke-width: 2;
    stroke-linecap: round; stroke-linejoin: round;
  }
  .monitor-readout .bpm{
    font-size: 14px;
    letter-spacing: 0.5px;
  }
  .monitor-readout .bpm b{ color: var(--green); font-weight: 600; }

  nav.cats{
    display:flex;
    gap: 20px;
    font-size: 16px;
    font-weight: 600;
    color: var(--ink-soft);
  }
  nav.cats a{ padding-bottom:2px; border-bottom: 2px solid transparent; }
  nav.cats a:hover{ color: var(--ink); border-color: var(--green); }
  nav.cats a.active{ color: var(--ink); border-color: var(--green); }

  .header-divider{
    width:100%; height:1px;
    background: var(--line);
    margin: 20px 0 0;
  }

  .api-status{
    display:none;
    background: #FBEFC4;
    color: #6B540C;
    font-size: 12.5px;
    text-align:center;
    padding: 8px 14px;
  }
  .api-status a{ text-decoration: underline; font-weight:600; }

  /* ---------- Slider (hero, vitals styled) ---------- */
  .slider{ width: 100%; margin: 0; }
  .slider-frame{
    position: relative;
    overflow: hidden;
    min-height: 360px;
    height: 390px;
    background:
      radial-gradient(circle at 12% 18%, rgba(31,143,111,.16), transparent 34%),
      linear-gradient(135deg, #12241F 0%, #19342D 55%, #10201C 100%);
    /* border-radius: 0 0 18px 18px; */
    box-shadow: 0 16px 40px rgba(18,36,31,.10);
  }
  .slides{ display:flex; height: 100%; transition: transform .6s cubic-bezier(.65,.05,.25,1); }
  .slide{
    flex: 0 0 100%; height:100%; position:relative;
    display:flex; align-items:center;
    cursor: pointer;
    isolation:isolate;
  }
  .slide:hover h2{ text-decoration: underline; }
  .slide.ad-slide{
    cursor: default;
    align-items:center;
    justify-content:center;
    background: var(--surface);
  }
  .slide.ad-slide:hover h2{ text-decoration: none; }
  .slide.ad-slide ins.adsbygoogle{
    width: 100%; height: 100%;
  }
  .slide::after{
    content:""; position:absolute; inset:0;
    background:
      linear-gradient(90deg, rgba(18,36,31,.98) 0%, rgba(18,36,31,.82) 48%, rgba(18,36,31,.58) 100%);
    z-index:-1;
  }
  .slide::before{
    content:"";
    position:absolute;
    width:260px;height:260px;
    border:1px solid rgba(221,237,231,.10);
    border-radius:50%;
    left:-80px;top:-70px;
    box-shadow:0 0 0 36px rgba(221,237,231,.025),0 0 0 72px rgba(221,237,231,.018);
  }

  .slide-body{ position:relative; z-index:2; padding: 42px 54px; max-width: 820px; }
  .slide-meta{
    display:flex; align-items:center; gap:12px;
    margin-bottom: 12px;
  }
  .slide-tag{
    font-family:"Marhey", monospace;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    color: #12241F;
    background: var(--green);
  }
  .slide-tag.red{ background: var(--red); }
  .slide-time{
    font-family:"Marhey", monospace;
    font-size: 12px;
    color: rgba(221,237,231,0.65);
    direction: ltr;
  }
  .slide h2{
    font-family:"Marhey", sans-serif;
    font-weight: 700;
    font-size: 29px;
    line-height: 1.4;
    color: #F2F7F5;
    margin: 0 0 8px;
  }
  .slide p{
    font-size: 14px;
    color: rgba(242,247,245,0.72);
    margin: 0;
    line-height: 1.7;
  }

  .slider-arrow{
    position:absolute; top:50%; transform: translateY(-50%);
    width: 38px; height:38px; border-radius:50%;
    border: 1px solid rgba(221,237,231,0.25);
    background: rgba(18,36,31,0.55);
    color: #F2F7F5;
    display:flex; align-items:center; justify-content:center;
    cursor:pointer; z-index:3; font-size:17px;
    backdrop-filter: blur(2px);
  }
  .slider-arrow:hover{ background: rgba(18,36,31,0.85); }
  .slider-arrow.prev{ right: 20px; }
  .slider-arrow.next{ left: 20px; }

  .slider-dots{
    position:absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
    z-index:3; display:flex; gap:8px;
  }
  .slider-dots button{
    width:22px; height:3px; border-radius:2px; border:none;
    background: rgba(221,237,231,0.25); cursor:pointer; padding:0;
    position:relative; overflow:hidden;
  }
  .slider-dots button .fill{
    position:absolute; inset:0 100% 0 0;
    background: var(--green); transform-origin:right;
  }
  .slider-dots button.active .fill{ animation: fillDot 10s linear forwards; }
  @keyframes fillDot{ from{ right:100%; } to{ right:0%; } }

  /* ---------- Ad banner (leaderboard) ---------- */
  .ad-banner{
    max-width: 1180px;
    margin: 22px auto;
    padding: 0 20px;
  }
  .ad-banner ins.adsbygoogle{
    display:block;
    margin: 0 auto;
    min-height: 90px;
  }
  /* عنصر احتياطي يظهر فقط لو الإعلان ملهوش أكواد slot حقيقية بعد (وضع التطوير) */
  .ad-slot{
    border: 1px dashed var(--line);
    background: var(--surface);
    border-radius: 8px;
    display:flex; flex-direction:column; align-items:center; justify-content:center;
    gap: 4px; color: var(--ink-soft); text-align:center;
  }
  .ad-slot .ad-label{ font-family:"Marhey", monospace; font-size:11px; letter-spacing:.5px; }
  .ad-slot .ad-size{ font-size: 10.5px; color: #869489; }

  /* ---------- Main content: log + sidebar ---------- */
  main.content{
    display:grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    padding: 10px 0 50px;
    align-items:start;
  }

  .section-label{
    display:flex; align-items:center; gap:10px;
    font-family:"Marhey", monospace;
    font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase;
    color: var(--ink-soft);
    margin: 0 0 4px;
  }
  .section-label::after{
    content:""; flex:1; height:1px; background: var(--line);
  }

  .log-list{ display:flex; flex-direction:column; }
  .log-row{
    display:grid;
    grid-template-columns: 78px 10px 1fr;
    gap: 16px;
    align-items:start;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
    color: inherit;
    cursor: pointer;
    background: none;
    border-inline: none;
    border-top: none;
    text-align: right;
    font: inherit;
    width: 100%;
  }
  .log-row:first-child{ padding-top: 8px; }
  .log-row .time{
    font-family:"Marhey", monospace;
    font-size: 12.5px;
    color: var(--ink-soft);
    padding-top: 3px;
    direction: ltr;
    text-align: left;
  }
  .log-row .dotcol{ display:flex; justify-content:center; padding-top:6px; }
  .log-row .dotcol i{
    width:8px; height:8px; border-radius:50%;
    display:block;
    background: var(--green);
  }
  .log-row.urgent .dotcol i{ background: var(--red); }
  .log-row.tip .dotcol i{ background: var(--amber); }

  .log-row .content .cat{
    font-size: 11.5px; font-weight:700; color: var(--green);
    margin-bottom: 4px; display:block;
  }
  .log-row.urgent .content .cat{ color: var(--red); }
  .log-row.tip .content .cat{ color: var(--amber); }
  .log-row h3{
    font-family:"Marhey", sans-serif;
    font-weight: 600;
    font-size: 17.5px;
    line-height: 1.5;
    margin: 0;
    color: var(--ink);
  }
  .log-row p{
    margin: 6px 0 0;
    font-size: 13.5px;
    color: var(--ink-soft);
    line-height: 1.7;
  }
  .log-row:hover h3{ color: var(--green); }
  .read-more{
    display:inline-block;
    margin-top:10px;
    font-size:12px;
    font-weight:700;
    color:var(--green);
  }
  .section-head{
    display:flex;
    align-items:end;
    justify-content:space-between;
    gap:30px;
    margin-bottom:10px;
  }
  .section-head > p{
    max-width:440px;
    margin:0 0 5px;
    color:var(--ink-soft);
    font-size:12.5px;
    line-height:1.8;
  }
  .eyebrow{
    font-size:11px;
    font-weight:800;
    letter-spacing:.7px;
    color:var(--green);
    margin-bottom:5px;
  }
  .about-card{
    background:var(--panel-dark);
    color:#eaf4f0;
    border-radius:14px;
    padding:22px;
    box-shadow:0 10px 30px rgba(18,36,31,.10);
  }
  .about-card h2{
    font-size:20px;
    line-height:1.5;
    margin:0 0 8px;
  }
  .about-card p{
    margin:0;
    color:rgba(234,244,240,.72);
    font-size:13px;
    line-height:1.9;
  }
  .trust-section{
    padding:0 20px 38px;
  }
  .trust-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:20px;
    border-top:1px solid var(--line);
    padding-top:28px;
  }
  .trust-grid > div{
    background:var(--surface);
    border:1px solid var(--line);
    border-radius:12px;
    padding:20px;
  }
  .trust-grid h2{font-size:18px;margin:0 0 7px}
  .trust-grid p{font-size:13px;line-height:1.9;color:var(--ink-soft);margin:0}
  .footer-links{
    display:flex;
    justify-content:center;
    flex-wrap:wrap;
    gap:18px;
    margin-top:10px;
  }
  .footer-links a:hover{color:var(--green)}

  .ad-row{
    grid-template-columns: 1fr;
    padding: 16px 0;
    cursor: default;
  }
  .ad-row ins.adsbygoogle{ display:block; min-height: 60px; }

  /* ---------- Pagination ---------- */
  .log-pagination{
    display:flex;
    align-items:center;
    justify-content:center;
    gap: 16px;
    padding: 20px 0 6px;
  }
  .page-btn{
    font-family:"Marhey", sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 16px;
    cursor: pointer;
  }
  .page-btn:hover:not(:disabled){ border-color: var(--green); color: var(--green); }
  .page-btn:disabled{ opacity: .4; cursor: default; }
  .page-info{ font-size: 12.5px; color: var(--ink-soft); }

  /* ---------- Article modal ---------- */
  .modal-overlay{
    display:none;
    position: fixed; inset:0;
    background: rgba(12,22,19,0.65);
    z-index: 999;
    align-items:center; justify-content:center;
    padding: 24px;
  }
  .modal-overlay.open{ display:flex; }
  .modal-card{
    background: var(--surface);
    border-radius: 14px;
    max-width: 640px;
    width: 100%;
    max-height: 86vh;
    overflow-y: auto;
    position: relative;
  }
  .modal-close{
    position: absolute;
    top: 14px; left: 14px;
    width: 34px; height:34px;
    border-radius: 50%;
    border: none;
    background: rgba(18,36,31,0.65);
    color:#fff;
    font-size: 18px;
    cursor: pointer;
    display:flex; align-items:center; justify-content:center;
    z-index: 2;
  }
  .modal-close:hover{ background: rgba(18,36,31,0.9); }
  .modal-body{ padding: 26px 28px 30px; }
  .modal-meta{
    display:flex; align-items:center; gap:12px;
    margin-bottom: 12px;
    font-family:"Marhey", monospace;
    font-size: 12px;
    color: var(--ink-soft);
  }
  .modal-meta .modal-cat{
    font-weight:700; color: var(--green);
    font-family:"Marhey", sans-serif;
    font-size: 12.5px;
  }
  .modal-meta .modal-cat.urgent{ color: var(--red); }
  .modal-card h2{
    font-family:"Marhey", sans-serif;
    font-weight: 700;
    font-size: 24px;
    line-height: 1.45;
    margin: 0 0 14px;
    color: var(--ink);
  }
  .modal-card .modal-text{
    font-size: 15px;
    line-height: 1.9;
    color: var(--ink);
    white-space: pre-line;
  }
  .modal-truncated-note{
    margin: 14px 0 0;
    padding: 10px 14px;
    background: rgba(31,143,111,0.08);
    border-inline-start: 3px solid var(--green);
    border-radius: 6px;
    font-size: 13px;
    color: var(--ink-soft);
    line-height: 1.6;
  }
  .modal-source-link.emphasized{
    background: var(--green);
    color: #fff;
    box-shadow: 0 2px 10px rgba(31,143,111,0.35);
  }
  .modal-source-link.emphasized:hover{ background: #17765d; }
  .modal-source{
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    display:flex; align-items:center; justify-content:space-between;
    gap: 12px;
    flex-wrap: wrap;
  }
  .modal-source-name{ font-size: 12.5px; color: var(--ink-soft); }
  .modal-source-link{
    display:inline-flex; align-items:center; gap:6px;
    font-size: 13px; font-weight:700;
    color: var(--green);
    border: 1px solid var(--green);
    padding: 8px 14px;
    border-radius: 8px;
  }
  .modal-source-link:hover{ background: rgba(31,143,111,0.08); }

  /* ---------- Sidebar ---------- */
  aside{ display:flex; flex-direction:column; gap: 26px; position: sticky; top: 20px; }
  .rank-card{
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 18px 20px;
  }
  .rank-item{
    display:flex; align-items:baseline; gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
  }
  .rank-item:last-child{ border-bottom:none; padding-bottom:0; }
  .rank-item:first-child{ padding-top:0; }
  .rank-item:hover h4{ color: var(--green); }
  .rank-item .n{
    font-family:"Marhey", monospace;
    font-size: 13px;
    color: var(--green);
    width: 20px;
    flex-shrink:0;
  }
  .rank-item h4{
    font-family:"Marhey", sans-serif;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    color: var(--ink);
  }

  aside ins.adsbygoogle{ display:block; }

  footer{
    text-align:center;
    padding: 26px 20px 30px;
    font-size: 12px;
    color: var(--ink-soft);
    border-top: 1px solid var(--line);
  }

  @media (max-width: 900px){
    main.content{ grid-template-columns: 1fr; }
    aside{ position: static; }
    .slide h2{ font-size: 22px; }
    .slide-body{ padding: 24px 22px; }
    .slider-frame{ height: 340px; }
    nav.cats{ display:none; }
  }
  @media (max-width: 520px){
    .log-row{ grid-template-columns: 56px 8px 1fr; gap:10px; }
    .log-row .time{ font-size: 11px; }
    .section-head{display:block}
    .section-head > p{margin-top:8px}
    .trust-grid{grid-template-columns:1fr}
    .slide-body{padding:28px 24px}
    .modal-body{ padding: 20px 18px 24px; }
  }

/* =========================================================
   Text-only news slider — no images
   ========================================================= */
.slider-frame{
  min-height:360px;
  height:390px;
  background:
    radial-gradient(circle at 85% 20%, rgba(46,153,120,.18), transparent 32%),
    linear-gradient(135deg, #10231e 0%, #17362d 55%, #0d1c18 100%);
}
.slide{
  align-items:center;
  background:transparent !important;
}
.slide-bg,
.slide img,
.slide-image,
.slide::after{
  display:none !important;
}
.slide-text-only{
  position:relative;
  z-index:3;
  width:min(900px, 88%);
  margin:auto;
  padding:42px 52px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:18px;
  background:rgba(255,255,255,.045);
  box-shadow:0 18px 45px rgba(0,0,0,.16);
  backdrop-filter:blur(4px);
}
.slide-text-only .slide-meta{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:18px;
}
.slide-text-only h2{
  margin:0;
  max-width:800px;
  font-size:clamp(27px, 4vw, 45px);
  line-height:1.45;
  color:#fff;
}
.slide-text-only p{
  max-width:760px;
  margin:16px 0 0;
  color:rgba(255,255,255,.76);
  font-size:15px;
  line-height:1.9;
}
.slide-read-more{
  display:inline-block;
  margin-top:22px;
  color:#bde8d8;
  font-size:13px;
  font-weight:800;
}
@media(max-width:700px){
  .slider-frame{height:340px;min-height:340px}
  .slide-text-only{width:calc(100% - 30px);padding:28px 22px}
  .slide-text-only h2{font-size:25px}
}
