/* ============================================================================
   GITEA THEME - Clean & Modern
   Primary: #D85555 (Soft Red)
   Accent: #61789C (Slate Blue)
   ============================================================================ */

:root {
  /* Dark Theme */
  --is-dark-theme: true;

  /* ========== BACKGROUND COLORS ========== */
  --color-body: #1a1f2e;
  --color-navbar: #141820;
  --color-nav-bg: #141820;
  --color-nav-hover-bg: #1e2432;
  --color-navbar-transparent: #141820;
  --color-header-bar: #1e2432;
  --color-box-header: #1e2432;
  --color-box-body: #232d3f;
  --color-box-body-highlight: #1f2938;
  --color-button: #1e2432;
  --color-card: #1e2432;
  --color-menu: #1e2432;
  --color-input-background: #1a1f2e;
  --color-input-toggle-background: #232d3f;
  --color-code-bg: #1a1f2e;
  --color-code-sidebar-bg: #1e2432;
  --color-markup-code-block: #1a1f2e;
  --color-project-board-bg: #1a1f2e;
  --color-editor-line-highlight: #232d3f;
  --color-active-line: #232d3f;
  --color-secondary-bg: #1e2432;
  --color-light: #1e2432;
  --color-footer: #232d3f;
  --color-timeline: #232d3f;
  --color-label-bg: #232d3f;
  --color-label-active-bg: #232d3f;
  --color-markup-table-row: #1e2432;

  /* ========== TEXT COLORS ========== */
  --color-text: #d0d5e1;
  --color-text-dark: #D85555;
  --color-text-hover: rgba(208, 213, 225, 0.8);
  --color-text-light: #61789C;
  --color-text-light-1: #7a8db5;
  --color-text-light-2: #D85555;
  --color-text-light-3: #7a8db5;
  --color-placeholder-text: #6f7a92;
  --color-text-focus: #fff;
  --color-input-text: #d0d5e1;
  --color-label-text: #61789C;

  /* ========== PRIMARY COLOR (#D85555 - Soft Red) ========== */
  /* Updated primary red from #FA4454 to #D85555 for softer appearance */
  --color-primary: #D85555;
  --color-primary-contrast: #1a1f2e;
  --color-primary-dark-1: #D85555;
  --color-primary-dark-2: #e06b6b;
  --color-primary-dark-3: #e88181;
  --color-primary-dark-4: #f09797;
  --color-primary-dark-5: #f5adad;
  --color-primary-dark-6: #f8c3c3;
  --color-primary-dark-7: #fad9d9;
  --color-primary-light-1: #D85555;
  --color-primary-light-2: #c64646;
  --color-primary-light-3: #b43737;
  --color-primary-light-4: #a22828;
  --color-primary-light-5: #901919;
  --color-primary-light-6: #7e0a0a;
  --color-primary-light-7: #6c0000;
  --color-primary-alpha-10: rgba(216, 85, 85, 0.1);
  --color-primary-alpha-20: rgba(216, 85, 85, 0.2);
  --color-primary-alpha-30: rgba(216, 85, 85, 0.3);
  --color-primary-alpha-40: rgba(216, 85, 85, 0.4);
  --color-primary-alpha-50: rgba(216, 85, 85, 0.5);
  --color-primary-alpha-60: rgba(216, 85, 85, 0.6);
  --color-primary-alpha-70: rgba(216, 85, 85, 0.7);
  --color-primary-alpha-80: rgba(216, 85, 85, 0.8);
  --color-primary-alpha-90: rgba(216, 85, 85, 0.9);

  /* ========== SECONDARY COLOR (#61789C) ========== */
  --color-secondary: #232d3f;
  --color-secondary-dark-1: #232d3f;
  --color-secondary-dark-2: #2d374a;
  --color-secondary-dark-3: #374155;
  --color-secondary-dark-4: #414b60;
  --color-secondary-dark-5: #4b556b;
  --color-secondary-dark-6: #555f76;
  --color-secondary-dark-7: #5f6981;
  --color-secondary-dark-8: #69738c;
  --color-secondary-dark-9: #737d97;
  --color-secondary-dark-10: #7d87a2;
  --color-secondary-dark-11: #8791ad;
  --color-secondary-dark-12: #919bb8;
  --color-secondary-dark-13: #9ba5c3;
  --color-secondary-light-1: #232d3f;
  --color-secondary-light-2: #1f2938;
  --color-secondary-light-3: #1a1f2e;
  --color-secondary-light-4: #161b28;
  --color-secondary-alpha-10: rgba(35, 45, 63, 0.1);
  --color-secondary-alpha-20: rgba(35, 45, 63, 0.2);
  --color-secondary-alpha-30: rgba(35, 45, 63, 0.3);
  --color-secondary-alpha-40: rgba(35, 45, 63, 0.4);
  --color-secondary-alpha-50: rgba(35, 45, 63, 0.5);
  --color-secondary-alpha-60: rgba(35, 45, 63, 0.6);
  --color-secondary-alpha-70: rgba(35, 45, 63, 0.7);
  --color-secondary-alpha-80: rgba(35, 45, 63, 0.8);
  --color-secondary-alpha-90: rgba(35, 45, 63, 0.9);

  /* ========== SEMANTIC COLORS ========== */
  /* Updated red from #FA4454 to #D85555 */
  --color-red: #D85555;
  --color-red-light: #D85555;
  --color-orange: #f5a623;
  --color-orange-light: #f5a623;
  --color-yellow: #ffc107;
  --color-yellow-light: #ffc107;
  --color-green: #4caf50;
  --color-green-light: #4caf50;
  --color-teal: #61789C;
  --color-teal-light: #61789C;
  --color-blue: #61789C;
  --color-blue-light: #61789C;
  --color-violet: #9c27b0;
  --color-violet-light: #9c27b0;
  --color-purple: #9c27b0;
  --color-purple-light: #9c27b0;
  --color-pink: #e91e63;
  --color-pink-light: #e91e63;
  --color-brown: #795548;
  --color-brown-light: #795548;
  --color-grey: #7a8db5;
  --color-grey-light: #7a8db5;
  --color-black: #1a1f2e;
  --color-gold: #f5a623;
  --color-white: #d0d5e1;

  /* ========== STATUS COLORS ========== */
  /* Updated error color to softer red */
  --color-error-bg: #3d1f1f;
  --color-error-border: #D85555;
  --color-error-text: #D85555;
  --color-success-bg: #1f3d1f;
  --color-success-border: #4caf50;
  --color-success-text: #4caf50;
  --color-warning-bg: #3d3d1f;
  --color-warning-border: #f5a623;
  --color-warning-text: #f5a623;
  --color-info-bg: #1f2d3d;
  --color-info-border: #61789C;
  --color-info-text: #61789C;

  /* ========== DIFF COLORS ========== */
  /* Updated diff removed color to softer red */
  --color-diff-removed-bg: #3d1f1f;
  --color-diff-removed-word-bg: #6b3333;
  --color-diff-removed-row-bg: #3d1f1f;
  --color-diff-removed-row-border: #D85555;
  --color-diff-added-bg: #1f3d1f;
  --color-diff-added-word-bg: #336b33;
  --color-diff-added-row-bg: #1f3d1f;
  --color-diff-added-row-border: #4caf50;
  --color-diff-moved-bg: #1f2d3d;
  --color-diff-moved-row-bg: #1f2d3d;
  --color-diff-moved-row-border: #61789C;
  --color-diff-inactive: #1a1f2e;

  /* ========== BORDERS & INPUTS ========== */
  --color-input-border: #2d374a;
  --color-input-border-hover: #374155;
  --color-light-border: #232d3f;
  --color-hover: rgba(97, 120, 156, 0.3);
  --color-active: rgba(97, 120, 156, 0.3);
  --color-light-mimic-enabled: rgba(0, 0, 0, calc(40 / 255 * 222 / 255 / var(--opacity-disabled)));

  /* ========== MISC ========== */
  --color-accent: #61789C;
  --color-small-accent: #7a8db5;
  --color-shadow: #00000060;
  --color-caret: var(--color-text);
  --color-reaction-bg: rgba(216, 85, 85, 0.1);
  --color-reaction-active-bg: rgba(216, 85, 85, 0.3);
  --color-tooltip-bg: var(--color-secondary);
  --color-expand-button: #1f2938;
  --color-project-board-light-label: #61789C;

  accent-color: var(--color-accent);
  color-scheme: dark;
}

/* ========== SCROLLBAR STYLING ========== */
/* Updated scrollbar color to softer red */
* {
  scrollbar-color: #D85555 transparent !important;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  box-shadow: inset 0 0 0 6px #D85555 !important;
  border: 2px solid transparent;
  border-radius: 5px !important;
}

::-webkit-scrollbar-thumb:window-inactive {
  box-shadow: inset 0 0 0 6px #D85555 !important;
}

::-webkit-scrollbar-thumb:hover {
  box-shadow: inset 0 0 0 6px #e06b6b !important;
}

::-webkit-scrollbar-corner {
  background: transparent;
}

/* ========== CODE SYNTAX HIGHLIGHTING ========== */
.chroma .nx {
  color: #d0d5e1;
}

.chroma .c,
.chroma .c1,
.chroma .ch,
.chroma .cm,
.chroma .sd {
  color: #6f7a92;
}

.chroma .k,
.chroma .kc,
.chroma .kd,
.chroma .kn,
.chroma .kp,
.chroma .kr {
  color: #D85555;
}

.chroma .o,
.chroma .ow {
  color: #61789C;
}

.chroma .s,
.chroma .s1,
.chroma .s2,
.chroma .sa,
.chroma .sb,
.chroma .sc,
.chroma .sh,
.chroma .si,
.chroma .sr,
.chroma .ss,
.chroma .sx,
.chroma .nt,
.chroma .cpf {
  color: #4caf50;
}

.chroma .m,
.chroma .mb,
.chroma .mf,
.chroma .mh,
.chroma .mi,
.chroma .mo,
.chroma .ml {
  color: #f5a623;
}

.chroma .kt,
.chroma .nc,
.chroma .nn,
.chroma .nv {
  color: #9c27b0;
}

.chroma .nf,
.chroma .nb,
.chroma .na {
  color: #61789C;
}

.chroma .bp,
.chroma .cp,
.chroma .ne,
.chroma .nd,
.chroma .se {
  color: #ffc107;
}

/* ========== UI BUTTONS ========== */
.ui.primary.button,
.ui.primary.buttons .button {
  background: #61789C;
  background-color: #61789C !important;
  color: #fff !important;
}

.ui.primary.button:hover,
.ui.primary.buttons .button:hover {
  background: #7a8db5;
  background-color: #7a8db5 !important;
  color: #fff !important;
}

.ui.grey.labels .label,
.ui.grey.label,
.ui.grey.button,
.ui.grey.buttons .button {
  color: #1a1f2e;
  background-color: #61789C;
  border-color: #61789C;
}

.ui.grey.labels .label:hover,
.ui.grey.label:hover,
.ui.grey.button:hover,
.ui.grey.buttons .button:hover {
  color: #1a1f2e;
  background-color: #7a8db5;
  border-color: #7a8db5;
}

.ui.green.buttons .button,
.ui.green.button {
  background: #4caf50;
  background-color: #4caf50;
  color: #1a1f2e;
}

.ui.green.buttons .button:hover,
.ui.green.button:hover {
  background: #66bb6a;
  background-color: #66bb6a;
  color: #1a1f2e;
}

.ui.red.labels .label,
.ui.red.label,
.ui.red.button,
.ui.red.buttons .button {
  background: #D85555;
  background-color: #D85555;
  color: #1a1f2e;
}

.ui.red.labels .label:hover,
.ui.red.label:hover,
.ui.red.button:hover,
.ui.red.buttons .button:hover {
  background: #e06b6b;
  background-color: #e06b6b;
  color: #1a1f2e;
}

.ui.orange.labels .label,
.ui.orange.label,
.ui.orange.button,
.ui.orange.buttons .button {
  background: #f5a623;
  background-color: #f5a623;
  color: #1a1f2e;
}

.ui.orange.labels .label:hover,
.ui.orange.label:hover,
.ui.orange.button:hover,
.ui.orange.buttons .button:hover {
  background: #f8b840;
  background-color: #f8b840;
  color: #1a1f2e;
}

.ui.basic.labels .label,
.ui.basic.label {
  color: #61789C;
}

.ui.basic.buttons .button,
.ui.basic.button {
  color: #D85555;
}

.ui.basic.buttons .button:hover,
.ui.basic.button:hover {
  color: #e06b6b;
}

/* ========== LABELS & REPO TITLE ========== */
.repo-title {
  color: #D85555;
}

.repo-buttons button[disabled] ~ .label,
.repo-buttons .ui.labeled.button.disabled > .label {
  color: #61789C;
}

.ui.primary.labels .label,
.ui.primary.label {
  color: #1a1f2e;
}

.ui.green.labels .label,
.ui.green.label {
  color: #1a1f2e;
}

/* ========== MENU & NAVIGATION ========== */
.repository .ui.segment.sub-menu .list .item a:hover,
.ui.tabular.menu .item:hover {
  color: var(--color-text-hover);
}

/* ========== ICONS ========== */
i.grey.icon.icon.icon.icon {
  color: #6f7a92;
}

/* ========== LINKS & MISC ========== */
.ui.labels a.label,
a.ui.label {
  background-color: #1e2432;
}

.ui.labels a.label:hover,
a.ui.label:hover {
  background-color: #232d3f;
}
