/* AeThex Forge — Cyberpunk Theme */

/* === WHITELABEL === */
a#navbar-logo img {
  content: url('/assets/img/aethex-logo.svg') !important;
}

.left-links {
  display: none !important;
}

/* === VARIABLES === */
:root {
  --bg-primary: #000000;
  --bg-secondary: #0a0a0a;
  --bg-elevated: #111111;
  --accent-cyan: #00ffff;
  --accent-magenta: #ff00ff;
  --accent-red: #ff0055;
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --border-cyan: rgba(0, 255, 255, 0.3);
  --glow-cyan: 0 0 20px rgba(0, 255, 255, 0.4), 0 0 40px rgba(0, 255, 255, 0.2);
}

/* === BASE === */
body {
  background: #000000 !important;
  color: #ffffff !important;
  font-family: 'Electrolize', 'Source Code Pro', 'Courier New', monospace !important;
}

/* Scanline overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 1px,
    rgba(0, 255, 255, 0.02) 1px,
    rgba(0, 255, 255, 0.02) 2px
  );
  pointer-events: none;
  z-index: -1;
}

/* Grid background */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: -1;
}

/* === NAVIGATION — only target the top navbar, not all .ui.menu === */
#navbar {
  background: rgba(0, 0, 0, 0.95) !important;
  border-bottom: 1px solid var(--border-cyan) !important;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.15) !important;
}

#navbar > .item,
#navbar .navbar-left .item,
#navbar .navbar-right .item {
  color: var(--text-secondary) !important;
}

#navbar > .item:hover,
#navbar .navbar-left .item:hover,
#navbar .navbar-right .item:hover {
  color: var(--accent-cyan) !important;
  background: rgba(0, 255, 255, 0.05) !important;
}

/* === DROPDOWNS — NO z-index, let Forgejo handle stacking === */
.user-menu,
.ui.dropdown .menu {
  background: #080808 !important;
  border: 1px solid rgba(0, 255, 255, 0.25) !important;
  border-top: 2px solid var(--accent-cyan) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.9), 0 0 20px rgba(0, 255, 255, 0.1) !important;
  border-radius: 0 !important;
  min-width: 200px !important;
}

.user-menu .item,
.ui.dropdown .menu .item {
  color: rgba(255, 255, 255, 0.75) !important;
  background: transparent !important;
  font-family: 'Source Code Pro', monospace !important;
  font-size: 0.82rem !important;
  letter-spacing: 0.03em !important;
  padding: 0.6rem 1rem !important;
  border-left: 2px solid transparent !important;
  transition: all 0.15s !important;
}

.user-menu .item:hover,
.ui.dropdown .menu .item:hover {
  background: rgba(0, 255, 255, 0.06) !important;
  color: var(--accent-cyan) !important;
  border-left-color: var(--accent-cyan) !important;
}

.user-menu .item svg,
.ui.dropdown .menu .item svg {
  opacity: 0.5;
  margin-right: 0.5rem;
}

.user-menu .item:hover svg {
  opacity: 1;
}

.user-menu .header {
  color: var(--accent-cyan) !important;
  background: rgba(0, 255, 255, 0.04) !important;
  font-family: 'Source Code Pro', monospace !important;
  font-size: 0.7rem !important;
  letter-spacing: 0.15em !important;
  text-transform: uppercase !important;
  padding: 0.6rem 1rem !important;
  border-bottom: 1px solid rgba(0, 255, 255, 0.15) !important;
}

.user-menu .divider,
.ui.dropdown .menu .divider {
  border-color: rgba(0, 255, 255, 0.1) !important;
  margin: 0.25rem 0 !important;
}


/* === SITE TITLE / LOGO === */
.navbar .brand,
.navbar .title,
a.item.brand {
  color: var(--accent-cyan) !important;
  text-shadow: var(--glow-cyan) !important;
  font-weight: 700 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
}

/* === MAIN CONTENT === */
.ui.container,
.repository,
.home,
#main-container,
.main-panel {
  background: transparent !important;
}

/* === CARDS & SEGMENTS === */
.ui.segment,
.ui.card,
.ui.cards > .card,
.repository-list .item,
.explore .list .item {
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border-cyan) !important;
  color: var(--text-primary) !important;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.05) !important;
  transition: border-color 0.3s, box-shadow 0.3s !important;
}

.ui.segment:hover,
.ui.card:hover,
.repository-list .item:hover {
  border-color: var(--accent-cyan) !important;
  box-shadow: var(--glow-cyan) !important;
}

/* === BUTTONS === */
.ui.button,
.ui.primary.button,
button.primary {
  background: rgba(0, 255, 255, 0.15) !important;
  color: var(--accent-cyan) !important;
  border: 1px solid var(--accent-cyan) !important;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.3) !important;
  font-family: 'Source Code Pro', monospace !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  font-size: 0.8em !important;
  transition: all 0.2s !important;
}

.ui.button:hover,
.ui.primary.button:hover {
  background: rgba(0, 255, 255, 0.25) !important;
  box-shadow: var(--glow-cyan) !important;
  transform: translateY(-1px) !important;
}

.ui.red.button,
.ui.negative.button {
  background: rgba(255, 0, 85, 0.15) !important;
  color: var(--accent-red) !important;
  border: 1px solid var(--accent-red) !important;
  box-shadow: 0 0 10px rgba(255, 0, 85, 0.3) !important;
}

/* === INPUTS === */
.ui.input input,
.ui.form input,
.ui.form textarea,
.ui.form select,
input[type="text"],
input[type="password"],
input[type="email"],
textarea {
  background: #0a0a0a !important;
  border: 1px solid var(--border-cyan) !important;
  color: #ffffff !important;
  font-family: 'Source Code Pro', monospace !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
}

.ui.input input:focus,
.ui.form input:focus,
textarea:focus {
  border-color: var(--accent-cyan) !important;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.3) !important;
  outline: none !important;
}

/* === LABELS === */
.ui.label,
.topic,
.badge {
  background: rgba(0, 255, 255, 0.1) !important;
  color: var(--accent-cyan) !important;
  border: 1px solid var(--border-cyan) !important;
}

/* === LINKS === */
a {
  color: var(--accent-cyan) !important;
  transition: text-shadow 0.2s !important;
}

a:hover {
  color: #ffffff !important;
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.8) !important;
}

/* === HEADINGS === */
.repository .header,
.page-header,
h1, h2, h3, h4 {
  color: #ffffff !important;
}

/* === CODE === */
.code-view,
pre,
code,
.highlight {
  background: #050505 !important;
  border: 1px solid rgba(0, 255, 255, 0.15) !important;
  color: #00ff00 !important;
  font-family: 'Source Code Pro', monospace !important;
}

/* === FILE TREE === */
.repository .file-list,
.repository .entry {
  background: var(--bg-secondary) !important;
  border-color: var(--border-cyan) !important;
}

.repository .entry:hover {
  background: rgba(0, 255, 255, 0.05) !important;
}

/* === DIFF === */
.diff-file-box {
  border: 1px solid var(--border-cyan) !important;
}

/* === FOOTER === */
#footer,
.footer,
footer {
  background: rgba(0, 0, 0, 0.95) !important;
  border-top: 1px solid var(--border-cyan) !important;
  color: var(--text-secondary) !important;
}

/* === TABLES === */
.ui.table {
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-cyan) !important;
}

.ui.table thead th {
  background: rgba(0, 255, 255, 0.08) !important;
  color: var(--accent-cyan) !important;
  border-bottom: 1px solid var(--border-cyan) !important;
}

.ui.table tr:hover td {
  background: rgba(0, 255, 255, 0.04) !important;
}

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: rgba(0, 255, 255, 0.4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-cyan); }

/* === SELECTION === */
::selection { background: rgba(0, 255, 255, 0.3); color: #ffffff; }
