/* ===========================================================
   GWMclub · "Inferno" theme for Gogs
   Dante Alighieri — La Divina Commedia, Inferno, Canto III
   =========================================================== */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;800&family=UnifrakturMaguntia&family=EB+Garamond:ital@0;1&display=swap');

:root{
  --ink:#0a0707;
  --ink-2:#140d0d;
  --panel:#1a1212;
  --panel-2:#221616;
  --ember:#ff5722;
  --blood:#8b0000;
  --blood-2:#b22222;
  --gold:#c8a25a;
  --ash:#cdbfb6;
  --ash-dim:#9a8a80;
  --line:#3a2420;
}

/* ---------- base ---------- */
html,body{
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(139,0,0,.35), transparent 60%),
    radial-gradient(900px 500px at 50% 120%, rgba(255,87,34,.18), transparent 60%),
    var(--ink) !important;
  color:var(--ash) !important;
  font-family:'EB Garamond', Georgia, serif !important;
}
.full.height{background:transparent !important;}
a{color:var(--gold) !important;}
a:hover{color:var(--ember) !important;}
::selection{background:var(--blood);color:#fff;}

/* faint embers drifting up */
body::after{
  content:"";position:fixed;inset:0;pointer-events:none;z-index:0;
  background-image:
    radial-gradient(2px 2px at 20% 90%, rgba(255,87,34,.7), transparent),
    radial-gradient(2px 2px at 70% 80%, rgba(255,120,40,.5), transparent),
    radial-gradient(1px 1px at 40% 95%, rgba(255,180,90,.6), transparent),
    radial-gradient(1px 1px at 85% 88%, rgba(255,87,34,.5), transparent);
  background-repeat:no-repeat;
  animation:embers 9s linear infinite;
  opacity:.5;
}
@keyframes embers{
  0%{transform:translateY(0);opacity:.0}
  20%{opacity:.6}
  100%{transform:translateY(-60vh);opacity:0}
}

/* ---------- top navigation bar ---------- */
.following.bar,
.following.bar .ui.menu,
#navbar{
  background:linear-gradient(180deg,#160e0e,#0c0808) !important;
  border-bottom:1px solid var(--line) !important;
  box-shadow:0 2px 18px rgba(139,0,0,.4) !important;
}
.ui.menu .item,
.following.bar .item{color:var(--ash) !important;}
.ui.menu .item:hover{color:var(--ember) !important;}
.brand .ui.mini.image,.logo{filter:drop-shadow(0 0 6px var(--ember));}

/* ---------- panels / segments / cards ---------- */
.ui.segment,
.ui.attached.segment,
.ui.card,
.ui.segments,
.repository .ui.segment{
  background:linear-gradient(180deg,var(--panel),var(--panel-2)) !important;
  border:1px solid var(--line) !important;
  color:var(--ash) !important;
  box-shadow:0 0 0 1px rgba(139,0,0,.25), 0 18px 50px rgba(0,0,0,.6) !important;
}
.ui.attached.header,
.ui.top.attached.header{
  background:linear-gradient(180deg,#2a1a18,#1c1110) !important;
  color:var(--gold) !important;
  border:1px solid var(--line) !important;
  font-family:'Cinzel',serif !important;
  letter-spacing:.06em;
  text-transform:uppercase;
  text-shadow:0 0 12px rgba(255,87,34,.35);
}

/* ---------- forms / inputs ---------- */
.ui.form input,
.ui.form textarea,
.ui.input>input,
.ui.selection.dropdown{
  background:#0d0909 !important;
  border:1px solid var(--line) !important;
  color:var(--ash) !important;
}
.ui.form input:focus{
  border-color:var(--ember) !important;
  box-shadow:0 0 10px rgba(255,87,34,.45) !important;
}
.ui.form label,label{color:var(--ash-dim) !important;}

/* ---------- buttons ---------- */
.ui.green.button,
.ui.primary.button,
.ui.button.green{
  background:linear-gradient(180deg,var(--blood-2),var(--blood)) !important;
  color:#fff !important;
  border:1px solid #d24a2c !important;
  text-shadow:0 1px 0 rgba(0,0,0,.6);
  box-shadow:0 0 14px rgba(178,34,34,.55) !important;
  font-family:'Cinzel',serif !important;
  letter-spacing:.08em;
  transition:transform .15s ease, box-shadow .2s ease;
}
.ui.green.button:hover,
.ui.primary.button:hover{
  background:linear-gradient(180deg,#d0211b,#9b0d0d) !important;
  box-shadow:0 0 22px rgba(255,87,34,.7) !important;
  transform:translateY(-1px);
}

/* ---------- footer ---------- */
footer{
  background:transparent !important;
  border-top:1px solid var(--line);
  color:var(--ash-dim) !important;
}
footer a{color:var(--ash-dim) !important;}

/* ===========================================================
   The Gate of Hell — login hero
   =========================================================== */
.inferno-gate{
  position:relative;z-index:1;
  max-width:820px;margin:3.2rem auto 1.2rem;
  text-align:center;padding:0 1rem;
}
.inferno-gate .canto{
  font-family:'Cinzel',serif;
  font-size:.8rem;letter-spacing:.42em;text-transform:uppercase;
  color:var(--ash-dim);margin-bottom:1.1rem;
}
.inferno-gate .verse{
  font-family:'UnifrakturMaguntia',cursive;
  font-size:clamp(2.1rem,5.6vw,4.1rem);
  line-height:1.15;
  color:#f3d9c2;
  text-shadow:
    0 0 6px rgba(255,87,34,.65),
    0 0 22px rgba(178,34,34,.55),
    0 0 48px rgba(139,0,0,.5);
  animation:flicker 3.6s infinite;
}
.inferno-gate .translit{
  margin-top:1rem;font-style:italic;color:var(--ash-dim);
  font-size:1rem;letter-spacing:.02em;
}
.inferno-gate .rule{
  width:160px;height:1px;margin:1.5rem auto 0;
  background:linear-gradient(90deg,transparent,var(--ember),transparent);
  box-shadow:0 0 12px var(--ember);
}
@keyframes flicker{
  0%,100%{opacity:1}
  45%{opacity:.92}
  50%{opacity:.78}
  55%{opacity:.95}
  70%{opacity:.86}
}
.user.signin{position:relative;z-index:1;}
.user.signin .ui.top.attached.header{text-align:center;}

/* ===========================================================
   Tables · lists · labels · tabs  (dashboard repo list, repo files)
   =========================================================== */
.ui.table{
  background:linear-gradient(180deg,var(--panel),var(--panel-2)) !important;
  color:var(--ash) !important;
  border:1px solid var(--line) !important;
}
.ui.attached.table.segment,
.ui.table.segment{background:linear-gradient(180deg,var(--panel),var(--panel-2)) !important;}
.ui.table thead th{
  background:#1c1110 !important;
  color:var(--gold) !important;
  border-bottom:1px solid var(--line) !important;
}
.ui.table tr,
.ui.table tbody tr{background:transparent !important;}
.ui.table td,.ui.table th{
  border-color:rgba(58,36,32,.6) !important;
  color:var(--ash) !important;
}
.ui.table tbody tr:hover,
.ui.selectable.table tbody tr:hover,
.ui.table tr:hover td{background:rgba(139,0,0,.16) !important;}

/* generic lists / repo rows */
.ui.list,
.ui.list>.item,
.ui.list .item,
.repos .item,
#dashboard-repo-list .item{
  background:transparent !important;
  border-color:var(--line) !important;
  color:var(--ash) !important;
}
.ui.divided.list>.item{border-top:1px solid rgba(58,36,32,.6) !important;}

/* labels / badges (commit sha, counters) */
.ui.label,
.ui.basic.label,
.ui.tag.label,
.sha.label,
.ui.horizontal.list .count{
  background:#2a1a18 !important;
  color:var(--gold) !important;
  border:1px solid var(--line) !important;
}

/* repo top tabs: Файлы / Задачи / Запросы / Вики / Настройки */
.repository .ui.tabular.menu,
.ui.tabular.menu,
.ui.pointing.menu,
.ui.secondary.menu{background:transparent !important;border-color:var(--line) !important;}
.ui.tabular.menu .item,
.ui.pointing.menu .item,
.ui.secondary.menu .item{color:var(--ash-dim) !important;}
.ui.tabular.menu .active.item,
.ui.pointing.menu .active.item{
  color:var(--gold) !important;
  background:linear-gradient(180deg,var(--panel),var(--panel-2)) !important;
  border-color:var(--line) !important;
}

/* commits/branches/releases sub-bar inside a repo */
.ui.segment.metas,
.repository .ui.attached.header{color:var(--gold) !important;}

/* dropdowns / popup menus (incl. top-right user menu) */
.ui.dropdown .menu,
.ui.menu .menu,
.ui.menu .ui.dropdown .menu,
.following.bar .ui.dropdown .menu{
  background:var(--panel) !important;
  border:1px solid var(--line) !important;
  box-shadow:0 14px 44px rgba(0,0,0,.65) !important;
}
/* generic popup-menu items (dropdowns NOT inside a .ui.menu, e.g. selection dropdowns) */
.ui.dropdown .menu .item,
.ui.dropdown .menu .item *,
.ui.dropdown .menu .text,
.ui.dropdown .menu button,
.ui.dropdown .menu form{color:var(--ash) !important;}
.ui.dropdown .menu button{background:transparent !important;border:0 !important;font:inherit !important;cursor:pointer;}
.ui.dropdown .menu .item .icon,
.ui.dropdown .menu .item .octicon{color:var(--gold) !important;}
.ui.dropdown .menu>.divider{border-top:1px solid var(--line) !important;}
.ui.dropdown.head .menu:after{background:var(--panel) !important;}

/* --- BEAT Semantic's high-specificity !important rules ---
   Semantic: .ui.menu .ui.dropdown .menu>.item{color:rgba(0,0,0,.87)!important}  (0-6-0)
   We add `body` -> (0-6-1)/(0-7-1) so we win regardless of load order. */
body .ui.menu .ui.dropdown .menu>.item,
body .ui.menu .ui.dropdown .menu>.item *,
body .ui.menu .ui.dropdown .menu>.item .text,
body .ui.menu .ui.dropdown .menu>.item button{color:var(--ash) !important;}
body .ui.menu .ui.dropdown .menu>.item .icon,
body .ui.menu .ui.dropdown .menu>.item .octicon{color:var(--gold) !important;}
body .ui.menu .ui.dropdown .menu>.item:hover,
body .ui.menu .ui.dropdown .menu>.item:hover *{
  background:rgba(139,0,0,.22) !important;color:var(--ember) !important;
}
body .ui.menu .ui.dropdown .menu>.active.item,
body .ui.menu .ui.dropdown .menu>.selected.item{color:var(--gold) !important;}
/* the "ВЫ ВОШЛИ КАК …" header inside the menu (div.ui.header) */
body .ui.menu .ui.dropdown .menu>.header,
body .ui.menu .ui.dropdown .menu>.header *,
.ui.dropdown .menu>.header,
.ui.dropdown .menu>.header *{
  color:var(--gold) !important;
  font-family:'Cinzel',serif !important;letter-spacing:.06em;
}

/* repo tabs: Semantic .ui.tabular.menu .active.item / .secondary.pointing .header.item are !important */
body .ui.tabular.menu .active.item,
body .ui.secondary.pointing.menu .active.item,
body .ui.secondary.pointing.menu .header.item{color:var(--gold) !important;}

/* secondary (grey) buttons -> dark */
.ui.basic.button,
.ui.button:not(.green):not(.primary):not(.red):not(.blue){
  background:#1c1212 !important;
  color:var(--ash) !important;
  border:1px solid var(--line) !important;
  box-shadow:none !important;
}
.ui.button:not(.green):not(.primary):not(.red):not(.blue):hover{
  background:#241616 !important;color:var(--ember) !important;
}

/* repo description / "Нет описания" */
.repository .header-wrapper,
.repo-description{color:var(--ash-dim) !important;}

/* ===========================================================
   Readability safety-net — no dark-on-dark text anywhere
   =========================================================== */
/* generic headers: profile names, section titles, settings, admin */
.ui.header,
.ui.header>.content,
.ui.items>.item>.content>.header,
h1,h2,h3,h4,h5,h6{color:var(--ash) !important;}
.ui.header .sub.header,
.sub.header{color:var(--ash-dim) !important;}

/* list item headers / descriptions */
.ui.list .header,
.ui.list>.item>.content>.header{color:var(--ash) !important;}
.ui.list .description,
.ui.list>.item>.content>.description{color:var(--ash-dim) !important;}

/* placeholders + text shown inside selection dropdowns */
::placeholder{color:var(--ash-dim) !important;opacity:1;}
.ui.dropdown>.text,
.ui.selection.dropdown>.text,
.ui.dropdown .text{color:var(--ash) !important;}
.ui.dropdown>.default.text,
.ui.dropdown .default.text{color:var(--ash-dim) !important;}

/* utility text classes Gogs uses for meta/timestamps */
.text.black,.text.grey{color:var(--ash) !important;}
.text.light.grey,.time-since{color:var(--ash-dim) !important;}

/* rendered markdown: README, issues, wiki, comments */
.markdown,
.markdown p,
.markdown li,
.markdown td,
.markdown dd,
.markdown blockquote{color:var(--ash) !important;}
.markdown h1,.markdown h2,.markdown h3,
.markdown h4,.markdown h5,.markdown h6{
  color:var(--gold) !important;border-bottom-color:var(--line) !important;
}
.markdown a{color:var(--ember) !important;}
.markdown blockquote{
  border-left:4px solid var(--blood) !important;
  color:var(--ash-dim) !important;background:rgba(0,0,0,.22) !important;
}
.markdown table th,.markdown table td{border-color:var(--line) !important;}
.markdown hr{border-color:var(--line) !important;background:var(--line) !important;}
/* inline code = dark chip with light text (not syntax-highlighted) */
.markdown :not(pre)>code,
.markdown tt{
  background:#0d0909 !important;color:#e8c9a0 !important;
  border:1px solid var(--line) !important;border-radius:3px;
}
/* fenced code BLOCKS are Chroma-highlighted (dark tokens) -> need a LIGHT surface */
.markdown pre,
.markdown pre>code,
.markdown .highlight,
.markdown .highlight pre{
  background:#f6f0e4 !important;color:#2b2118 !important;
  border:1px solid var(--line) !important;
}

/* flash / alert messages -> dark, tinted by severity (kept high-contrast) */
.ui.message{
  background:linear-gradient(180deg,var(--panel),var(--panel-2)) !important;
  color:var(--ash) !important;border:1px solid var(--line) !important;
  box-shadow:none !important;
}
.ui.message .header{color:var(--gold) !important;}
.ui.negative.message,.ui.error.message{border-color:#b34a3a !important;color:#f0b6ad !important;}
.ui.positive.message,.ui.success.message{border-color:#6f9a45 !important;color:#d2e3ba !important;}
.ui.warning.message{border-color:var(--gold) !important;color:#ecd49f !important;}
.ui.info.message{border-color:#4a7e9c !important;color:#bfdeec !important;}

/* modals (delete confirmations, etc.) */
.ui.modal{
  background:linear-gradient(180deg,var(--panel),var(--panel-2)) !important;
  color:var(--ash) !important;border:1px solid var(--line) !important;
}
.ui.modal>.header{background:#1c1110 !important;color:var(--gold) !important;border-bottom:1px solid var(--line) !important;}
.ui.modal>.content{background:transparent !important;color:var(--ash) !important;}
.ui.modal>.actions{background:#140d0d !important;border-top:1px solid var(--line) !important;}

/* ===========================================================
   Code & diff views — Chroma is a LIGHT syntax theme (dark tokens),
   so force a light "parchment" surface to keep code legible.
   =========================================================== */
/* file source view */
#file-content .code-view,
#file-content .code-view table,
#file-content .code-view .lines-code,
#file-content .code-view .lines-code pre,
#file-content .code-view .lines-code ol,
.file-body.file-code .lines-code,
.code-view{
  background:#f6f0e4 !important;
  color:#2b2118 !important;
}
/* gutters (line numbers) — slightly darker parchment */
#file-content .code-view .lines-num,
#file-content .code-view .lines-num pre,
.diff-file-box .file-body.file-code .lines-num,
.diff-file-box .code-diff .lines-num{
  background:#ece3d2 !important;color:#8a7d66 !important;
}
/* diff view: light context surface; add/del lines keep their own green/red (set with !important upstream) */
.diff-file-box .code-diff,
.diff-file-box .file-body.file-code,
.diff-file-box .code-diff tbody tr td,
.diff-file-box .code-diff tbody tr td pre{
  background-color:#f6f0e4;
  color:#2b2118;
}
.diff-file-box{background:#f6f0e4 !important;}
/* selected/active line keeps a soft highlight */
.code-view .lines-num pre li.active{background:#fff3c4 !important;}

/* ===========================================================
   Eliminate every leftover LIGHT background (found by sweeping
   gogs.min.css) — these caused light-text-on-light-bg.
   =========================================================== */
/* repo header (the #fafafa one) + diff file header */
.repository .header-wrapper{background:transparent !important;border-bottom:1px solid var(--line) !important;}
.repository .diff-file-box .header{
  background:linear-gradient(180deg,#2a1a18,#1c1110) !important;
  color:var(--gold) !important;border-color:var(--line) !important;
}
/* issue/PR comments */
.repository.view.issue .comment-list .comment .content .header{
  background:#1c1110 !important;color:var(--ash) !important;
  border-bottom:1px solid var(--line) !important;
}
.repository.view.issue .comment-list .comment .content>.bottom.segment{background:var(--panel-2) !important;}
.repository.view.issue .comment-list:before{background-color:var(--line) !important;}
/* settings / vertical menu header */
.ui.vertical.menu .header.item{background:#1c1110 !important;color:var(--gold) !important;}
/* dashboard feed: private rows */
.feeds .list ul li.private{background-color:rgba(200,162,90,.10) !important;}
/* markdown tables */
.markdown:not(code) table tr{background-color:var(--panel) !important;color:var(--ash) !important;}
.markdown:not(code) table tr:nth-child(2n){background-color:var(--panel-2) !important;}
.markdown:not(code) table th{background-color:#1c1110 !important;color:var(--gold) !important;}
.markdown:not(code) .csv-data th{background:#1c1110 !important;color:var(--gold) !important;}
.markdown:not(code) .csv-data .blob-num{background:var(--panel) !important;color:var(--ash-dim) !important;}
/* top-bar search box */
.following.bar .searchbox,
.following.bar .searchbox:focus{background-color:#0d0909 !important;color:var(--ash) !important;}
.following.bar.light{background-color:transparent !important;}
/* info / warning tinted headers -> dark, readable */
.ui .info.segment.top{background-color:rgba(74,126,156,.18) !important;color:var(--ash) !important;}
.ui .warning.header{background-color:rgba(200,162,90,.18) !important;color:var(--ash) !important;}
/* admin config dump + raw file view: keep a LIGHT parchment surface with DARK text (readable) */
.admin.config pre,
code.raw,pre.raw{background-color:#f6f0e4 !important;color:#2b2118 !important;}
