/* ========================================
   COLOR SCHEME CONFIGURATION
   ========================================

   To experiment with different color schemes, modify the values below:

   - --color-light: Main light text/element color
   - --color-dark: Dark background elements
   - --bg-gradient-light/dark: Background gradient colors
   - --bloom-*: Glow effects in the center
   - --vignette-dark: Edge darkening
   - --ray-color: Sunburst ray color
*/

:root {
  /* Color Scheme Configuration */
  /* Main Colors */
  --color-light: rgb(220, 220, 220);
  --color-dark: rgb(51, 51, 51);
  --color-darkest: rgb(40, 40, 40);

  /* Background gradient stops */
  --bg-gradient-light: rgb(220, 220, 220);
  --bg-gradient-dark: rgb(51, 51, 51);

  /* Bloom/Glow effects */
  --bloom-white: rgba(255, 255, 255, 0.15);
  --bloom-light: rgba(240, 240, 240, 0.1);
  --bloom-medium: rgba(220, 220, 220, 0.05);

  /* Vignette */
  --vignette-dark: rgba(0, 0, 0, 0.3);

  /* Burst rays */
  --ray-color: rgba(40, 40, 40, 0.2);

  /* Typography */
  --text-color: rgb(220, 220, 220);
  --text-opacity: 0.75;
}

body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  width: 100%;
  height: 100vh;
  font-family: "Libre Baskerville", serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  background:
    /* Light bloom from center */
    radial-gradient(circle at center, var(--bloom-white) 0%, transparent 30%),
    radial-gradient(circle at center, var(--bloom-light) 0%, transparent 40%),
    radial-gradient(circle at center, var(--bloom-medium) 0%, transparent 50%),
    /* Vignette darkness at edges */
    radial-gradient(circle at center, transparent 40%, var(--vignette-dark) 100%),
    /* Base radial gradient */
    radial-gradient(circle at center, var(--bg-gradient-light), var(--bg-gradient-dark));
  filter: contrast(1.05) brightness(1.02);
}

html {
  overflow: hidden;
}

#renderCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}

/* Burst rays above horizon - separate element */
#burstRays {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 50%;
  z-index: 1;
  background: repeating-conic-gradient(from 0deg at 50% 100%,
      transparent 0deg,
      transparent 2.8deg,
      var(--ray-color) 2.8deg,
      var(--ray-color) 3deg);
  pointer-events: none;
}

/* Film grain noise overlay */
#renderCanvas::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.05'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 2;
}

#counterContainer {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

#counterContainer canvas {
  width: 70px;
  height: 70px;
  pointer-events: none;
  flex-shrink: 0;
}

#content {
  position: relative;
  z-index: 3;
  color: var(--text-color);
  padding: 20px;
  pointer-events: none;
  /* Flexbox layout for vertical structure */
  display: flex;
  flex-direction: column;
  height: 100vh;
  box-sizing: border-box;
}

header {
  flex-shrink: 0;
  padding-top: 30px;
}

header h1 {
  font-size: 3em;
  margin: 0;
  line-height: .9;
  text-align: left;
  opacity: var(--text-opacity);
}

main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 20px;
  max-width: 45%;
}

.description {
  padding: 1em 2em;
  background-color: var(--color-dark);
  border-radius: 10px;
  opacity: var(--text-opacity);
}

main p {
  font-size: 1em;
}

main .link {
  font-size: 1.1em;
}

main a {
  color: #f66cc3;
  text-decoration: none;
  pointer-events: auto;
}

footer {
  flex-shrink: 0;
  font-size: 0.9em;
  opacity: var(--text-opacity);
}

footer p {
  font-size: 0.9em;
  margin: 0;
}

/* Mobile viewport media query */
/* JSON code coloring for splash description */
.json-const {
  color: #d19a66;
}
.json-variable {
  color: #6cb4f6;
  font-weight: bold;
}
.json-key {
  color: #e7c547;
}
.json-string {
  color: #7ec699;
}
.json-number {
  color: #d19a66;
}
.json-boolean {
  color: #d19a66;
}
.json-operator {
  color: #c678dd;
}
.json-punctuation {
  color: #abb2bf;
}
@media (max-width: 768px) {
  header {
    padding-top: 20px;
  }

  header h1 {
    font-size: 2em;
  }

  .description {
    padding: 0.5em 1em;
    max-width: 100%;
  }

  main {
    max-width: 100%;
  }

  main p {
    font-size: 0.8em;
  }

  footer  {
    font-size: 0.7em;
    text-align: center;
  }

  #counterContainer {
    max-width: 90%;
    gap: 5px;
  }

  #counterContainer canvas {
    width: 60px;
    height: 60px;
  }
}
