@import url('https://fonts.googleapis.com/css2?family=Bangers&display=swap');

body {
  font-family: 'Bangers', cursive;
  background-color: #121212;
  color: #fff;
  text-align: center;
  letter-spacing: 2px;
  background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../img/bk1.jpeg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

#main-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  padding: 20px;
  max-width: 1600px; /* Constrain the max width */
  margin: 0 auto; /* Center the wrapper */
}

#info-container {
  flex: 1;
  margin: 0;
  padding: 40px;
  border: 3px solid #fff;
  border-radius: 20px;
  background-color: rgba(31, 31, 31, 0.8);
  box-shadow: 0 0 10px #A0522D, 0 0 20px #A0522D, 0 0 30px #A0522D, inset 0 0 10px #A0522D;
  text-align: left;
}

#info-container h2, #info-container h3 {
  text-align: center;
  font-size: 2.5em;
  color: #D2691E;
  text-shadow: 0 0 5px #D2691E;
  margin-top: 30px;
}

#info-container p, #info-container li {
  font-size: 1.4em;
  line-height: 1.6;
  color: #ddd;
}

#info-container span[style*="color: white"] {
  color: white !important;
  text-shadow: 0 0 10px white, 0 0 20px white;
  font-weight: bold;
}

#info-container code {
  font-family: monospace;
  background-color: #121212;
  padding: 3px 6px;
  border-radius: 5px;
  border: 1px solid #A0522D;
  color: #D2691E;
}

#category-display {
  position: absolute;
  top: 20px;
  left: 20px;
  font-size: 2em;
  color: #D2691E;
  text-shadow: 0 0 5px #D2691E;
  display: none; /* Initially hidden */
  line-height: 1.2;
}

#round-display {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2em;
  color: #fff;
  text-shadow: 0 0 5px #000;
}

#game-container {
  flex: 2;
}

#channel-container {
  position: relative; /* Needed for absolute positioning of decorative piles */
}

.header-wrapper {
  display: flex;
  align-items: center;
  justify-content: center; /* This will center the heading */
  gap: 15px;
}

.decorative-shit {
  width: 80px;
  height: 80px;
  background-image: url('/img/bullshit_characters.png');
  background-size: 300% 400%;
  flex-shrink: 0; /* Prevent the pile from shrinking */
}

#channel-container .decorative-shit:first-child {
  position: absolute;
  left: -20px;
  top: 50%;
  transform: translateY(-50%);
}

#channel-container .decorative-shit:last-child {
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
}
#question-container,
#scores-container,
#game-over-container,
#round-over-container {
  display: none;
  padding: 40px;
  margin-top: 20px;
  border: 3px solid #fff;
  border-radius: 20px;
  background-color: #1f1f1f;
  box-shadow: 0 0 10px #A0522D, 0 0 20px #A0522D, 0 0 30px #A0522D, inset 0 0 10px #A0522D;
}

h2, h3 {
    font-size: 3em;
    text-shadow: 0 0 10px #A0522D, 0 0 20px #A0522D;
    text-align: center;
}

input[type="text"], button {
  font-family: 'Bangers', cursive;
  background-color: #121212;
  color: #fff;
  border: 2px solid #fff;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 1.5em;
  letter-spacing: 2px;
  margin: 10px;
  box-shadow: 0 0 5px #A0522D, 0 0 10px #A0522D, inset 0 0 5px #A0522D;
  outline: none;
  transition: all 0.3s ease;
}

#channel-name {
  width: 400px; /* Wider input for channel name */
}

.platform-instruction {
  font-size: 1.8em;
  margin-bottom: 15px;
  color: #fff;
  text-shadow: 0 0 5px #A0522D;
}

#platform-selector {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

#platform-selector label {
  cursor: pointer;
  transition: transform 0.2s ease-in-out;
  text-align: center;
}

#platform-selector span {
  display: block;
  margin-top: 5px;
  font-size: 1.2em;
  color: #888; /* Dimmed color by default */
  transition: all 0.2s ease-in-out;
}

#platform-selector svg {
  width: 80px; /* Made icons smaller */
  height: auto;
  transition: all 0.2s ease-in-out;
}

.twitch-logo { fill: #9146FF; } /* Twitch Purple */
.kick-logo { fill: #53FC18; } /* Kick Green */

#platform-selector input[type="radio"] {
  display: none;
}

/* Hide channel input initially */
#channel-name,
#join-channel,
#question-timer-label,
#question-timer {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

/* Show channel input when platform is selected */
.platform-selected #channel-name,
.platform-selected #join-channel,
.platform-selected #question-timer-label,
.platform-selected #question-timer {
  display: inline-block;
  opacity: 1;
} /* Hide the default radio button */
}

#platform-selector input[type="radio"]:checked + svg {
  transform: scale(1.1);
}

#platform-selector input[type="radio"]:checked ~ span {
  color: #fff;
  text-shadow: 0 0 10px #D2691E, 0 0 20px #D2691E;
}

button:hover {
  background-color: #A0522D;
  color: #121212;
  box-shadow: 0 0 15px #A0522D, 0 0 25px #A0522D;
}

#start-game {
  display: none;
  animation: slow-flash 2s infinite ease-in-out;
}

#question-timer-label {
  font-size: 1.8em; /* Match other labels */
  vertical-align: middle;
}

#question-timer {
  font-size: 1.5em; /* Larger text inside input */
  width: 80px; /* Wider input field */
  padding: 5px;
  vertical-align: middle;
  margin-left: 10px;
}

ul {
    list-style: none;
    padding: 0;
    font-size: 1.8em;
}

#score-list,
#final-scores {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

li {
    padding: 5px;
}

#question {
  font-size: 3.5em;
  text-shadow: 0 0 10px #A0522D, 0 0 20px #A0522D;
  display: none; /* Initially hidden */
}

#instructions {
  font-size: 1.5em;
  color: #D2691E;
  text-shadow: 0 0 5px #D2691E;
  margin-bottom: 20px;
}

#instructions span {
  color: white !important;
  text-shadow: 0 0 10px white, 0 0 20px white;
  font-weight: bold;
}

#question-timer-display {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: conic-gradient(#A0522D 100%, #1f1f1f 0%);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2em;
  color: #fff;
  text-shadow: 0 0 5px #000;
}

#shit-animation {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 250px;
  height: 250px;
  display: none; /* Initially hidden */
  background-image: url('/img/bullshit_characters.png');
  background-repeat: no-repeat;
  z-index: 200; /* Ensure it appears on top */
}

.exploding {
  display: block !important;
  animation: explode 0.5s forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes explode {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(5);
    opacity: 0;
  }
}

#cutscene-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

#countdown {
  font-size: 15em;
  color: #fff;
  text-shadow: 0 0 20px #A0522D, 0 0 40px #A0522D;
  transform: scale(0);
  opacity: 0;
}

#countdown.pop {
  transform: scale(1);
  opacity: 1;
  animation: pop-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes pop-in {
  from {
    transform: scale(0.5);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

#answer-reveal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1.5);
  font-size: 10em;
  padding: 20px 40px;
  border-radius: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

#answer-reveal.stamped {
  opacity: 1;
  pointer-events: auto;
  animation: stamp-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes stamp-in {
  0% {
    transform: translate(-50%, -50%) scale(1.5) rotate(-15deg);
    opacity: 0;
  }
  100% {
    transform: translate(-50%, -50%) scale(1) rotate(0);
    opacity: 1;
  }
}

#answer-reveal.true {
  color: #D2691E;
  background-color: rgba(210, 105, 30, 0.1);
  border: 3px solid #D2691E;
  text-shadow: 0 0 10px #D2691E, 0 0 20px #D2691E;
  box-shadow: 0 0 10px #D2691E, 0 0 20px #D2691E, inset 0 0 10px #D2691E;
}

#answer-reveal.bullshit {
  color: #ff0000;
  background-color: rgba(255, 0, 0, 0.1);
  border: 3px solid #ff0000;
  text-shadow: 0 0 10px #ff0000, 0 0 20px #ff0000;
  box-shadow: 0 0 10px #ff0000, 0 0 20px #ff0000, inset 0 0 10px #ff0000;
}

#shit-pile-container {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  display: none; /* Initially hidden */
  justify-content: center;
  padding: 10px;
}

.shit-pile {
  width: 150px;
  height: 150px;
  margin: 0 5px;
  position: relative;
  background-image: url('/img/bullshit_characters.png');
  background-size: 300% 400%; /* 3 columns, 4 rows */
  animation: flies-buzz 0.3s infinite linear alternate;
}

/* De-synchronize the buzzing and select the sprite */
#char-1  { background-position: 50% 0%; animation-delay: -0.1s; }   /* Steampunk */
#char-2  { background-position: 100% 0%; animation-delay: -0.3s; }  /* Party */
#char-3  { background-position: 0% 33.33%; animation-delay: -0.5s; } /* Monocle 1 */
#char-4  { background-position: 50% 33.33%; animation-delay: -0.2s; } /* Top Hat */
#char-5  { background-position: 100% 33.33%; animation-delay: -0.4s; } /* Pirate 1 */
#char-6  { background-position: 0% 66.66%; animation-delay: -0.15s; }/* Monocle 2 */
#char-7  { background-position: 50% 66.66%; animation-delay: -0.35s; }/* Bowtie */
#char-8  { background-position: 100% 66.66%; animation-delay: -0.55s; }/* Pirate 2 */
#char-9  { background-position: 50% 100%; animation-delay: -0.25s; } /* Chef */
#char-10 { background-position: 100% 100%; animation-delay: -0.45s; } /* Wizard */

.shit-pile::before, .shit-pile::after {
  content: '🦟';
  position: absolute;
  font-size: 0.3em;
  animation: flies-around 1s infinite linear;
}

/* De-synchronize the flies */
.shit-pile:nth-child(odd)::before { animation-duration: 1.2s; }
.shit-pile:nth-child(even)::before { animation-duration: 0.8s; }
.shit-pile:nth-child(odd)::after { animation-duration: 0.9s; animation-delay: -0.4s; }
.shit-pile:nth-child(even)::after { animation-duration: 1.1s; animation-delay: -0.2s; }

.round-score-item {
  opacity: 0;
  animation: fade-slide-in 0.5s forwards;
}

.fly-up {
  animation: fly-up-animation 1s forwards ease-in-out;
}

@keyframes flies-buzz {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(1px, -1px); }
}

@keyframes flies-around {
  0% { transform: translate(0, 0) rotate(0deg) translateX(15px) rotate(0deg); }
  100% { transform: translate(0, 0) rotate(360deg) translateX(15px) rotate(-360deg); }
}

@keyframes fly-up-animation {
  0% {
    transform: translateY(0) scale(1);
  }
  100% {
    transform: translateY(-40vh) scale(3);
    opacity: 0;
  }
}

@keyframes fade-slide-in {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Steam animation for odor effect */
.steam {
  position: absolute;
  bottom: 20%;
  left: 50%;
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, rgba(173, 255, 47, 0.4) 0%, rgba(255, 255, 0, 0.2) 50%, transparent 70%);
  border-radius: 50%;
  transform: translateX(-50%);
  animation: steam-rise 4s infinite ease-out;
  pointer-events: none;
}

.steam::before,
.steam::after {
  content: '';
  position: absolute;
  width: 40px;
  height: 40px;
  background: radial-gradient(circle, rgba(173, 255, 47, 0.3) 0%, rgba(255, 255, 0, 0.2) 50%, transparent 70%);
  border-radius: 50%;
  animation: steam-rise 4s infinite ease-out;
}

.steam::before {
  top: -10px;
  left: -5px;
  animation-delay: 1s;
}

.steam::after {
  top: -20px;
  right: -5px;
  animation-delay: 2s;
}

@keyframes steam-rise {
  0% {
    transform: translateX(-50%) translateY(0) scale(0.5);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    transform: translateX(-50%) translateY(-60px) scale(1.2);
    opacity: 0;
  }
}

@keyframes slow-flash {
  0%, 100% {
    box-shadow: 0 0 5px #A0522D, 0 0 10px #A0522D, inset 0 0 5px #A0522D;
  }
  50% {
    box-shadow: 0 0 15px #D2691E, 0 0 25px #D2691E, inset 0 0 10px #D2691E;
  }
}

/* De-synchronize steam animations */
#char-1 .steam { animation-delay: -0.5s; }
#char-2 .steam { animation-delay: -1.2s; }
#char-3 .steam { animation-delay: -2.0s; }
#char-4 .steam { animation-delay: -0.2s; }
#char-5 .steam { animation-delay: -1.5s; }
#char-6 .steam { animation-delay: -2.3s; }
#char-7 .steam { animation-delay: -0.8s; }
#char-8 .steam { animation-delay: -1.8s; }
#char-9 .steam { animation-delay: -2.5s; }
#char-10 .steam { animation-delay: -0.1s; }

