/* Neon Night theme for Gitea 1.27.x. Keep this file independent from Gitea source. */
gitea-theme-meta-info {
  --theme-display-name: "Neon Night";
  --theme-color-scheme: "dark";
}

:root {
  --is-dark-theme: true;
  --color-primary: #22d3ee;
  --color-primary-contrast: #ffffff;
  --color-primary-dark-1: #0891b2;
  --color-primary-dark-2: #0e7490;
  --color-primary-light-1: #67e8f9;
  --color-primary-light-2: #a5f3fc;
  --color-primary-light-5: #164e63;
  --color-primary-light-6: #083344;

  --color-body: #101c23;
  --neon-surface-0: #101c23;
  --neon-surface-1: #142630;
  --neon-surface-2: #1a313c;
  --neon-surface-3: #21404b;
  --color-box-body: #142630;
  --color-box-header: #1a313c;
  --color-box-body-highlight: #21404b;
  --color-secondary-bg: #12232c;
  --color-card: #172b35;
  --color-menu: #142630;
  --color-button: #1a313c;
  --color-input-background: #12232c;
  --color-input-border: #3c5966;
  --color-input-text: #f4f0ff;

  --color-text: #e3f4f6;
  --color-text-dark: #ffffff;
  --color-text-light: #c5e1e5;
  --color-text-light-1: #a8cbd0;
  --color-text-light-2: #89adb4;
  --color-text-light-3: #6e929a;
  --color-footer: #101c23;

  --color-nav-bg: #12232c;
  --color-nav-hover-bg: #21404b;
  --color-nav-text: #eeeaff;
  --color-secondary-nav-bg: #142630;
  --color-hover: #ffffff12;
  --color-hover-opaque: #211c31;
  --color-active: #c026ff2b;
  --color-light-border: #ffffff18;
  --color-shadow: #00000066;
  --color-shadow-opaque: #050509;
  --color-code-bg: #0c171d;
  --color-markup-code-block: #c026ff12;
  --color-markup-code-inline: #22d3ee18;
  --color-accent: #22d3ee;
  --color-small-accent: #164e63;
  --color-link: #67e8f9;
  --color-link-hover: #a5f3fc;
  --color-nav-border: #39234b;

  --color-green: #34d399;
  --color-green-light: #6ee7b7;
  --color-green-dark-1: #059669;
  --color-red: #fb7185;
  --color-red-light: #fda4af;
  --color-orange: #fb923c;
  --color-yellow: #facc15;
  --color-blue: #38bdf8;
  --color-violet: #a78bfa;
  --color-pink: #f472b6;

  --fonts-proportional: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  --fonts-monospace: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace !important;
  color-scheme: dark;
}

/* Shared surfaces and controls. Keep the page background uniform; accents belong on surfaces. */
html,
body {
  background: var(--neon-surface-0) !important;
  background-image: none !important;
}

body > .full.height,
.full.height,
#app,
main,
.page-content {
  background: transparent !important;
}

.ui.menu,
.ui.segment,
.ui.message,
.ui.card,
.ui.cards > .card,
.ui.modal,
.ui.dropdown .menu,
.ui.table,
.ui.form input,
.ui.form textarea,
.ui.form select,
input,
textarea,
select {
  border-color: var(--color-light-border) !important;
  box-shadow: 0 8px 30px var(--color-shadow);
}

.ui.menu,
.ui.segment,
.ui.message,
.ui.card,
.ui.cards > .card,
.ui.table,
.ui.dropdown .menu {
  background-color: var(--neon-surface-1) !important;
}

.ui.form input,
.ui.form textarea,
.ui.form select,
input,
textarea,
select {
  background-color: var(--neon-surface-0) !important;
}

.ui.menu,
.ui.segment,
.ui.message,
.ui.card,
.ui.cards > .card,
.ui.modal,
.ui.dropdown .menu {
  border-radius: 16px;
}

.ui.button,
.ui.buttons,
.ui.buttons > .button,
button,
input[type="button"],
input[type="submit"] {
  border-radius: 999px !important;
  transition: color 140ms ease, background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.ui.button:hover,
button:hover,
input[type="button"]:hover,
input[type="submit"]:hover {
  transform: translateY(-1px);
}

.ui.primary.button,
.ui.button.primary,
button.primary,
button[type="submit"] {
  background: linear-gradient(135deg, #c026ff, #7c3aed) !important;
  border-color: #d946ef !important;
  color: #ffffff !important;
  box-shadow: 0 0 22px #c026ff4d;
}

.ui.primary.button:hover,
.ui.button.primary:hover,
button.primary:hover,
button[type="submit"]:hover {
  background: linear-gradient(135deg, #d946ef, #8b5cf6) !important;
  box-shadow: 0 0 28px #d946ef73;
}

.ui.basic.button,
.ui.basic.buttons .button {
  background: #ffffff08 !important;
  border-color: #22d3ee66 !important;
  color: var(--color-link) !important;
}

.ui.buttons > .button:first-child,
.ui.buttons > .button:last-child,
.ui.buttons > .button:first-child:last-child,
.ui.buttons > .dropdown.button,
.ui.buttons > .ui.dropdown {
  border-radius: 999px !important;
}

.ui.basic.button:hover,
.ui.basic.buttons .button:hover {
  background: #22d3ee18 !important;
  border-color: var(--color-accent) !important;
  box-shadow: 0 0 18px #22d3ee40;
}

.ui.form input:focus,
.ui.form textarea:focus,
.ui.form select:focus,
input:focus,
textarea:focus,
select:focus,
.ui.button:focus,
button:focus,
a:focus-visible {
  outline: 2px solid var(--color-accent) !important;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px #22d3ee2e !important;
}

/* Navigation and repository chrome */
.ui.top.attached.menu,
.navbar,
.page-header,
.repo-header,
.secondary-nav,
.secondary-nav > .ui.container {
  background: var(--neon-surface-1) !important;
  border-color: #c026ff3d !important;
  box-shadow: 0 8px 28px #00000052, 0 1px 0 #22d3ee1f;
}

.ui.menu .item:hover,
.ui.menu .active.item,
.ui.menu .item.active {
  background: var(--color-nav-hover-bg) !important;
  color: #ffffff !important;
}

.repository .ui.tabs.menu,
.repo-header .ui.tabs.menu {
  border-bottom-color: #c026ff47 !important;
}

.repository .ui.tabs.menu .active.item,
.repo-header .ui.tabs.menu .active.item {
  color: #f0abfc !important;
  box-shadow: inset 0 -2px 0 var(--color-primary);
}

.repository .repo-button-row .ui.button,
.repo-header .ui.button,
.repo-header .ui.buttons,
.repo-header .ui.buttons > .button,
.repo-header .ui.dropdown,
.repo-header .dropdown.button,
.repo-header .button,
.repo-header .flex-text-block .ui.button,
.repo-header .flex-text-block a.ui.button,
.repo-header .flex-text-block button,
.repo-header .flex-text-block .ui.buttons,
.repo-header .flex-text-block .ui.buttons > .button {
  border-radius: 999px !important;
}

.repo-header .flex-text-block .ui.button,
.repo-header .flex-text-block button,
.repo-header .flex-text-block .ui.buttons > .button {
  background: var(--neon-surface-2) !important;
  border: 1px solid #8b5cf699 !important;
  color: #e9d5ff !important;
}

.repo-header .flex-text-block .ui.button:hover,
.repo-header .flex-text-block button:hover,
.repo-header .flex-text-block .ui.buttons > .button:hover {
  background: #3b2460 !important;
  border-color: #d946ef !important;
  color: #ffffff !important;
  box-shadow: 0 0 18px #c026ff4d;
}

/* Labels, badges, status and code */
.ui.label,
.label,
.badge {
  border-radius: 999px !important;
  border: 1px solid #ffffff1c;
}

.ui.label:hover,
.label:hover {
  filter: brightness(1.15);
}

pre,
code,
.code-view,
.file-view pre {
  border-radius: 12px;
}

.code-view,
.file-view pre {
  border: 1px solid #22d3ee24;
  box-shadow: inset 0 1px 0 #ffffff08;
}

.issue.list .item,
.comment-list .comment,
.timeline-item,
.repository .file-list {
  border-color: #ffffff12 !important;
}

/* Reduce harsh default corners on common containers without changing layout. */
.ui.attached.segment,
.ui.attached.message,
.ui.top.attached.menu,
.ui.bottom.attached.segment {
  border-radius: 16px !important;
}

@media (max-width: 767px) {
  .ui.menu,
  .ui.segment,
  .ui.message,
  .ui.card,
  .ui.cards > .card {
    border-radius: 12px;
  }

  .ui.button,
  .ui.buttons .button {
    min-height: 2.5rem;
  }
}

/* Cyan graphite finish: keep purple as a small secondary accent only. */
body,
html {
  background: #0e151b !important;
}

.ui.primary.button,
.ui.button.primary,
button.primary,
button[type="submit"] {
  background: linear-gradient(135deg, #0891b2, #0e7490) !important;
  border-color: #67e8f9 !important;
  box-shadow: 0 0 18px #22d3ee38;
}

.ui.primary.button:hover,
.ui.button.primary:hover,
button.primary:hover,
button[type="submit"]:hover {
  background: linear-gradient(135deg, #06b6d4, #0891b2) !important;
  box-shadow: 0 0 24px #22d3ee5c;
}

.ui.label,
.badge,
.repo-header .ui.label,
.repository .ui.label {
  background-color: #164e63 !important;
  border-color: #22d3ee80 !important;
}

.ui.menu .item:hover,
.ui.menu .active.item,
.ui.menu .item.active {
  background: #1d3540 !important;
}

.repo-header .flex-text-block .ui.button,
.repo-header .flex-text-block button,
.repo-header .flex-text-block .ui.buttons > .button,
.repo-button-row .ui.primary.button,
.repo-header .repo-button-row .ui.primary.button,
.repository .clone.button {
  background: #172832 !important;
  border-color: #22d3ee99 !important;
  color: #bff7ff !important;
  box-shadow: none !important;
}

.repo-header .flex-text-block .ui.button:hover,
.repo-header .flex-text-block button:hover,
.repo-header .flex-text-block .ui.buttons > .button:hover,
.repo-button-row .ui.primary.button:hover,
.repo-header .repo-button-row .ui.primary.button:hover,
.repository .clone.button:hover {
  background: #1d3540 !important;
  border-color: #67e8f9 !important;
  box-shadow: 0 0 18px #22d3ee42 !important;
}

/* Global header: compact graphite bar with a restrained cyan active state. */
.navbar,
.ui.navbar,
body > .ui.menu.navbar,
.ui.top.attached.menu,
.page-header {
  min-height: 3.5rem;
  background: #101a21 !important;
  border: 0 !important;
  border-bottom: 1px solid #22d3ee3d !important;
  border-radius: 0 !important;
  box-shadow: 0 8px 24px #00000052 !important;
}

.navbar .item,
.navbar .item > a,
.ui.navbar .item,
.ui.navbar .item > a,
.ui.top.attached.menu .item {
  color: #c9e7ed !important;
}

.navbar .item:hover,
.navbar .item.active,
.navbar .active.item,
.ui.navbar .item:hover,
.ui.navbar .active.item,
.ui.top.attached.menu .item:hover,
.ui.top.attached.menu .active.item {
  color: #ffffff !important;
  background: #172832 !important;
}

.navbar .ui.input input,
.navbar input,
.ui.navbar .ui.input input {
  min-height: 2.25rem;
  color: #effcff !important;
  background: #0e151b !important;
  border: 1px solid #3c5966 !important;
  border-radius: 999px !important;
}

.navbar .ui.input input:focus,
.navbar input:focus,
.ui.navbar .ui.input input:focus {
  border-color: #22d3ee !important;
  box-shadow: 0 0 0 3px #22d3ee29 !important;
}

.navbar .ui.dropdown,
.navbar .ui.dropdown .menu,
.ui.navbar .ui.dropdown,
.ui.navbar .ui.dropdown .menu {
  background: #121d25 !important;
  border-color: #3c5966 !important;
  border-radius: 12px !important;
}

.secondary-nav,
.secondary-nav > .ui.container,
.repo-header {
  background: #121d25 !important;
}

.repo-header {
  border-bottom: 1px solid #22d3ee29 !important;
  box-shadow: 0 8px 22px #00000038 !important;
}

.repo-header .ui.secondary.pointing.menu,
.repo-header overflow-menu {
  background: #121d25 !important;
}

.repo-header .ui.tabs.menu .active.item,
.repository .ui.tabs.menu .active.item,
.repo-header .ui.secondary.pointing.menu .active.item {
  color: #a5f3fc !important;
  border-bottom-color: #22d3ee !important;
}

/* Exact Gitea 1.27 navbar structure. */
#navbar {
  min-height: 3.75rem;
  padding: 0 1.25rem;
  background: #101a21 !important;
  border-bottom: 1px solid #22d3ee42 !important;
  box-shadow: 0 8px 24px #00000052 !important;
}

#navbar .navbar-left,
#navbar .navbar-right {
  gap: 0.25rem;
}

#navbar .navbar-left {
  min-width: 0;
}

#navbar .navbar-right {
  min-width: 0;
}

#navbar .item,
#navbar .item > a {
  min-height: 2.5rem;
  border-radius: 999px !important;
  color: #c9e7ed !important;
}

#navbar .item:hover,
#navbar .item.active,
#navbar .active.item {
  color: #ffffff !important;
  background: #1d3540 !important;
  box-shadow: inset 0 0 0 1px #22d3ee52;
}

#navbar-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  padding: 0 !important;
  background: #172832 !important;
  box-shadow: 0 0 14px #22d3ee24;
}

#navbar-logo img {
  width: 24px;
  height: 24px;
}

#navbar .navbar-avatar,
#navbar .navbar-avatar img {
  display: inline-flex;
  align-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

#navbar .navbar-avatar img {
  object-fit: cover;
  border: 1px solid #67e8f9aa;
}

/* The avatar is the only user glyph in the visible navbar; keep admin badge separate. */
#navbar .navbar-avatar + svg,
#navbar .navbar-avatar ~ .octicon-person {
  display: none !important;
}

#navbar .ui.dropdown.item > .text {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

#navbar .ui.dropdown .menu,
#navbar .user-menu {
  min-width: 13rem;
  padding: 0.4rem;
  background: #121d25 !important;
  border: 1px solid #3c5966 !important;
  border-radius: 14px !important;
  box-shadow: 0 16px 32px #00000073 !important;
}

#navbar .ui.dropdown .menu .item,
#navbar .user-menu .item {
  min-height: 2.2rem;
  border-radius: 10px !important;
}

/* Gitea uses a labelled wrapper for Watch, Star and Fork, not a button group. */
.repo-header .ui.labeled.button {
  display: inline-flex !important;
  align-items: stretch;
  overflow: hidden;
  padding: 0 !important;
  border: 1px solid #314b56 !important;
  border-radius: 999px !important;
  background: #172832 !important;
  box-shadow: none !important;
}

.repo-header .ui.labeled.button > .ui.button,
.repo-header .ui.labeled.button > .ui.label {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #b9d9df !important;
  box-shadow: none !important;
}

.repo-header .ui.labeled.button > .ui.button {
  padding: 0 0.8rem !important;
}

.repo-header .ui.labeled.button > .ui.label {
  padding: 0 0.65rem !important;
  border-left: 1px solid #314b56 !important;
  color: #9bcbd3 !important;
}

.repo-header .ui.labeled.button:hover,
.repo-header .ui.labeled.button:focus-within {
  border-color: #4c7a86 !important;
  background: #1b3039 !important;
  box-shadow: 0 0 12px #22d3ee24 !important;
}

.repo-header .ui.labeled.button:hover > .ui.button,
.repo-header .ui.labeled.button:hover > .ui.label {
  color: #e8fbff !important;
}

/* Use the real footer structure instead of styling only the outer element. */
.page-footer {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4rem;
  padding: 1rem clamp(1.25rem, 5vw, 4rem) !important;
  background: #0e151b !important;
  color: #d0e9ed !important;
  border-top: 1px solid #22d3ee38 !important;
}

.page-footer .left-links,
.page-footer .right-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.page-footer .left-links > *,
.page-footer .right-links > *,
.page-footer a,
.page-footer .flex-text-inline {
  color: #c5e1e5 !important;
}

.page-footer a:hover,
.page-footer .ui.dropdown:hover,
.page-footer .ui.dropdown.active {
  color: #a5f3fc !important;
}

.page-footer .ui.dropdown {
  border-radius: 999px !important;
  padding: 0.45rem 0.7rem;
}

.page-footer .ui.dropdown .menu {
  background: #121d25 !important;
  border: 1px solid #3c5966 !important;
  border-radius: 12px !important;
}

@media (max-width: 767px) {
  #navbar {
    min-height: 3.25rem;
    padding: 0 0.65rem;
  }

  .page-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* Contrast, spacing and component corrections. */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--color-body);
}

body {
  color: #f4f1ff;
}

a,
a:hover,
.ui.breadcrumb a,
.ui.breadcrumb .section {
  color: #8be9ff;
}

a:hover,
.ui.breadcrumb a:hover {
  color: #d5f9ff;
}

/* Activity feed, commit metadata and repository lists. */
.activity-feed,
.activity-feed .event,
.activity-feed .content,
.news,
.news .content,
.timeline-item,
.timeline-item .content,
.commit-list,
.commit-list .message {
  color: #eeeaff;
}

.activity-feed .muted,
.activity-feed .time,
.activity-feed .meta,
.activity-feed .text.grey,
.news .time,
.commit-list .time,
.commit-list .sha,
.commit-list .author,
.ui.sub.header,
.ui.grey.text,
.text.grey,
.muted {
  color: #bdb4d2 !important;
}

.activity-feed a,
.activity-feed .branch,
.activity-feed .ref,
.news a,
.commit-list a,
.commit-list .sha a {
  color: #a5f3fc !important;
}

.activity-feed a:hover,
.activity-feed .branch:hover,
.activity-feed .ref:hover,
.news a:hover,
.commit-list a:hover {
  color: #ffffff !important;
  text-shadow: 0 0 12px #22d3ee66;
}

/* Contribution heatmap: labels and empty cells must remain readable. */
.heatmap,
.contribution-graph,
.user-heatmap,
.activity-heatmap {
  color: #d9d2eb;
}

.heatmap text,
.contribution-graph text,
.user-heatmap text,
.heatmap .month,
.heatmap .weekday,
.heatmap .legend,
.heatmap .legend-label,
.contribution-graph .month,
.contribution-graph .weekday {
  fill: #d9d2eb !important;
  color: #d9d2eb !important;
}

.heatmap rect,
.contribution-graph rect {
  stroke: #ffffff12;
}

.heatmap rect:not([fill]),
.contribution-graph rect:not([fill]),
.heatmap .empty,
.contribution-graph .empty,
.heatmap .level-0,
.contribution-graph .level-0 {
  fill: #211c31 !important;
  background: #211c31 !important;
}

.heatmap .level-1,
.contribution-graph .level-1 {
  fill: #3b0764 !important;
  background: #3b0764 !important;
}

.heatmap .level-2,
.contribution-graph .level-2 {
  fill: #7e22ce !important;
  background: #7e22ce !important;
}

.heatmap .level-3,
.contribution-graph .level-3 {
  fill: #c026ff !important;
  background: #c026ff !important;
}

.heatmap .level-4,
.contribution-graph .level-4 {
  fill: #f0abfc !important;
  background: #f0abfc !important;
}

/* CI status icons and commit rows. */
.commit-status,
.commit-status-success,
.ci-status-success,
.octicon-check,
.octicon-check-circle,
.icon.green,
.text.green {
  color: #6ee7b7 !important;
  fill: #6ee7b7 !important;
  text-shadow: 0 0 10px #34d39966;
}

.commit-status-success,
.ci-status-success {
  border-color: #34d39999 !important;
  background-color: #064e3b !important;
}

.commit-list .message,
.commit-list .message a,
.activity-feed .commit-message {
  color: #f4f1ff !important;
}

/* Badges and language indicators. */
.ui.label,
.badge,
.repo-header .ui.label,
.repository .ui.label {
  color: #f8f5ff !important;
  background-color: #4c1d95 !important;
  border-color: #c084fc99 !important;
}

.ui.label.private,
.label.private,
.badge.private {
  color: #fff7ed !important;
  background-color: #9a3412 !important;
  border-color: #fb923c !important;
}

.language-bar,
.language-stat,
.repo-language-stats,
.repository .language {
  color: #f0abfc !important;
}

.language-bar .bar,
.language-stat .bar,
.repo-language-stats .bar {
  background: #c026ff !important;
  box-shadow: 0 0 12px #c026ff66;
}

/* Search fields and header controls. */
.ui.search input,
.searchbox input,
input[placeholder*="Search"],
input[placeholder*="search"] {
  color: #f4f1ff !important;
  background: #151426 !important;
  border-color: #4c3b66 !important;
}

.ui.search input::placeholder,
.searchbox input::placeholder,
input[placeholder*="Search"]::placeholder,
input[placeholder*="search"]::placeholder {
  color: #c1b8d4 !important;
  opacity: 1;
}

.ui.search .icon,
.searchbox .icon,
.ui.search i.icon {
  color: #8be9ff !important;
  opacity: 1;
}

.ui.menu .item,
.ui.menu .item > a,
.header .button,
.repo-header .button,
.repo-header .ui.button {
  transition: color 140ms ease, background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.ui.menu .item:hover,
.header .button:hover,
.repo-header .button:hover,
.repo-header .ui.button:hover {
  color: #ffffff !important;
  background: #c026ff24 !important;
  border-color: #c026ff99 !important;
  box-shadow: 0 0 16px #c026ff33;
}

/* Keep Code and repository actions consistent with the outline language. */
.repo-button-row .ui.primary.button,
.repo-header .repo-button-row .ui.primary.button,
.repository .clone.button {
  color: #e9d5ff !important;
  background: #c026ff18 !important;
  border: 1px solid #c026ff99 !important;
  box-shadow: none;
}

.repo-button-row .ui.primary.button:hover,
.repo-header .repo-button-row .ui.primary.button:hover,
.repository .clone.button:hover {
  color: #ffffff !important;
  background: #c026ff36 !important;
  box-shadow: 0 0 20px #c026ff4d;
}

/* Tabs and file tree should not leak active borders or use a foreign surface. */
.ui.tabs.menu .item,
.repository .ui.tabs.menu .item,
.repo-header .ui.tabs.menu .item {
  border-bottom: 2px solid transparent !important;
}

.ui.tabs.menu .active.item,
.repository .ui.tabs.menu .active.item,
.repo-header .ui.tabs.menu .active.item {
  border-bottom-color: #d946ef !important;
  box-shadow: none !important;
}

.file-tree,
.repository .file-tree,
.repository .file-list,
.file-list {
  background: var(--color-box-body) !important;
  border-color: #ffffff12 !important;
}

.file-tree .active,
.file-tree .selected,
.file-list .active,
.file-list .selected,
.repository .file-list .active {
  color: #ffffff !important;
  background: #4c1d95 !important;
  border-left: 2px solid #22d3ee !important;
}

/* Footer needs its own breathing room on wide and narrow screens. */
footer,
.page-footer,
.footer {
  width: 100%;
  box-sizing: border-box;
  padding: 1.25rem clamp(1rem, 4vw, 3rem) !important;
  color: #c9c2dc !important;
  background: var(--neon-surface-0) !important;
  border-top: 1px solid #c026ff2e;
}

footer a,
.page-footer a,
.footer a {
  color: #a5f3fc !important;
}

footer .ui.list .item,
.page-footer .ui.list .item,
.footer .ui.list .item {
  color: #c9c2dc !important;
}

@media (max-width: 767px) {
  footer,
  .page-footer,
  .footer {
    padding: 1rem !important;
  }
}

/* Final graphite/cyan pass. Keep these rules last so Gitea's generic theme rules cannot win. */
html,
body,
body > .full.height,
#app,
.page-content {
  background: #101c23 !important;
  background-image: none !important;
  color: #e3f4f6 !important;
}

#navbar,
#navbar .navbar-left,
#navbar .navbar-right,
.secondary-nav,
.secondary-nav > .ui.container,
.repo-header {
  background: #142630 !important;
}

#navbar {
  min-height: 3.75rem;
  border-bottom: 1px solid #4b8d99 !important;
  box-shadow: 0 8px 24px #071015 !important;
}

#navbar .item,
#navbar .item > a,
#navbar .ui.dropdown.item {
  border-radius: 999px !important;
  color: #cfecef !important;
}

#navbar .item:hover,
#navbar .item.active,
#navbar .active.item,
#navbar .ui.dropdown.item:hover {
  background: #21404b !important;
  color: #ffffff !important;
  box-shadow: inset 0 0 0 1px #67e8f966 !important;
}

#navbar .ui.dropdown .menu,
#navbar .user-menu {
  background: #172b35 !important;
  border: 1px solid #4b6973 !important;
  border-radius: 14px !important;
}

.ui.menu,
.ui.segment,
.ui.message,
.ui.card,
.ui.cards > .card,
.ui.table,
.ui.dropdown .menu,
.repo-header .ui.secondary.pointing.menu,
.repo-header overflow-menu {
  background-color: #142630 !important;
}

.ui.button,
.ui.buttons,
.ui.buttons > .button,
.repo-header .ui.labeled.button,
.repo-header .ui.labeled.button > .ui.button,
.repo-header .ui.labeled.button > .ui.label,
.repo-header .flex-text-block .ui.button,
.repo-header .flex-text-block button {
  border-radius: 999px !important;
}

.repo-header .ui.labeled.button {
  overflow: hidden;
  border: 1px solid #3c626c !important;
  background: #1a313c !important;
  box-shadow: none !important;
}

.repo-header .ui.labeled.button > .ui.button,
.repo-header .ui.labeled.button > .ui.label {
  background: transparent !important;
  border: 0 !important;
  color: #c5e1e5 !important;
  box-shadow: none !important;
}

.repo-header .ui.labeled.button > .ui.label {
  border-left: 1px solid #3c626c !important;
  color: #a5dce3 !important;
}

.repo-header .ui.labeled.button:hover,
.repo-header .ui.labeled.button:focus-within {
  border-color: #67e8f9 !important;
  background: #21404b !important;
  box-shadow: 0 0 14px #22d3ee2e !important;
}

.repo-header .ui.labeled.button:hover > .ui.button,
.repo-header .ui.labeled.button:hover > .ui.label {
  color: #ffffff !important;
}

.repo-header .ui.basic.button,
.repo-header .ui.basic.label {
  background: transparent !important;
}

.ui.primary.button,
.ui.button.primary,
button.primary,
button[type="submit"] {
  background: #0e7490 !important;
  border-color: #67e8f9 !important;
  box-shadow: 0 0 16px #22d3ee2e !important;
}

.ui.primary.button:hover,
.ui.button.primary:hover,
button.primary:hover,
button[type="submit"]:hover {
  background: #0891b2 !important;
  box-shadow: 0 0 20px #22d3ee4a !important;
}

.ui.label,
.badge,
.repo-header .ui.label,
.repository .ui.label {
  background: #164e63 !important;
  border-color: #5db8c4 !important;
  color: #e7fbff !important;
}

.page-footer,
footer,
.footer {
  background: #0d1920 !important;
  color: #d0e9ed !important;
  border-top: 1px solid #4b8d99 !important;
}

.page-footer .left-links > *,
.page-footer .right-links > *,
.page-footer a,
.page-footer .flex-text-inline,
footer a,
.footer a {
  color: #c5e1e5 !important;
}

.page-footer a:hover,
footer a:hover,
.footer a:hover {
  color: #a5f3fc !important;
}

/* Restrained motion layer. Animations are short and never replace a state color. */
@keyframes neon-header-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes neon-surface-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes neon-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 #22d3ee00;
  }
  50% {
    box-shadow: 0 0 0 4px #22d3ee1c;
  }
}

@keyframes neon-status-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.62;
  }
}

#navbar {
  animation: neon-header-in 320ms ease-out both;
}

.secondary-nav,
.repo-header,
.page-footer {
  animation: neon-surface-in 360ms ease-out 40ms both;
}

.ui.button,
.ui.buttons > .button,
#navbar .item,
.repo-header .ui.labeled.button,
.page-footer a,
.ui.dropdown {
  transition: transform 180ms ease, color 180ms ease, background-color 180ms ease,
    border-color 180ms ease, box-shadow 180ms ease;
}

.ui.button:hover,
.ui.buttons > .button:hover,
.repo-header .ui.labeled.button:hover,
.page-footer a:hover {
  transform: translateY(-2px);
}

.ui.button:active,
.ui.buttons > .button:active,
.repo-header .ui.labeled.button:active {
  transform: translateY(0) scale(0.97);
  transition-duration: 70ms;
}

#navbar .item:hover,
#navbar .ui.dropdown.item:hover {
  animation: neon-pulse 900ms ease-out;
}

.ui.primary.button:hover,
.ui.button.primary:hover,
button.primary:hover,
button[type="submit"]:hover {
  animation: neon-pulse 1.2s ease-in-out infinite;
}

.commit-status-success,
.ci-status-success {
  animation: neon-status-pulse 2.4s ease-in-out infinite;
}

/* Small stagger on activity entries, when the page provides an activity list. */
.activity-feed > :nth-child(1),
.news > :nth-child(1) { animation-delay: 40ms; }
.activity-feed > :nth-child(2),
.news > :nth-child(2) { animation-delay: 70ms; }
.activity-feed > :nth-child(3),
.news > :nth-child(3) { animation-delay: 100ms; }

/* Native scroll reveal for browsers supporting scroll-driven animations. */
@keyframes neon-scroll-reveal {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.985);
    filter: blur(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@supports (animation-timeline: view()) {
  html {
    scroll-behavior: smooth;
  }

  .activity-feed > *,
  .news > *,
  .ui.cards > .card,
  .repository .file-list > *,
  .repository .issue-list > *,
  .repository .timeline-item,
  .repository .ui.segment,
  .page-footer {
    animation-name: neon-scroll-reveal;
    animation-duration: 1ms;
    animation-timing-function: linear;
    animation-fill-mode: both;
    animation-timeline: view();
    animation-range: entry 0% cover 32%;
  }

  .activity-feed > *,
  .news > *,
  .repository .file-list > * {
    animation-range: entry 0% cover 24%;
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
