:root {
  --bg: #151515;
  --text: #fff;
  --accent: #DDC225;
  --link: #A3A3A3;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Raleway", sans-serif;
  font-size: 16px;
  line-height: 30px;
}

/* Responsive sizing to match original template */
@media (min-width: 768px) {
  body {
    font-size: 22px;
    line-height: 48px;
  }
}

@media (min-width: 1200px) {
  body {
    font-size: 26px;
    line-height: 48px;
  }
}

@media (min-width: 1824px) {
  body {
    font-size: 32px;
    line-height: 60px;
  }
}

.content-wrapper {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: left;
}

.v-center {
  width: 86%;
  max-width: 720px;
}

.main-content {
  visibility: hidden;
}

p {
  margin: 0 0 0.9375em 0;
  /* Very strong protection against mid-word line breaks on mobile Safari / Chrome PWA */
  word-break: keep-all !important;
  overflow-wrap: normal !important;
  hyphens: none;
  -webkit-hyphens: none;
}

p a {
  color: var(--accent);
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
  opacity: 0;
  font-size: 0.65em;
}

ul li {
  display: inline;
  margin-right: 0.75em;
}

li a {
  color: var(--link);
  text-decoration: none;
  position: relative;
  transition: color 0.5s;
}

li a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent);
  opacity: 0;
  transition: opacity 0.5s;
}

li a:hover {
  color: var(--text);
}

li a:hover::after {
  opacity: 1;
}

/* Preloader */
.preloader {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  background: var(--bg);
}

.spinner {
  width: 1em;
  height: 1em;
  border-radius: 50%;
  background: linear-gradient(to bottom, var(--accent) 10%, rgba(255,255,255,0) 100%);
  position: relative;
  animation: spin 1s infinite linear;
}

.spinner::before,
.spinner::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.spinner::before {
  background: linear-gradient(to right, rgba(255,255,255,0) 50%, var(--accent) 50%);
}

.spinner::after {
  width: 90%;
  height: 90%;
  margin: auto;
  background: var(--bg);
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ComfyUI icon styling - replaces previous inline styles */
.comfy-icon {
  height: 1em;
  width: auto;
  vertical-align: middle;
  margin-bottom: 0.12em;
}

/* Prevent words from breaking in the middle during character animation */
.word {
  display: inline-block;
  white-space: nowrap;
  word-break: keep-all !important;   /* Extra strong protection for mobile Safari / PWA */
}

/* Narrow screen / mobile adjustments */
@media (max-width: 768px) {
  .content-wrapper {
    text-align: center;
  }

  .v-center {
    width: 92%;
    max-width: none;
    padding: 0 4%;
  }

  .main-content p {
    text-wrap: balance;   /* Makes the quote wrap into roughly 2 lines of similar length */
  }

  ul {
    font-size: 0.8em;   /* larger for better touch targets on mobile */
    text-align: center;
  }

  ul li {
    display: inline-block;
    margin-right: 0.5em;
  }
}
