/* ========== Stili Globali ========== */
body {
  font-family: 'Merriweather', serif, sans-serif;
  background-color: #f9f9f9;
  color: #333;
  padding: 20px;
  margin: 0;
  text-align: center;
}

h1, h2, h3, .title {
  color: #333;
  margin-bottom: 20px;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px;
  box-sizing: border-box;
}
input[type="range"] {
  width: 100%;
  box-sizing: border-box;
  margin-top: 5px;
}
@media (prefers-color-scheme: dark) {
  body {
    background-color: #111;
    color: #eee;
  }

  h1, h2, h3, .title {
    color: #eee;
  }

  .story-content {
    background-color: #222;
    color: #eee;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
  }

  .suggestion-popup {
    background-color: #222;
    color: #eee;
  }

  .credits, .footer {
    color: #aaa;
  }

  .textarea-writing {
    background-color: #222222;
    color: #eeeeee;
    border-color: #555555;
  }

  .input-text,
  textarea {
    background-color: #1e1e1e;
    color: #eeeeee;
    border-color: #444444;
  }
}

/* ========== Footer / Credits ========== */
.credits, .footer {
  margin-top: 40px;
  font-size: 0.9em;
  color: #666;
  padding: 20px 0;
  text-align: center;
}

@media (prefers-color-scheme: dark) {
  .credits, .footer {
    color: #aaa;
  }
}

/* ========== Bottoni ========== */
.button-top, .save-button, .share-button, .action-button, .button-submit {
  display: inline-block;
  padding: 10px 20px;
  margin: 10px auto;
  background-color: #00aaff;
  color: white;
  font-size: 1.1em;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.3s;
  box-sizing: border-box;
}

.button-top:hover, .save-button:hover, .share-button:hover, .action-button:hover, .button-submit:hover {
  background-color: #0088cc;
}

.save-button {
  background-color: #00cc66;
}

.save-button:hover {
  background-color: #00994d;
}

.share-button {
  background-color: #0077cc;
}

.share-button:hover {
  background-color: #005fa3;
}

/* ========== Tabs ========== */
.tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.tabs button {
  background-color: #f2f2f2;
  border: 1px solid #ccc;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 1.1em;
  transition: background-color 0.3s;
}

.tabs button.active {
  background-color: #00aaff;
  color: white;
}

@media (prefers-color-scheme: dark) {
  .tabs button {
    background-color: #333;
    color: #eee;
    border-color: #555;
  }
  .tabs button.active {
    background-color: #00aaff;
    color: white;
  }
}

/* ========== Contenuto Storie ========== */
.story-content {
  max-width: 800px;
  margin: 20px auto;
  background-color: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  text-align: left;
  white-space: pre-line;
  word-wrap: break-word;
}

.story-content br + br {
  display: none;
}

.story-content p {
  margin-bottom: 15px;
}

.author {
  font-size: 0.9em;
  text-align: right;
  color: #888;
}

/* ========== Popup Suggerimenti ========== */
.suggestion-popup {
  display: none;
  background-color: #f4faff;
  color: #333;
  padding: 20px;
  border-left: 5px solid #00aaff;
  border-radius: 10px;
  box-shadow: 0 0 8px rgba(0,0,0,0.05);
  margin: 20px auto;
  max-width: 800px;
  text-align: left;
  font-size: 1.1em;
  line-height: 1.5;
}

.suggestion-popup strong {
  color: #00aaff;
}

@media (prefers-color-scheme: dark) {
  .suggestion-popup {
    background-color: #1e1e1e;
    color: #eee;
    border-left-color: #00aaff;
    box-shadow: 0 0 10px rgba(255,255,255,0.1);
  }

  .suggestion-popup strong {
    color: #00cfff;
  }
}

/* ========== Form ========== */
.form-container label {
  display: block;
  margin-top: 20px;
  margin-bottom: 5px;
  font-weight: bold;
  text-align: left;
}

.input-text,
textarea {
  width: 100%;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 1em;
  box-sizing: border-box;
  font-family: 'Merriweather', serif, sans-serif;
  margin-bottom: 10px;
}

.range-value {
  margin-top: 5px;
  font-size: 0.9em;
  text-align: right;
}

/* ========== Writing ========== */
.textarea-writing {
  width: 100%;
  max-width: 800px;
  height: 300px;
  padding: 15px;
  font-size: 1.4em;
  font-family: 'Merriweather', serif, sans-serif;
  border: 1px solid #ccc;
  border-radius: 8px;
  resize: vertical;
  box-sizing: border-box;
  margin: 0 auto 20px auto;
  display: block;
}

@media (max-width: 600px) {
  .textarea-writing {
    width: 100%;
    height: calc(100vh - 200px);
    font-size: 1.6em;
    padding: 20px;
    border-radius: 0;
    margin: 0;
  }

  .container {
    padding: 0 10px;
    width: 100%;
    max-width: 100%;
      font-size: 1rem;

  }

  .input-text,
  textarea {
    font-size: 1.1em;
  }
  .info-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .info-item {
    font-size: 1.1em;
    width: 100%;
    box-sizing: border-box;
  }

  .info-box h2 {
    font-size: 1.5em;
    text-align: center;
  }
}

/* ========== Control Room ========== */
.control-room .container {
  max-width: 800px;
  margin: 30px auto;
  padding: 20px;
}

.control-room .title {
  text-align: center;
  font-size: 2em;
  margin-bottom: 20px;
}

.game-info-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

#gameCode {
  font-size: 1.5em;
  background-color: #00aaff;
  color: #ffffff;
  padding: 5px 15px;
  border-radius: 10px;
  margin-bottom: 15px;
}

.qr-copy-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

#qrcode {
  margin-bottom: 10px;
}

.button-control-small {
  padding: 10px 15px;
  background-color: #00aaff;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 0.9em;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.button-control-small:hover {
  background-color: #0088cc;
}

.info-box, .timer-box, .controls-box, .players-grid {
  margin-bottom: 30px;
  padding: 20px;
  border-radius: 10px;
  background-color: #f2f2f2;
}

.status {
  padding: 10px;
  border-radius: 8px;
  font-weight: bold;
  margin-bottom: 20px;
  text-align: center;
}

.timer-bar-background {
  background-color: #ddd;
  border-radius: 8px;
  overflow: hidden;
  height: 25px;
  margin-top: 10px;
}

.timer-bar-fill {
  background-color: #00aaff;
  height: 100%;
  width: 100%;
  transition: width 1s linear;
}

.controls-box {
  text-align: center;
}

.button-control {
  padding: 12px 25px;
  margin: 10px;
  background-color: #00aaff;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 1em;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.button-control:hover {
  background-color: #0088cc;
}

.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
}

.player-card {
  background-color: #ffffff;
  border: 2px solid #ccc;
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  transition: transform 0.3s;
}
.player-card.waiting { border-color: #ffcc00; }
.player-card.writing { border-color: #00ccff; }
.player-card.ready { border-color: #00cc66; }
.player-card.playing {
  background-color: #80e0a7;
  border-color: #33cc66;
  color: #005500;
}
.player-card:hover {
  transform: scale(1.05);
}

@media (prefers-color-scheme: dark) {
  .control-room body {
    background-color: #111111;
    color: #eeeeee;
  }

  .info-box, .timer-box, .controls-box, .players-grid {
    background-color: #222222;
  }

  .player-card {
    background-color: #333333;
    border-color: #555555;
  }

  .status.waiting { background-color: #665500; color: #ffcc00; }
  .status.started { background-color: #004466; color: #66ccff; }
  .status.ended { background-color: #661111; color: #ff6666; }

  .timer-bar-background {
    background-color: #333333;
  }

  .timer-bar-fill {
    background-color: #00aaff;
  }
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  text-align: left;
}
.info-item.full {
  grid-column: 1 / -1;
}
.label {
  font-weight: bold;
  white-space: nowrap;
}

.story-info {
  max-width: 800px;
  margin: 20px auto;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
}

.timer-large {
  font-size: 1.5em;
  font-weight: bold;
  margin: 20px 0;
  text-align: center;
}

.suggestion-container {
  margin-bottom: 4px;
}

.suggestion-btn-discreet {
  font-size: 0.85em;
  background: none;
  border: none;
  color: #0077cc;
  cursor: pointer;
  margin: 0 0 4px 0;
  padding: 0;
  text-decoration: underline;
}
.suggestion-btn-discreet:hover {
  color: #005fa3;
}

.turn-block {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #ddd;
}

.paragraph-text {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
  font-size: 1.1em;
  line-height: 1.6;
  color: #333;
  white-space: pre-wrap;
  text-align: left;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
}

@media (prefers-color-scheme: dark) {
  .paragraph-text {
    color: #eee;
  }
}

/* ========== View Game Sheets Styles ========== */

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
  background-color: #f9f9f9;
  padding: 20px;
  text-align: center;
}

h1 {
  font-size: 2.0em;
  color: #333;
  margin-bottom: 20px;
}

.story-title {
  font-size: 2em;
  font-weight: bold;
  color: #333;
  margin-bottom: 30px;
  text-align: center;
}

.tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 30px 0;
}

.tabs button {
  padding: 10px 20px;
  font-size: 1.05em;
  background-color: #e0e0e0;
  border: none;
  border-radius: 20px;
  color: #333;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tabs button:hover {
  background-color: #d0f0ff;
}

.tabs button.active {
  background-color: #00aaff;
  color: white;
  font-weight: bold;
  box-shadow: 0 4px 8px rgba(0,170,255,0.3);
}

.story-content {
  max-width: 800px;
  margin: 0 auto;
  background-color: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  text-align: left;
  white-space: pre-line;
  word-wrap: break-word;
}

.story-content p {
  margin-bottom: 15px;
}

.author {
  font-size: 0.9em;
  text-align: right;
  color: #888;
}

/* Pulsanti generali */
.action-button, .save-button, .share-button {
  background-color: #00aaff;
  color: white;
  border: none;
  padding: 10px 20px;
  font-size: 1.1em;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.action-button:hover {
  background-color: #0088cc;
}

.save-button {
  background-color: #00cc66;
}

.save-button:hover {
  background-color: #00994d;
}

.share-button {
  background-color: #0077cc;
}

.share-button:hover {
  background-color: #005fa3;
}

/* Contenitore dei bottoni */
.tab-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 30px 0;
  flex-wrap: wrap;
}

/* Pulsanti dei suggerimenti 📌 */
.suggestion-btn {
  display: inline-block;
  font-size: 0.9em;
  padding: 4px 8px;
  margin: 4px 0 12px 10px;
  border: none;
  border-radius: 5px;
  background-color: #00aaff;
  color: white;
  cursor: pointer;
}

.suggestion-btn:hover {
  background-color: #0088cc;
}

/* Popup suggerimento */
.suggestion-popup {
  display: none;
  position: fixed;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90%;
  background: white;
  color: black;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  z-index: 1000;
}
.textarea-writing {
  margin-top: 20px;
}

#suggestionBox {
  display: block;
  background-color: #f0f8ff;
  border: 2px dashed #00aaff;
  padding: 12px 16px;
  margin: 20px 0;
  font-size: 1.1em;
  color: #004466;
  border-radius: 6px;
}
/* Modalità scura */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #111111;
    color: #eeeeee;
  }
  h1 {
    color: #ffffff; /* o un altro colore chiaro come #f5f5f5 */
  }

  #suggestionBox {
    background-color: #001f2f;
    border-color: #00ccff;
    color: #ccf6ff;
  }
  .story-content {
    background-color: #222222;
    color: #eeeeee;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
  }

.tabs button {
  background-color: #333333;
  color: #eeeeee;
  border: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.tabs button:hover {
  background-color: #444;
}

.tabs button.active {
  background-color: #00aaff;
  color: white;
  box-shadow: 0 4px 8px rgba(0,170,255,0.5);
}

  .story-title {
    color: #ffffff;
  }

  .suggestion-popup {
    background-color: #222;
    color: #eee;
  }
}

/* Responsive mobile */
@media (max-width: 600px) {
  .tab-actions {
    flex-direction: column;
    align-items: center;
  }

  .action-button, .save-button, .share-button {
    width: 100%;
    max-width: 300px;
  }

  .suggestion-btn {
    width: 100%;
    max-width: 250px;
    margin: 8px auto;
  }
}

.game-description {
  font-size: 1.2em;
  color: #555;
  margin-bottom: 30px;
  line-height: 1.6;
  text-align: center;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.history-section {
  max-width: 700px;
  margin: 30px auto;
  text-align: left;
  font-size: 1.1em;
  line-height: 1.6;
  color: #444;
}

.history-section em {
  font-style: italic;
  color: #777;
}

.why-small {
  font-size: 0.95em;
  margin-top: 15px;
  color: #666;
}

@media (prefers-color-scheme: dark) {
  .game-description {
    color: #ccc;
  }
    .history-section {
    color: #ccc;
  }

  .history-section em {
    color: #aaa;
  }

  .why-small {
    color: #aaa;
    text-align: center;
  }

}

.fusion-block p {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
  font-size: 1.1em;
  line-height: 1.6;
  white-space: pre-wrap;
}

@media (prefers-color-scheme: dark) {
  .fusion-block {
    background-color: #222;
    border-radius: 10px;
    padding: 20px;
  }
}

body.waiting-turn-page {
  margin: 0;
  padding: 20px;
  font-family: sans-serif;
  background-color: #ffffff;
  color: #222222;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  text-align: center;
}

.waiting-turn-container {
  width: 90%;
  max-width: 400px;
  background: #f2f2f2;
  padding: 30px;
  border-radius: 10px;
}

.loading {
  font-size: 1.4em;
  margin-top: 20px;
}

.dots {
  display: inline-block;
  width: 1em;
  overflow: hidden;
  vertical-align: bottom;
}
.dots::after {
  content: '...';
  animation: dotsAnimation 1.5s steps(4, end) infinite;
}
@keyframes dotsAnimation {
  0% { width: 0em; }
  25% { width: 0.25em; }
  50% { width: 0.5em; }
  75% { width: 0.75em; }
  100% { width: 1em; }
}

.error-message {
  margin-top: 20px;
  color: #00aaff;
  font-weight: bold;
  display: none;
}

@media (prefers-color-scheme: dark) {
  body.waiting-turn-page {
    background-color: #111111;
    color: #eeeeee;
  }
  .waiting-turn-container {
    background-color: #222222;
  }
}

.link {
  color: #00aaff;
  text-decoration: none;
  font-weight: bold;
}
.link:hover {
  color: #0088cc;
}

.game-header-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px;
}

.qr-section {
  flex: 0 0 auto;
}

.game-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.game-code label,
.game-pin label {
  font-weight: bold;
  font-size: 1em;
  margin-bottom: 4px;
  text-align: center;
}

.code-box, .pin-box {
  font-size: 1.4em;
  background: #e0f2ff;
  color: #003f63;
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: bold;
  letter-spacing: 1px;
}

@media (prefers-color-scheme: dark) {
  .code-box, .pin-box {
    background: #222;
    color: #00ccff;
  }
}

.pin-warning {
  margin-top: 10px;
  padding: 10px;
  background-color: #fffbe6;
  border: 1px solid #ffd700;
  border-radius: 6px;
  font-size: 0.95em;
}

@media (prefers-color-scheme: dark) {
  .pin-warning {
    background-color: #332f00;
    border-color: #ffcc00;
    color: #ffec99;
  }
}

.reveal-pin-btn {
  background: none;
  border: none;
  color: #0077cc;
  font-size: 0.85em;
  cursor: pointer;
  margin: 0;
  padding: 0;
  text-decoration: underline;
}

.reveal-pin-btn:hover {
  color: #005fa3;
}

@media (prefers-color-scheme: dark) {
  .ai-loading {
    animation: darkPulse 1.2s infinite ease-in-out;
    background-color: #222;
    border: 1px solid #444;
    color: #bbb;
  }

  @keyframes darkPulse {
    0%   { background-color: #222; }
    50%  { background-color: #333; }
    100% { background-color: #222; }
  }
}

@media (prefers-color-scheme: light) {
  .ai-loading {
    animation: lightPulse 1.2s infinite ease-in-out;
    background-color: #f8f8f8;
    border: 1px solid #ccc;
    color: #444;
  }

  @keyframes lightPulse {
    0%   { box-shadow: 0 0 0 0 rgba(100, 100, 255, 0.2); }
    70%  { box-shadow: 0 0 0 10px rgba(100, 100, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(100, 100, 255, 0); }
  }
}

.copy-link-box {
  margin-top: 10px;
}
/* Campo link visibile e adattato alla dark mode */
.copy-link-box input {
  width: 100%;
  font-size: 0.95em;
  padding: 8px;
  border-radius: 5px;
  border: 1px solid #ccc;
  background-color: #f9f9f9;
  color: #222;
}

/* DARK MODE */
@media (prefers-color-scheme: dark) {
  .copy-link-box input {
    background-color: #1e1e1e;
    color: #f0f0f0;
    border: 1px solid #444;
  }
  
  /* Stile di base del bottone */
.button-control-small {
  background-color: #007bff;
  color: #fff;
  border: none;
  padding: 8px 14px;
  font-size: 1em;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.button-control-small:hover {
  background-color: #0056b3;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  .button-control-small {
    background-color: #333333;
    color: #f0f0f0;
    border: 1px solid #555;
  }

  .button-control-small:hover {
    background-color: #555555;
  }
}
}

html {
  font-size: 18px;
}

@media (max-width: 480px) {
  html {
    font-size: 20px; /* leggermente più grande su schermi piccoli */
  }
}
.container {
  max-width: 100%;
  width: 100%;
  padding: 16px;
  box-sizing: border-box;
}

body {
  font-family: sans-serif;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

@media (max-width: 600px) {
  .title {
    font-size: 1.8rem;
    text-align: center;
  }

  .button-control, .button-control-small, .button-submit {
    font-size: 1rem;
    padding: 12px 16px;
  }

  .input-text, .pin-box, .code-box {
    font-size: 1rem;
    padding: 10px;
  }

  .game-header-grid {
    display: block;
    text-align: center;
  }

  .qr-section {
    margin-bottom: 15px;
  }

  .game-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.footer a.coffee-link {
  font-weight: bold;
  text-decoration: none;
  transition: color 0.3s ease;
}

@media (prefers-color-scheme: light) {
  .footer a.coffee-link {
    color: #a64ac9; /* viola chiaro per sfondo chiaro */
  }

  .footer a.coffee-link:hover {
    color: #8e3ebc;
    text-decoration: underline;
  }
}

@media (prefers-color-scheme: dark) {
  .footer a.coffee-link {
    color: #d4a3ff; /* viola più chiaro per sfondo scuro */
  }

  .footer a.coffee-link:hover {
    color: #bb86fc;
    text-decoration: underline;
  }
}

@media (max-width: 600px) {
  .control-room {
    font-size: 1.1rem;
  }

  .control-room .title {
    font-size: 1.6rem;
  }

  .control-room .player-card {
    font-size: 1rem;
    padding: 12px;
  }

  .control-room .game-info-top,
  .control-room .info-box,
  .control-room .controls-box {
    font-size: 1rem;
  }
}

/* ========== Utility ========== */
.tab-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 20px 0;
  flex-wrap: wrap;
}

@media (max-width: 600px) {
  .tab-actions {
    flex-direction: column;
    align-items: center;
  }

  .action-button {
    width: 100%;
    max-width: 300px;
  }
}

.help-box {
  display: none;
  max-width: 600px;
  margin: 0 auto 20px auto;
  padding: 15px;
  background: #eef7ff;
  color: #000;
  border-left: 4px solid #00aaff;
  border-radius: 6px;
  text-align: left;
}

@media (prefers-color-scheme: dark) {
  .help-box {
    background: #1e1e1e;
    color: #f0f0f0;
    border-left-color: #00aaff;
  }
}

.title-with-help {
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.question-icon {
  font-size: 0.8em;
  cursor: pointer;
  color: var(--text-muted, #888);
  background: var(--background-muted, #eee);
  border-radius: 50%;
  padding: 2px 6px;
  line-height: 1;
  transition: background 0.3s;
}
.question-icon:hover {
  background: #ccc;
}

.help-box {
  background: var(--help-background, #f2f2f2);
  color: var(--text-main, #333);
  border-left: 4px solid #00aaff;
  padding: 12px 16px;
  margin: 10px auto 20px;
  border-radius: 6px;
  max-width: 700px;
  font-size: 0.95em;
}
@media (prefers-color-scheme: dark) {
  .help-box {
    background: #222;
    color: #eee;
    border-left-color: #00aaff;
  }
  .question-icon {
    background: #333;
    color: #aaa;
  }
  .question-icon:hover {
    background: #555;
  }
}

.cadavre-quote {
  font-size: 1.8em;
  text-align: center;
  font-style: italic;
  color: #00aaff;
  margin: 30px 0;
}

@media (prefers-color-scheme: dark) {
  .cadavre-quote {
    color: #55cfff;
  }
}
.instruction-box {
  background-color: #f3e8ff; /* viola pastello */
  color: #4b006e; /* viola intenso */
  border-left: 4px solid #c49bff;
  padding: 12px 16px;
  margin: 20px 0;
  border-radius: 6px;
  font-size: 1em;
}

@media (prefers-color-scheme: dark) {
  .instruction-box {
    background-color: #2a1936; /* viola scuro */
    color: #e3ccff;
    border-left-color: #bb86fc;
  }
}
.instruction-box p.flash {
  background-color: #fff3cd;
  transition: background-color 0.3s;
}

body.flash-bg {
  animation: flashBackground 0.6s ease-in-out;
}
.instruction-textarea {
  width: 100%;
  max-width: 960px;
  margin: 0 auto 10px auto;
  display: block;
  padding: 14px;
  font-size: 1.1em;
  border-radius: 6px;
  border: 1px solid #ccc;
  background-color: #1e1e1e; /* o #fff per light mode */
  color: #eee;
  box-sizing: border-box;
}
.instruction-wrapper {
  width: 100%;
  max-width: 960px;
  margin: 20px auto;
  text-align: center;
}
@media (min-width: 1200px) {
  .textarea-writing {
    max-width: 1000px;
  }
}
@keyframes flashBackground {
  0%   { background-color: #e6ccff; } /* viola chiaro */
  100% { background-color: inherit; }
}

.tagline {
  color: #00aaff;
  font-style: italic;
  text-align: center;
   font-size: 1em;
}
#nickname {
  width: 100%;
  margin: 20px 0;
  box-sizing: border-box;
}
.form-container input.input-text {
  width: 100%;
  box-sizing: border-box;
}

.turn-indicator {
  background-color: #f0f8ff;
  border-left: 4px solid #00aaff;
  padding: 12px 16px;
  border-radius: 6px;
  max-width: 600px;
  margin: 0 auto 20px;
  color: #004466;
  font-size: 1.1em;
}
@media (prefers-color-scheme: dark) {
  .turn-indicator {
    background-color: #1f2a33;
    border-left-color: #00ccff;
    color: #ccf2ff;
  }
}