/* ============================================
   Forgejo theme — Swamp Club
   Modeled after ~/git/swamp-club's HUD/cyberpunk aesthetic:
     - neon green #39ff14 primary
     - cyan #22d3ee links / accents
     - magenta #ff00ff sparingly for danger/highlights
     - deep black surfaces, low-contrast greys for text hierarchy
     - Chakra Petch (UI) + JetBrains Mono (code)
   Install: drop at $GITEA_CUSTOM/public/assets/css/theme-swamp-club.css
   Register: add `swamp-club` to [ui] THEMES in app.ini.
   ============================================ */

@import url("https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap");

:root {
  color-scheme: dark;
  accent-color: #39ff14;

  /* --- Primary (neon green) --- */
  --color-primary: #39ff14;
  --color-primary-contrast: #0a0a0a;
  --color-primary-dark-1: #2cd610;
  --color-primary-dark-2: #21aa0c;
  --color-primary-dark-3: #167a08;
  --color-primary-dark-4: #0d4f05;
  --color-primary-dark-5: #073402;
  --color-primary-dark-6: #042001;
  --color-primary-dark-7: #021300;
  --color-primary-light-1: #5cff42;
  --color-primary-light-2: #84ff70;
  --color-primary-light-3: #a3ff96;
  --color-primary-light-4: #c0ffb8;
  --color-primary-light-5: #ddffd8;
  --color-primary-light-6: #eaffe7;
  --color-primary-light-7: #f5fff3;
  --color-primary-alpha-10: rgba(57, 255, 20, 0.10);
  --color-primary-alpha-20: rgba(57, 255, 20, 0.20);
  --color-primary-alpha-30: rgba(57, 255, 20, 0.30);
  --color-primary-alpha-40: rgba(57, 255, 20, 0.40);
  --color-primary-alpha-50: rgba(57, 255, 20, 0.50);
  --color-primary-alpha-60: rgba(57, 255, 20, 0.60);
  --color-primary-alpha-70: rgba(57, 255, 20, 0.70);
  --color-primary-alpha-80: rgba(57, 255, 20, 0.80);
  --color-primary-alpha-90: rgba(57, 255, 20, 0.90);

  /* --- Secondary (cyan) --- */
  --color-secondary: #22d3ee;
  --color-secondary-dark-1: #1dbdd3;
  --color-secondary-dark-2: #18a4b6;
  --color-secondary-dark-3: #138a99;
  --color-secondary-dark-4: #0f6c78;
  --color-secondary-dark-5: #0b4f57;
  --color-secondary-dark-6: #073238;
  --color-secondary-dark-7: #041d20;
  --color-secondary-light-1: #44dcf0;
  --color-secondary-light-2: #67e8f9;
  --color-secondary-light-3: #8ff0fb;
  --color-secondary-light-4: #b3f5fc;
  --color-secondary-button: #22d3ee;
  --color-secondary-hover: #44dcf0;
  --color-secondary-active: #67e8f9;

  /* --- Status semantics --- */
  --color-red: #ff4d4d;
  --color-red-dark-1: #e63a3a;
  --color-red-dark-2: #c52727;
  --color-red-light-1: #ff6e6e;
  --color-red-light-2: #ff9090;
  --color-orange: #ff9100;
  --color-orange-dark-1: #e67e00;
  --color-orange-light-1: #ffa733;
  --color-yellow: #facc15;
  --color-yellow-dark-1: #e6b800;
  --color-olive: #b5cc18;
  --color-green: #39ff14;
  --color-green-dark-1: #2cd610;
  --color-green-light-1: #5cff42;
  --color-teal: #14b8a6;
  --color-blue: #22d3ee;
  --color-blue-dark-1: #1dbdd3;
  --color-blue-light-1: #44dcf0;
  --color-violet: #a78bfa;
  --color-purple: #c084fc;
  --color-pink: #ff00ff;
  --color-brown: #a0522d;
  --color-black: #050505;

  --color-red-badge: #ff4d4d;
  --color-red-badge-bg: rgba(255, 77, 77, 0.12);
  --color-red-badge-hover-bg: rgba(255, 77, 77, 0.22);
  --color-green-badge: #39ff14;
  --color-green-badge-bg: rgba(57, 255, 20, 0.12);
  --color-green-badge-hover-bg: rgba(57, 255, 20, 0.22);
  --color-yellow-badge: #facc15;
  --color-yellow-badge-bg: rgba(250, 204, 21, 0.12);
  --color-yellow-badge-hover-bg: rgba(250, 204, 21, 0.22);
  --color-orange-badge: #ff9100;
  --color-orange-badge-bg: rgba(255, 145, 0, 0.12);
  --color-orange-badge-hover-bg: rgba(255, 145, 0, 0.22);

  /* --- Surfaces / body --- */
  --color-body: #050505;
  --color-box-body: #0c0c0c;
  --color-box-body-highlight: #141414;
  --color-box-header: #0f0f0f;
  --color-box-header-text: #d1d5db;
  --color-text: #d1d5db;
  --color-text-light: #b6bcc6;
  --color-text-light-1: #9ca3af;
  --color-text-light-2: #6b7280;
  --color-text-light-3: #4b5563;
  --color-footer: #050505;
  --color-timeline: #1f1f1f;

  /* --- Light/dark mimic borders --- */
  --color-light: rgba(255, 255, 255, 0.04);
  --color-light-mimic-enabled: rgba(255, 255, 255, 0.06);
  --color-light-border: rgba(255, 255, 255, 0.08);
  --color-hover: rgba(57, 255, 20, 0.07);
  --color-active: rgba(57, 255, 20, 0.12);
  --color-menu: #0c0c0c;
  --color-card: #0c0c0c;

  /* --- Borders --- */
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-secondary: rgba(255, 255, 255, 0.05);
  --color-secondary-button: #22d3ee;
  --color-secondary-button-bg: rgba(34, 211, 238, 0.08);

  /* --- Navigation --- */
  --color-nav-bg: #050505;
  --color-nav-hover-bg: rgba(57, 255, 20, 0.08);
  --color-nav-text: #d1d5db;
  --color-header-wrapper: #050505;
  --color-header-wrapper-transparent: rgba(5, 5, 5, 0.85);

  /* --- Links --- */
  --color-link: #22d3ee;
  --color-link-hover: #67e8f9;
  --color-link-active: #4ade80;

  /* --- Inputs --- */
  --color-input-background: #0a0a0a;
  --color-input-border: rgba(255, 255, 255, 0.12);
  --color-input-border-hover: #39ff14;
  --color-input-text: #d1d5db;
  --color-input-toggle-background: #1a1a1a;
  --color-placeholder-text: #6b7280;

  /* --- Buttons --- */
  --color-button: #0c0c0c;
  --color-button-hover: #141414;
  --color-button-active: #1a1a1a;

  /* --- Diff --- */
  --color-diff-added-row-bg: rgba(57, 255, 20, 0.06);
  --color-diff-added-row-border: rgba(57, 255, 20, 0.30);
  --color-diff-added-word-bg: rgba(57, 255, 20, 0.25);
  --color-diff-added-word-border: rgba(57, 255, 20, 0.60);
  --color-diff-removed-row-bg: rgba(255, 0, 255, 0.06);
  --color-diff-removed-row-border: rgba(255, 0, 255, 0.30);
  --color-diff-removed-word-bg: rgba(255, 0, 255, 0.25);
  --color-diff-removed-word-border: rgba(255, 0, 255, 0.60);
  --color-diff-moved-row-bg: rgba(34, 211, 238, 0.06);
  --color-diff-moved-row-border: rgba(34, 211, 238, 0.30);

  /* --- Code --- */
  --color-markup-code-block: rgba(34, 211, 238, 0.08);
  --color-markup-table-row: rgba(255, 255, 255, 0.02);
  --color-markup-table-row-alt: rgba(255, 255, 255, 0.04);
  --color-code-bg: #0a0a0a;
  --color-code-sidebar-bg: #0c0c0c;

  /* --- Misc --- */
  --color-shadow: rgba(0, 0, 0, 0.6);
  --color-secondary-bg: #0a0a0a;
  --color-expand-button: rgba(57, 255, 20, 0.10);
  --color-reaction-bg: rgba(57, 255, 20, 0.08);
  --color-reaction-active-bg: rgba(57, 255, 20, 0.25);

  /* --- Fonts --- */
  --fonts-proportional:
    "Chakra Petch", -apple-system, "Segoe UI", system-ui, sans-serif;
  --fonts-monospace:
    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco,
    Consolas, "Liberation Mono", "Courier New", monospace;
  --fonts-emoji:
    "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji",
    "Twemoji Mozilla";
  --fonts-regular: var(--fonts-proportional);
}

/* Headings — touch of HUD without being shouty */
h1, h2, h3, h4, h5, h6,
.ui.header,
.repository .header,
.repo-button-row {
  font-family: var(--fonts-proportional);
  letter-spacing: 0.01em;
}

/* Repo / org / user names get a subtle neon lift */
.repo-title,
.repository .ui.header .name,
.ui.repository.list .item .header {
  color: #4ade80;
}

/* Code blocks — slight cyan tint border to echo swamp-club's inline code */
.markup pre,
.markup code,
.file-view pre {
  border: 1px solid rgba(34, 211, 238, 0.12);
}

/* Inline code in markdown */
.markup :not(pre) > code {
  background-color: rgba(34, 211, 238, 0.08);
  color: #22d3ee;
  border: 1px solid rgba(34, 211, 238, 0.18);
  padding: 1px 5px;
  border-radius: 3px;
}

/* Form autofill — keep the neon */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #0a0a0a inset !important;
  -webkit-text-fill-color: #39ff14 !important;
  caret-color: #39ff14 !important;
}

/* Selection highlight */
::selection {
  background: rgba(57, 255, 20, 0.35);
  color: #ffffff;
}

/* Scrollbars — green-tinted, swamp-club style */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(57, 255, 20, 0.25) transparent;
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(57, 255, 20, 0.25);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(57, 255, 20, 0.45); }

/* Focus ring — visible against dark surfaces */
*:focus-visible {
  outline: 2px solid rgba(57, 255, 20, 0.6);
  outline-offset: 2px;
}

/* Primary action buttons — keep the contrast that swamp-club uses */
.ui.primary.button,
.ui.primary.buttons .button {
  background: #39ff14;
  color: #050505;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.ui.primary.button:hover,
.ui.primary.buttons .button:hover {
  background: #5cff42;
  color: #050505;
  box-shadow: 0 0 12px rgba(57, 255, 20, 0.35);
}

/* Tertiary text-style buttons */
.ui.basic.button,
.ui.basic.buttons .button {
  color: #d1d5db;
}

/* Repo nav active tab — green underline */
.repository .navigation-bar .item.active,
.ui.tabular.menu .active.item {
  border-color: #39ff14 !important;
  color: #4ade80 !important;
}

/* Reduced motion respect (no animations here yet, but future-proof) */
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
