/* agarfunny: the themes, the one place colors are defined. The page reads them as variables (style.css uses nothing
   else), the arena's canvas reads them through theme.js, and brand/build.py reads each theme's ground to make the
   icons and social images.

   A theme is a block with the same core variables:
     --bg --surface --surface-2 --input      the page, its panels, raised parts, fields
     --line --line-strong                    hairlines and stronger edges
     --text --muted                          words and their quieter kind
     --primary --secondary --tertiary        you and the one action that matters; frames and ranks; focus and accents
     --on-primary                            words on a primary fill
     --brand-symbol --brand-wordmark         the logo in this theme's colors
   The rest is derived below and may be set by a theme.

   To add a theme: its two source images in brand/source (symbol-NAME.png, wordmark-NAME.png), a block here, its name
   in theme.js, then `python brand/build.py`. */

:root, [data-palette] {
  --text-soft: color-mix(in srgb, var(--text) 80%, var(--muted));
  --text-softer: color-mix(in srgb, var(--text) 62%, var(--muted));
  --text-dim: color-mix(in srgb, var(--muted) 78%, var(--text));
  --faint: color-mix(in srgb, var(--muted) 52%, var(--input));
  /* The chat box is dark glass over any arena: its words stay the theme's light ones. */
  --chat-text: var(--text);
  --placeholder: color-mix(in srgb, var(--muted) 62%, var(--input));
  --shade: color-mix(in srgb, var(--bg) 55%, #000);
  --focus: var(--tertiary);

  /* Meanings, the same in every theme: a warning is amber and a danger red wherever one plays. */
  --danger: #ff5c6c;
  --danger-text: #ffd5da;
  --warning: #ffb347;
  --success: #6df08f;
  --gold: #ffc94d;
  --on-danger: #fff;
  /* Each kind of server rule keeps its color everywhere: its words, and the tint of its frame. */
  --tag-cells: #5fe3ee;
  --tag-cells-tint: #00d1df;
  --tag-virus: #6df08f;
  --tag-virus-tint: #3cdd6b;
  --tag-timer: #ffc766;
  --tag-timer-tint: #ffc15a;
  --tag-tabbing: #c3abff;
  --tag-tabbing-tint: #b69cff;
  --tag-watch: #ff9fbd;
  --tag-watch-tint: #ff8fb3;

  /* On a light arena the letters over it are dark, and the accents darkened. */
  --on-light-text: #10151c;
  --on-light-soft: #38424f;
  --primary-on-light: color-mix(in srgb, var(--primary) 42%, #000);
  --secondary-on-light: color-mix(in srgb, var(--secondary) 52%, #000);
  --gold-on-light: #8a5a00;

  /* The arena's own marks. */
  --arena-border: var(--secondary);
  --map-view: var(--secondary);
  --map-here: var(--primary);
}

/* Classic, the default: the colors the game always had. */
:root, [data-palette="classic"] {
  --bg: #0a0e13;
  --surface: #11161d;
  --surface-2: #171d26;
  --input: #0a0e13;
  --line: #252d39;
  --line-strong: #3a4553;
  --text: #eef3f8;
  --muted: #8d99aa;
  --primary: #ccff00;
  --secondary: #00d1df;
  --tertiary: #00d1df;
  --on-primary: #0a0e13;
  --text-soft: #d3dbe6;
  --text-softer: #c3ccd8;
  --text-dim: #9aa6b6;
  --placeholder: #8794a5;
  --faint: #4d5968;
  --shade: #05080c;
  --primary-on-light: #4c6a00;
  --secondary-on-light: #006f78;
  --brand-symbol: url(/play/assets/brand/classic/symbol.webp?v=7f985ca7);
  --brand-wordmark: url(/play/assets/brand/classic/wordmark.webp?v=9178c3bb);
}

[data-palette="nebula"] {
  --bg: #0b0d17;
  --surface: #141425;
  --surface-2: #1d1d36;
  --input: #0d0e1b;
  --line: #302747;
  --line-strong: #4a3d6e;
  --text: #eceef6;
  --muted: #9293ad;
  --primary: #ff8a00;
  --secondary: #9b5cff;
  --tertiary: #00c6ff;
  --on-primary: #0b0d17;
  --brand-symbol: url(/play/assets/brand/nebula/symbol.webp?v=f33f9f2f);
  --brand-wordmark: url(/play/assets/brand/nebula/wordmark.webp?v=621e68f4);
}

[data-palette="frost"] {
  --bg: #080d1c;
  --surface: #10182c;
  --surface-2: #142543;
  --input: #080f20;
  --line: #253652;
  --line-strong: #3a5278;
  --text: #f7faff;
  --muted: #8b9dbb;
  --primary: #00e5ff;
  --secondary: #1689ff;
  --tertiary: #6c64ff;
  --on-primary: #06101f;
  --brand-symbol: url(/play/assets/brand/frost/symbol.webp?v=2132bb5a);
  --brand-wordmark: url(/play/assets/brand/frost/wordmark.webp?v=e4614920);
}

[data-palette="pulse"] {
  --bg: #100b19;
  --surface: #1a1228;
  --surface-2: #251b38;
  --input: #100c1d;
  --line: #35244b;
  --line-strong: #523874;
  --text: #f5f7fa;
  --muted: #a39ab9;
  --primary: #ff4fd8;
  --secondary: #00f5e1;
  --tertiary: #a64dff;
  --on-primary: #17071a;
  --brand-symbol: url(/play/assets/brand/pulse/symbol.webp?v=ef48dfbc);
  --brand-wordmark: url(/play/assets/brand/pulse/wordmark.webp?v=669708a1);
}

[data-palette="solar"] {
  --bg: #100d13;
  --surface: #1c161f;
  --surface-2: #29222e;
  --input: #100d14;
  --line: #3d303d;
  --line-strong: #5c475a;
  --text: #fff7f0;
  --muted: #9aa3b2;
  --primary: #ffb300;
  --secondary: #ff792e;
  --tertiary: #ff4d5e;
  --on-primary: #160d06;
  --brand-symbol: url(/play/assets/brand/solar/symbol.webp?v=e97a7d30);
  --brand-wordmark: url(/play/assets/brand/solar/wordmark.webp?v=cee105c6);
}
