  :root{
    --bg: #0A0C16;
    --surface: #12162A;
    --surface-2: #1A1F38;
    --line: #262C4A;
    --text: #E9E8F5;
    --muted: #8D90AC;
    --violet: #7C5CFC;
    --magenta: #FF4D8D;
    --cyan: #34D9C9;
    --amber: #FFB74D;
  }
  *{box-sizing:border-box; margin:0; padding:0;}
  html{ scroll-behavior:smooth; }
  body{
    background:
      radial-gradient(1200px 600px at 15% -10%, rgba(124,92,252,0.18), transparent),
      radial-gradient(900px 500px at 100% 0%, rgba(255,77,141,0.10), transparent),
      var(--bg);
    color: var(--text);
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
    min-height:100vh;
  }
  .mono{ font-family:ui-monospace, 'SF Mono', 'Cascadia Code', 'Consolas', monospace; letter-spacing:0.02em; }
  .display{ font-family:'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif; font-weight:700; letter-spacing:-0.01em; }
  button{ font-family:inherit; cursor:pointer; }

  /* Accessibility: sichtbarer Fokus-Ring für Tastatur-Navigation */
  a:focus-visible, button:focus-visible, input:focus-visible{
    outline:2px solid var(--violet); outline-offset:2px; border-radius:4px;
  }
  @media (prefers-reduced-motion: reduce){
    html{ scroll-behavior:auto; }
    .ticker-track{ animation:none; }
    *{ animation-duration:0.001ms !important; transition-duration:0.001ms !important; }
  }

  /* Ticker */
  .ticker-wrap{
    border-bottom:1px solid var(--line);
    background: var(--surface);
    overflow:hidden;
    white-space:nowrap;
    height:34px;
    display:flex;
    align-items:center;
  }
  .ticker-label{
    flex:0 0 auto;
    background: var(--violet);
    color:#0A0C16;
    font-size:11px;
    font-weight:600;
    padding:6px 10px 6px 12px;
    height:100%;
    display:flex;
    align-items:center;
    gap:6px;
  }
  .live-dot{
    width:6px; height:6px; border-radius:50%; background:#0A0C16;
    animation: pulse 1.6s ease-in-out infinite;
  }
  @keyframes pulse{ 0%,100%{ opacity:1; } 50%{ opacity:0.25; } }
  .ticker-track{
    display:inline-flex;
    animation: scroll 28s linear infinite;
    padding-left:100%;
  }
  .ticker-track span{ margin-right:48px; font-size:12px; color:var(--muted); }
  .ticker-track span b{ color:var(--text); font-weight:500; }
  @keyframes scroll{ from{transform:translateX(0);} to{transform:translateX(-100%);} }

  /* Nav */
  .nav-wrap{
    position:sticky; top:0; z-index:50;
    background: rgba(10,12,22,0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom:1px solid var(--line);
  }
  nav{
    max-width:1180px; margin:0 auto;
    display:flex; align-items:center; justify-content:space-between; gap:16px;
    padding:14px 24px;
  }
  .logo{ font-size:22px; font-weight:700; letter-spacing:0.01em; cursor:pointer; flex:0 0 auto; }
  .logo span{ color: var(--magenta); }

  .nav-right{ display:flex; align-items:center; gap:12px; margin-left:auto; }

  .xp-badge{
    display:flex; align-items:center; gap:6px;
    background:var(--surface); border:1px solid var(--line); border-radius:20px;
    padding:6px 12px; font-size:12px; color:var(--muted); white-space:nowrap;
    transition:border-color .15s, color .15s;
  }
  .xp-badge:hover{ color:var(--text); border-color:#39406b; }
  .xp-badge.has-saved{ color:var(--magenta); border-color:rgba(255,77,141,0.4); }

  .searchbox{
    flex:1; max-width:320px; position:relative;
  }
  .searchbox input{
    width:100%; background:var(--surface); border:1px solid var(--line);
    border-radius:8px; padding:9px 14px 9px 34px; color:var(--text);
    font-family:inherit; font-size:13px; outline:none;
    transition:border-color .15s;
  }
  .searchbox input:focus{ border-color:var(--violet); }
  .searchbox input::placeholder{ color:var(--muted); }
  .searchbox svg{ position:absolute; left:11px; top:50%; transform:translateY(-50%); pointer-events:none; }

  main{ max-width:1180px; margin:0 auto; padding: 20px 24px 80px; }

  /* Zweispaltiges Layout: Inhalt + Sidebar (für Werbung & Widgets) */
  .page-layout{ display:grid; grid-template-columns: 1fr 300px; gap:32px; align-items:start; }
  .sidebar{ display:flex; flex-direction:column; gap:24px; position:sticky; top:80px; }

  /* Werbeplätze — klar markiert, bereit für echten Anzeigen-Code (z. B. Google AdSense) */
  .ad-slot{
    border:1px dashed var(--line); border-radius:12px; background:var(--surface);
    display:flex; align-items:center; justify-content:center;
    color:var(--muted); font-size:11px; text-align:center; position:relative;
    min-height:90px; padding:12px;
  }
  .ad-slot .ad-tag{
    position:absolute; top:8px; left:12px; font-size:9px; letter-spacing:0.08em;
    text-transform:uppercase; color:var(--muted); opacity:0.7;
  }
  .ad-header{ margin-bottom:26px; min-height:90px; }
  .ad-sidebar{ min-height:250px; }
  .ad-infeed{ grid-column: 1 / -1; min-height:120px; }
  .ad-footer{ margin-top:30px; min-height:90px; }

  .widget{
    border:1px solid var(--line); border-radius:12px; background:var(--surface); padding:18px;
  }
  .widget h3{ font-size:12px; text-transform:uppercase; letter-spacing:0.06em; margin-bottom:14px; color:var(--muted); }
  .trending-item{
    display:flex; align-items:center; gap:10px; padding:9px 0;
    border-bottom:1px solid var(--line); cursor:pointer;
  }
  .trending-item:last-child{ border-bottom:none; padding-bottom:0; }
  .trending-item:first-child{ padding-top:0; }
  .trending-rank{ font-family:ui-monospace, monospace; font-size:13px; color:var(--amber); font-weight:600; width:16px; flex:0 0 auto; }
  .trending-item p{ font-size:12.5px; line-height:1.4; color:var(--text); }
  .trending-item:hover p{ color:var(--violet); }

  .newsletter-box{
    border:1px solid rgba(124,92,252,0.35); border-radius:12px; padding:18px;
    background: linear-gradient(160deg, rgba(124,92,252,0.1), rgba(255,77,141,0.06));
  }
  .newsletter-box h3{ font-size:14px; margin-bottom:6px; color:var(--text); }
  .newsletter-box p{ font-size:12px; color:var(--muted); line-height:1.5; margin-bottom:12px; }
  .newsletter-box input{
    width:100%; background:var(--bg); border:1px solid var(--line); border-radius:8px;
    padding:9px 12px; color:var(--text); font-size:12.5px; margin-bottom:8px; outline:none;
  }
  .newsletter-box input:focus{ border-color:var(--violet); }
  .newsletter-box button{
    width:100%; background:var(--violet); color:#0A0C16; border:none; border-radius:8px;
    padding:9px 12px; font-size:12.5px; font-weight:600;
  }
  .newsletter-box button:hover{ background:var(--magenta); }

  .byline{
    display:flex; align-items:center; gap:8px; color:var(--muted); font-size:12px;
    margin-bottom:20px;
  }
  .byline .avatar{
    width:22px; height:22px; border-radius:50%;
    background:linear-gradient(135deg, var(--violet), var(--magenta));
    flex:0 0 auto;
  }

  @media (max-width:980px){
    .page-layout{ grid-template-columns: 1fr; }
    .sidebar{ position:static; flex-direction:row; flex-wrap:wrap; }
    .sidebar > *{ flex:1 1 260px; }
    /* Auf Mobile zuerst das Trending-Widget & die Newsletter-Box zeigen,
       Werbeplätze folgen danach — bessere Nutzererfahrung als "Ad first" */
    .sidebar .widget{ order:1; }
    .sidebar .newsletter-box{ order:2; }
    .sidebar .ad-slot{ order:3; flex-basis:100%; min-height:100px; }
  }

  /* Hero */
  .hero{
    display:grid; grid-template-columns: 1.3fr 1fr; gap:28px;
    border:1px solid var(--line); border-radius:14px;
    background: linear-gradient(160deg, var(--surface), var(--surface-2));
    overflow:hidden; margin-bottom:34px; cursor:pointer;
    position:relative; text-decoration:none; color:inherit;
  }
  .hero-art{
    background:
      linear-gradient(200deg, rgba(37,25,89,0.55), rgba(15,19,48,0.75)),
      url('https://picsum.photos/seed/loadout-halo/900/600') center/cover;
    min-height:280px;
    display:flex; align-items:flex-end; padding:18px;
  }
  .hero-content{ padding:26px 26px 26px 0; display:flex; flex-direction:column; justify-content:center; }
  .badge{
    display:inline-flex; align-items:center; gap:6px;
    font-size:10.5px; font-weight:600; text-transform:uppercase;
    padding:4px 9px; border-radius:5px; width:fit-content;
    margin-bottom:14px; letter-spacing:0.05em;
  }
  .badge.pc{ background:rgba(124,92,252,0.16); color:var(--violet); }
  .badge.konsole{ background:rgba(255,77,141,0.16); color:var(--magenta); }
  .badge.hardware{ background:rgba(52,217,201,0.16); color:var(--cyan); }
  .badge.industrie{ background:rgba(255,183,77,0.16); color:var(--amber); }
  .badge.trending{ background:rgba(255,183,77,0.16); color:var(--amber); }

  .hero-content h1{ font-size:32px; line-height:1.15; margin-bottom:14px; }
  .hero-content p{ color:var(--muted); font-size:14.5px; line-height:1.6; margin-bottom:18px; }

  .hype{ display:flex; align-items:center; gap:10px; margin-top:auto; }
  .hype-label{ font-size:10.5px; color:var(--muted); text-transform:uppercase; letter-spacing:0.05em; white-space:nowrap; }
  .hype-bar{ flex:1; height:6px; background:var(--line); border-radius:4px; overflow:hidden; max-width:140px; }
  .hype-fill{ height:100%; border-radius:4px; background:linear-gradient(90deg, var(--violet), var(--magenta)); }
  .hype-pct{ font-size:11px; color:var(--text); font-weight:600; }

  /* Section label */
  .section-head{ display:flex; align-items:baseline; gap:12px; margin: 8px 0 18px; }
  .section-head h2{ font-size:14px; text-transform:uppercase; letter-spacing:0.08em; color:var(--text); }
  .section-head .rule{ flex:1; height:1px; background:var(--line); }

  /* Filter chips */
  .chips{
    display:flex; flex-wrap:wrap; gap:8px; margin-bottom:22px;
  }
  .chip{
    background:var(--surface); border:1px solid var(--line); color:var(--muted);
    font-size:12px; font-weight:500; padding:7px 14px; border-radius:20px;
    transition: all .15s; white-space:nowrap;
  }
  .chip:hover{ color:var(--text); border-color:#39406b; }
  .chip.active{ background:var(--violet); border-color:var(--violet); color:#0A0C16; font-weight:600; }
  .chip.saved-chip.active{ background:var(--magenta); border-color:var(--magenta); }

  @media (max-width:820px){
    .chips{ flex-wrap:nowrap; overflow-x:auto; -webkit-overflow-scrolling:touch; padding-bottom:4px; scrollbar-width:thin; }
    .chips::-webkit-scrollbar{ height:4px; }
    .chips::-webkit-scrollbar-thumb{ background:var(--line); border-radius:4px; }
  }

  /* Grid */
  .grid{ display:grid; grid-template-columns: repeat(3, 1fr); gap:20px; }
  .card{
    border:1px solid var(--line); border-radius:12px; background:var(--surface);
    overflow:hidden; display:flex; flex-direction:column; height:100%;
    transition: transform .15s, border-color .15s, box-shadow .15s;
    cursor:pointer; position:relative; text-decoration:none; color:inherit;
  }
  .card:hover{ transform: translateY(-3px); border-color:#39406b; box-shadow:0 12px 28px rgba(0,0,0,0.35); }
  .card-art{ height:130px; position:relative; }
  .card-body{ padding:18px; display:flex; flex-direction:column; flex:1; }
  .card-body h3{ font-size:16.5px; line-height:1.3; margin: 10px 0 8px; }
  .card-body p{ color:var(--muted); font-size:13px; line-height:1.55; flex:1; margin-bottom:14px; }

  .meta{ display:flex; align-items:center; justify-content:space-between; font-size:11px; color:var(--muted); }

  .save-btn{
    position:absolute; top:10px; right:10px; z-index:2;
    width:30px; height:30px; border-radius:50%; border:none;
    background:rgba(10,12,22,0.55); backdrop-filter:blur(4px);
    display:flex; align-items:center; justify-content:center;
    transition: transform .12s, background .15s;
  }
  .save-btn:hover{ transform:scale(1.08); background:rgba(10,12,22,0.8); }
  .save-btn svg{ transition: fill .15s, stroke .15s; }
  .save-btn.saved svg{ fill:var(--magenta); stroke:var(--magenta); }

  .trending-tag{
    position:absolute; top:10px; left:10px; z-index:2;
    background:rgba(10,12,22,0.7); backdrop-filter:blur(4px);
    color:var(--amber); font-size:10px; font-weight:600;
    padding:4px 8px; border-radius:20px; letter-spacing:0.04em;
    display:flex; align-items:center; gap:4px;
  }

  .empty-state{
    text-align:center; padding:60px 20px; color:var(--muted);
    border:1px dashed var(--line); border-radius:12px; font-size:14px;
  }

  /* Detail view */
  .detail{ display:none; }
  .detail.active{ display:block; }
  .back-btn{
    background:none; border:none; color:var(--muted); font-size:13px;
    display:flex; align-items:center; gap:6px; margin-bottom:22px; padding:0;
  }
  .back-btn:hover{ color:var(--text); }
  .detail-art{
    height:220px; border-radius:14px; margin-bottom:26px;
    background: linear-gradient(200deg, #251959, #0F1330);
    background-size:cover; background-position:center;
  }
  .detail-top{ display:flex; align-items:center; justify-content:space-between; gap:16px; }
  .detail h1{ font-size:30px; line-height:1.2; margin: 8px 0 16px; max-width:720px; }
  .detail-meta{ display:flex; align-items:center; gap:16px; margin-bottom:26px; flex-wrap:wrap; }
  .detail p.body{ color:#C7C7DA; font-size:15px; line-height:1.75; max-width:720px; margin-bottom:16px; }
  .source-link{
    display:inline-block; margin-top:14px; font-size:12.5px; color:var(--violet);
    text-decoration:none; border-bottom:1px solid rgba(124,92,252,0.4);
  }
  .source-link:hover{ color:var(--magenta); border-color:rgba(255,77,141,0.5); }

  .detail-save{
    display:flex; align-items:center; gap:7px;
    background:var(--surface); border:1px solid var(--line); border-radius:20px;
    padding:8px 16px; font-size:12.5px; color:var(--muted);
    transition: all .15s;
  }
  .detail-save:hover{ color:var(--text); border-color:#39406b; }
  .detail-save.saved{ color:var(--magenta); border-color:rgba(255,77,141,0.4); }
  .detail-save.saved svg{ fill:var(--magenta); stroke:var(--magenta); }

  /* XP Toast */
  #toast-container{
    position:fixed; bottom:22px; left:50%; transform:translateX(-50%);
    z-index:200; display:flex; flex-direction:column; gap:8px; align-items:center;
    pointer-events:none;
  }
  .toast{
    background:var(--surface-2); border:1px solid var(--violet);
    color:var(--text); font-size:12.5px; font-weight:500;
    padding:9px 18px; border-radius:20px;
    box-shadow:0 8px 24px rgba(0,0,0,0.4);
    animation: toast-in .25s ease-out, toast-out .3s ease-in 1.7s forwards;
    display:flex; align-items:center; gap:8px;
  }
  @keyframes toast-in{ from{ opacity:0; transform:translateY(10px); } to{ opacity:1; transform:translateY(0); } }
  @keyframes toast-out{ to{ opacity:0; transform:translateY(-6px); } }

  footer{
    max-width:1180px; margin:0 auto; padding:26px 24px 90px;
    border-top:1px solid var(--line); margin-top:20px;
    color:var(--muted); font-size:12.5px; line-height:1.7;
  }
  footer b{ color:var(--text); }
  .footer-links{
    display:flex; align-items:center; gap:18px; margin-top:18px;
    padding-top:16px; border-top:1px solid var(--line);
    font-size:11.5px; flex-wrap:wrap;
  }
  .footer-links a{ color:var(--muted); text-decoration:none; }
  .footer-links a:hover{ color:var(--text); }
  .footer-links span{ margin-left:auto; color:var(--muted); opacity:0.7; }

  /* Cookie-Banner */
  .cookie-banner{
    display:none; position:fixed; left:0; right:0; bottom:0; z-index:300;
    background:var(--surface-2); border-top:1px solid var(--line);
    padding:16px 24px; box-shadow:0 -8px 30px rgba(0,0,0,0.4);
  }
  .cookie-banner.visible{ display:flex; flex-wrap:wrap; gap:16px; align-items:center; justify-content:space-between; }
  .cookie-text{ max-width:760px; font-size:12.5px; color:var(--muted); line-height:1.6; }
  .cookie-text a{ color:var(--violet); }
  .cookie-actions{ display:flex; gap:8px; flex-wrap:wrap; }
  .cookie-btn{
    border-radius:20px; padding:9px 16px; font-size:12px; font-weight:600; border:none;
    white-space:nowrap;
  }
  .cookie-btn.ghost{ background:transparent; border:1px solid var(--line); color:var(--muted); }
  .cookie-btn.ghost:hover{ color:var(--text); border-color:#39406b; }
  .cookie-btn.primary{ background:var(--violet); color:#0A0C16; }
  .cookie-btn.primary:hover{ background:var(--magenta); }

  .cookie-modal{
    display:none; position:fixed; inset:0; z-index:400;
    background:rgba(5,6,12,0.7); align-items:center; justify-content:center; padding:20px;
  }
  .cookie-modal.visible{ display:flex; }
  .cookie-modal-box{
    background:var(--surface); border:1px solid var(--line); border-radius:14px;
    padding:26px; max-width:440px; width:100%; max-height:85vh; overflow-y:auto;
  }
  .cookie-modal-box h3{ font-size:18px; margin-bottom:16px; }
  .cookie-category{ padding:14px 0; border-bottom:1px solid var(--line); }
  .cookie-category:last-of-type{ border-bottom:none; }
  .cookie-category-head{ display:flex; align-items:center; justify-content:space-between; font-size:13.5px; font-weight:600; margin-bottom:6px; }
  .cookie-category p{ font-size:12px; color:var(--muted); line-height:1.5; }

  .toggle{ position:relative; display:inline-block; width:36px; height:20px; }
  .toggle input{ opacity:0; width:0; height:0; }
  .toggle-slider{
    position:absolute; cursor:pointer; inset:0; background:var(--line);
    border-radius:20px; transition:.15s;
  }
  .toggle-slider::before{
    content:""; position:absolute; height:14px; width:14px; left:3px; bottom:3px;
    background:var(--text); border-radius:50%; transition:.15s;
  }
  .toggle input:checked + .toggle-slider{ background:var(--violet); }
  .toggle input:checked + .toggle-slider::before{ transform:translateX(16px); background:#0A0C16; }

  @media (max-width:820px){
    .hero{ grid-template-columns: 1fr; }
    .hero-art{ min-height:160px; }
    .grid{ grid-template-columns: 1fr; }
    nav{ flex-wrap:wrap; }
    .searchbox{ max-width:none; order:3; flex:1 1 100%; }
    .nav-right{ margin-left:0; }
  }
