* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Arial', sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.background {
  position: fixed;
  top: 0;
  left: 0;
  width: 150%;
  height: 150%;
  background-image: url('/red_squares_background.jpg');
  background-size: cover;
  z-index: -1;
  animation: moveBackground 60s linear infinite;
}

@keyframes moveBackground {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(-20%, -20%);
  }
}

.container {
  width: 100%;
  max-width: 800px;
  padding: 20px;
  position: relative;
  z-index: 1;
}

#quiz-container {
  background-color: rgba(0, 0, 0, 0.85);
  border-radius: 10px;
  padding: 40px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.7),
              0 0 60px rgba(255, 107, 53, 0.3);
  border: 2px solid #ff6b35;
  margin: 40px 0;
  max-height: 90vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #ff6b35 rgba(0, 0, 0, 0.3);
}

#quiz-container::-webkit-scrollbar {
  width: 8px;
}

#quiz-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
}

#quiz-container::-webkit-scrollbar-thumb {
  background: #ff6b35;
  border-radius: 4px;
}

h1 {
  font-family: 'TF2Build', sans-serif;
  text-align: center;
  color: #ff6b35;
  margin-bottom: 20px;
  font-size: 3rem;
  text-shadow: 0 0 10px rgba(255, 107, 53, 0.5),
               3px 3px 0 rgba(0, 0, 0, 0.8);
  letter-spacing: 1px;
  text-transform: uppercase;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #f7c59f;
}

#character-name {
  font-family: 'TF2Build', sans-serif;
  font-size: 3.5rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.8);
}

#intro {
  background: rgba(255, 107, 53, 0.1);
  border-radius: 8px;
  padding: 25px;
  border: 1px solid rgba(255, 107, 53, 0.3);
  margin: 30px 0;
}

#intro p {
  font-size: 1.3rem;
  text-align: center;
  margin-bottom: 30px;
  line-height: 1.6;
  color: #f7c59f;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.8);
}

button {
  background-color: #ff6b35;
  color: white;
  border: none;
  padding: 12px 24px;
  font-size: 1.1rem;
  border-radius: 5px;
  cursor: pointer;
  display: block;
  margin: 20px auto;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #e44d12;
}

#start-btn {
  background-color: #ff6b35;
  color: white;
  border: none;
  padding: 15px 40px;
  font-size: 1.4rem;
  font-family: 'TF2Build', sans-serif;
  border-radius: 5px;
  cursor: pointer;
  display: block;
  margin: 20px auto;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

#start-btn:hover {
  background-color: #e44d12;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.6);
}

#start-btn:active {
  transform: translateY(1px);
}

#start-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transform: rotate(45deg);
  transition: 0.5s;
}

#start-btn:hover::after {
  transform: rotate(45deg) translate(50%, 50%);
}

#progress-bar {
  width: 100%;
  height: 10px;
  background-color: #333;
  border-radius: 5px;
  margin-bottom: 15px;
}

#progress {
  height: 100%;
  width: 0;
  background-color: #ff6b35;
  border-radius: 5px;
  transition: width 0.3s ease;
}

#question-number {
  font-size: 0.9rem;
  text-align: right;
  margin-bottom: 10px;
  color: #999;
}

.answer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 30px 0;
}

.answer-option {
  background-color: rgba(68, 68, 68, 0.8);
  padding: 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid rgba(255, 107, 53, 0.2);
  font-size: 1.1rem;
  line-height: 1.4;
}

.answer-option:hover {
  background-color: rgba(85, 85, 85, 0.9);
  transform: translateY(-2px);
  border-color: rgba(255, 107, 53, 0.4);
}

.selected {
  background-color: #ff6b35;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.hidden {
  display: none;
}

#question-text {
  font-size: 1.8rem;
  line-height: 1.4;
  margin: 30px 0;
  color: #f7c59f;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.8);
}

#result-container {
  text-align: center;
  padding: 20px 0;
}

#character-image {
  width: 100%;
  height: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 30px 0;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  padding: 20px;
}

#character-image img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

#character-description {
  line-height: 1.8;
  font-size: 1.2rem;
  text-align: center;
  margin: 30px 0;
  color: #f7c59f;
  padding: 0 20px;
}

#loading-container {
  text-align: center;
  padding: 40px 0;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #333;
  border-top: 5px solid #ff6b35;
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media (max-width: 600px) {
  .answer-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  #quiz-container {
    padding: 20px;
    margin: 20px 0;
  }
  
  #question-text {
    font-size: 1.4rem;
    margin: 20px 0;
  }
  
  .answer-option {
    padding: 15px;
    font-size: 1rem;
  }
  
  #character-image {
    height: 300px;
  }
  
  h1 {
    font-size: 2.2rem;
  }
  
  #character-name {
    font-size: 2.5rem;
  }
  
  #intro p {
    font-size: 1rem;
  }
  
  button {
    padding: 10px 20px;
    font-size: 1rem;
  }
}