/*!
 * Forgejo theme: "Aurora" (dark)
 * -------------------------------------------------------------------------
 * A clean, modern dark theme: deep cool-slate surfaces, a calm indigo
 * accent, soft rounded corners, gentle shadows and a refined Inter type
 * stack. Designed to feel current without being noisy.
 *
 * Palette
 *   - Page background : deep slate        #0b0e16
 *   - Surfaces        : raised slate      #11151f / #161b27
 *   - Accent (primary): indigo            #818cf8  (hover #a5b4fc)
 *   - Links           : sky-indigo        #8ab4ff
 *   - Success         : emerald           #34d399
 *   - Danger          : coral red         #f87171
 *   - Warning / stars : amber             #fbbf24
 *   - Text            : #e6e9f2, muted    #9aa4b8
 *
 * Implementation note
 * -------------------------------------------------------------------------
 * Builds on Forgejo's built-in `forgejo-dark` theme via @import and overrides
 * only what's needed, so it survives Forgejo upgrades. All @import rules MUST
 * stay at the very top of the file (CSS spec). The font @import is optional —
 * remove it for air-gapped instances and Inter falls back to the system UI
 * font gracefully.
 * -------------------------------------------------------------------------
 */
@import url("./theme-forgejo-dark.css");
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  --is-dark-theme: true;

  /* ----- Aurora palette --------------------------------------------- */
  --aurora-bg: #0b0e16;            /* page background                   */
  --aurora-surface: #11151f;       /* cards / boxes                     */
  --aurora-surface-2: #161b27;     /* headers / nav / footer / code     */
  --aurora-surface-3: #1b2130;     /* raised / popovers                 */
  --aurora-hover: #1c2333;         /* hover surface                     */
  --aurora-active: #232c40;        /* active surface                    */
  --aurora-border: #232a3a;        /* subtle border                     */
  --aurora-border-strong: #303a52; /* emphasized border                 */
  --aurora-muted: #9aa4b8;         /* muted text                        */

  --aurora-accent: #818cf8;        /* indigo accent                     */
  --aurora-accent-bright: #a5b4fc; /* hover / emphasis                  */
  --aurora-link: #8ab4ff;          /* link blue                         */
  --aurora-link-bright: #b3d0ff;   /* link hover                        */
  --aurora-green: #34d399;
  --aurora-red: #f87171;
  --aurora-amber: #fbbf24;

  /* ----- Typography ------------------------------------------------- */
  --fonts-regular: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, var(--fonts-emoji);
  --fonts-monospace: "JetBrains Mono", "SFMono-Regular", "Cascadia Code", "Consolas", ui-monospace, monospace, var(--fonts-emoji);

  /* ----- Primary = indigo ------------------------------------------- */
  --color-primary: var(--aurora-accent);
  --color-primary-contrast: #0b0e16;
  --color-primary-dark-1: #6f7bf6;
  --color-primary-dark-2: #6366f1;
  --color-primary-dark-3: #5457e8;
  --color-primary-dark-4: #4f46e5;
  --color-primary-dark-5: #4338ca;
  --color-primary-dark-6: #3730a3;
  --color-primary-dark-7: #312e81;
  --color-primary-light-1: #939dfa;
  --color-primary-light-2: #a5b4fc;
  --color-primary-light-3: #b6c0fd;
  --color-primary-light-4: #c6cdfd;
  --color-primary-light-5: #d4dafe;
  --color-primary-light-6: #e1e5fe;
  --color-primary-light-7: #eef0fe;
  --color-primary-alpha-10: rgba(129, 140, 248, 0.10);
  --color-primary-alpha-20: rgba(129, 140, 248, 0.20);
  --color-primary-alpha-30: rgba(129, 140, 248, 0.30);
  --color-primary-alpha-40: rgba(129, 140, 248, 0.40);
  --color-primary-alpha-50: rgba(129, 140, 248, 0.50);
  --color-primary-alpha-60: rgba(129, 140, 248, 0.60);
  --color-primary-alpha-70: rgba(129, 140, 248, 0.70);
  --color-primary-alpha-80: rgba(129, 140, 248, 0.80);
  --color-primary-alpha-90: rgba(129, 140, 248, 0.90);
  --color-primary-alpha-100: var(--aurora-accent);

  /* ----- Secondary = slate chrome ----------------------------------- */
  --color-secondary: #2a3346;
  --color-secondary-dark-1: #323d54;
  --color-secondary-dark-2: #3a4662;
  --color-secondary-dark-3: #424f70;
  --color-secondary-dark-4: #4a587e;
  --color-secondary-dark-5: #52618c;
  --color-secondary-dark-6: #5a6a9a;
  --color-secondary-dark-7: #6273a8;
  --color-secondary-light-1: #222a3a;
  --color-secondary-light-2: #1a212e;
  --color-secondary-alpha-30: rgba(42, 51, 70, 0.30);
  --color-secondary-alpha-40: rgba(42, 51, 70, 0.40);
  --color-secondary-alpha-50: rgba(42, 51, 70, 0.50);
  --color-secondary-alpha-60: rgba(42, 51, 70, 0.60);
  --color-secondary-alpha-70: rgba(42, 51, 70, 0.70);
  --color-secondary-alpha-80: rgba(42, 51, 70, 0.80);
  --color-secondary-alpha-90: rgba(42, 51, 70, 0.90);
  --color-secondary-alpha-100: #2a3346;

  /* Accent (badges / stars / highlights) */
  --color-accent: var(--aurora-accent);
  --color-small-accent: rgba(129, 140, 248, 0.16);

  /* ----- Page & surfaces -------------------------------------------- */
  --color-body: var(--aurora-bg);
  --color-box-header: var(--aurora-surface-2);
  --color-box-body: var(--aurora-surface);
  --color-box-body-highlight: #141a26;
  --color-nav-bg: var(--aurora-surface-2);
  --color-nav-hover-bg: var(--aurora-hover);
  --color-navbar: var(--aurora-surface-2);
  --color-footer: var(--aurora-surface-2);
  --color-header-wrapper: var(--aurora-surface-2);
  --color-light: #141a26;
  --color-light-mimic-enabled: rgba(255, 255, 255, 0.03);
  --color-light-border: var(--aurora-border);
  --color-hover: var(--aurora-hover);
  --color-active: var(--aurora-active);
  --color-menu: var(--aurora-surface);
  --color-card: var(--aurora-surface);
  --color-markup-table-row: rgba(255, 255, 255, 0.02);
  --color-markup-code-block: var(--aurora-surface-2);
  --color-button: var(--aurora-surface-2);
  --color-code-bg: var(--aurora-surface-2);
  --color-code-sidebar-bg: #0e131d;
  --color-shadow: rgba(0, 0, 0, 0.55);
  --color-secondary-bg: var(--aurora-surface);
  --color-expand-button: var(--aurora-hover);
  --color-reaction-bg: rgba(129, 140, 248, 0.10);
  --color-reaction-active-bg: var(--color-primary-alpha-30);
  --color-tooltip-bg: #1b2130;
  --color-tooltip-text: #e6e9f2;

  /* ----- Borders ---------------------------------------------------- */
  --color-border: var(--aurora-border);

  /* ----- Inputs ----------------------------------------------------- */
  --color-input-text: #e6e9f2;
  --color-input-background: var(--aurora-surface-2);
  --color-input-border: var(--aurora-border-strong);
  --color-input-border-hover: var(--aurora-accent);
  --color-input-toggle-background: #2a3346;

  /* ----- Text ------------------------------------------------------- */
  --color-text: #e6e9f2;
  --color-text-light: #c7cddb;
  --color-text-light-1: var(--aurora-muted);
  --color-text-light-2: #828ca1;
  --color-text-light-3: #6a7488;
  --color-text-dark: #ffffff;
  --color-text-focus: var(--aurora-accent-bright);

  /* ----- Links ------------------------------------------------------ */
  --color-link: var(--aurora-link);
  --color-link-hover: var(--aurora-link-bright);

  --color-caret: var(--aurora-accent);

  /* ----- Semantic states -------------------------------------------- */
  --color-green: var(--aurora-green);
  --color-success-text: var(--aurora-green);
  --color-success-bg: rgba(52, 211, 153, 0.12);
  --color-success-border: rgba(52, 211, 153, 0.40);
  --color-red: var(--aurora-red);
  --color-error-text: var(--aurora-red);
  --color-error-bg: rgba(248, 113, 113, 0.12);
  --color-error-border: rgba(248, 113, 113, 0.40);
  --color-gold: var(--aurora-amber);
  --color-yellow: var(--aurora-amber);
  --color-orange: #fb923c;

  --color-edit-area: var(--aurora-surface);
  --color-diff-added-row-bg: rgba(52, 211, 153, 0.08);
  --color-diff-added-word-bg: rgba(52, 211, 153, 0.30);
  --color-diff-removed-row-bg: rgba(248, 113, 113, 0.08);
  --color-diff-removed-word-bg: rgba(248, 113, 113, 0.30);
}

/* =====================================================================
 * Modern finishing touches
 * ===================================================================== */

/* Softer, rounder corners across the common chrome */
.ui.segment,
.ui.attached.segment,
.ui.card,
.repository .ui.segment,
.ui.menu,
.ui.attached.header,
.ui.attached.menu,
.ui.box,
.ui.repository.list .item,
.flex-item,
.issue.list > .item,
.ui.comments .comment .content .text,
.ui.dropdown .menu,
.tippy-box,
#navbar .dropdown .menu {
  border-radius: 10px;
}

/* Buttons: rounded with a subtle lift */
.ui.button {
  border-radius: 8px;
  font-weight: 500;
  transition: background-color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease, transform 0.04s ease;
}
.ui.button:active {
  transform: translateY(1px);
}

/* Primary buttons: solid indigo, lighter on hover, soft glow */
.ui.primary.button,
.ui.primary.buttons .button {
  background: var(--aurora-accent);
  border-color: var(--aurora-accent);
  color: #0b0e16;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.ui.primary.button:hover,
.ui.primary.buttons .button:hover {
  background: var(--aurora-accent-bright);
  border-color: var(--aurora-accent-bright);
  color: #0b0e16;
  box-shadow: 0 2px 10px rgba(129, 140, 248, 0.35);
}

/* Inputs: rounded with an indigo focus ring */
.ui.input > input,
.ui.form input:not([type]),
.ui.form input[type="text"],
.ui.form input[type="email"],
.ui.form input[type="password"],
.ui.form input[type="search"],
.ui.form input[type="number"],
.ui.form input[type="url"],
.ui.form textarea,
.ui.selection.dropdown {
  border-radius: 8px;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.ui.input > input:focus,
.ui.form input:focus,
.ui.form textarea:focus,
.ui.selection.dropdown:focus,
.ui.selection.active.dropdown {
  border-color: var(--aurora-accent);
  box-shadow: 0 0 0 3px var(--color-primary-alpha-20);
}

/* Cards / boxes: gentle elevation */
.ui.card,
.repository.new.repo .ui.form,
.dashboard .ui.segment {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35), 0 1px 1px rgba(0, 0, 0, 0.2);
}

/* Top navbar: hairline border + faint depth */
.full.height > .following.bar,
#navbar,
nav.navbar {
  border-bottom: 1px solid var(--aurora-border) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02);
}

/* Active menu / tab item: indigo underline */
.ui.menu .active.item,
.ui.tabular.menu .active.item,
.ui.secondary.pointing.menu .active.item {
  border-color: var(--aurora-accent) !important;
  color: var(--aurora-accent-bright) !important;
}

/* Stars / featured icons -> amber */
.octicon-star,
.svg.octicon-star,
.octicon-star-fill,
.svg.octicon-star-fill {
  color: var(--aurora-amber) !important;
}

/* Labels / badges: a touch rounder */
.ui.label,
.ui.basic.label {
  border-radius: 6px;
}

/* Text selection */
::selection {
  background: var(--color-primary-alpha-40);
  color: #ffffff;
}

/* Keyboard focus ring for accessibility */
a:focus-visible,
button:focus-visible,
.ui.button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--aurora-accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Slim, modern scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--aurora-border-strong) transparent;
}
::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}
::-webkit-scrollbar-thumb {
  background: var(--aurora-border-strong);
  border: 3px solid transparent;
  border-radius: 999px;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
  background: #3d496a;
  border: 3px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-track {
  background: transparent;
}
