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

body {
  background-color: #121212;
  color: white;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  flex: 1;
}

header {
  background-color: #222;
  padding: 15px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 50px;
  margin-right: 10px;
}

.logo h1 {
  font-size: 24px;
  color: #ff5722;
}

/* Navigation */
nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  margin-left: 20px;
}

nav ul li a {
  color: white;
  text-decoration: none;
  font-size: 16px;
  transition: color 0.3s;
}

nav ul li a:hover {
  color: #ff5722;
}

/* Main content */
.content {
  padding: 40px 0;
  padding-bottom: 35px;
  min-height: 70vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Footer */
footer {
  background-color: #222;
  padding: 20px 0;
  text-align: center;
  font-size: 14px;
}

/* Screens */
.screen {
  display: none;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.screen.active {
  display: block;
}

/* Welcome Screen */
#welcome-screen {
  text-align: center;
}

#welcome-screen .logo-large {
  margin-bottom: 30px;
}

#welcome-screen .logo-large img {
  height: 150px;
  margin-bottom: 20px;
}

#welcome-screen h2 {
  font-size: 36px;
  margin-bottom: 10px;
  color: #ff5722;
}

#welcome-screen p {
  margin-bottom: 30px;
  font-size: 18px;
}

.button-container {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.btn {
  padding: 12px 25px;
  font-size: 16px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: bold;
}

.btn-primary {
  background-color: #ff5722;
  color: white;
}

.btn-primary:hover {
  background-color: #e64a19;
}

.btn-secondary {
  background-color: #333;
  color: white;
}

.btn-secondary:hover {
  background-color: #444;
}

/* Form Styles */
.form-container {
  background-color: #333;
  padding: 30px;
  border-radius: 8px;
  max-width: 500px;
  margin: 0 auto;
}

.form-container h2 {
  text-align: center;
  margin-bottom: 25px;
  color: #ff5722;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
}

.form-control {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  border: 1px solid #444;
  border-radius: 4px;
  background-color: #222;
  color: white;
}

.form-row {
  display: flex;
  gap: 15px;
}

.form-row .form-group {
  flex: 1;
}

.date-picker {
  display: flex;
  gap: 10px;
}

.date-picker select {
  flex: 1;
}

/* Game Styles */
#game-container {
  position: relative;
  width: 800px;
  height: 600px;
  background-size: cover;          
  background-repeat: no-repeat;    
  background-position: center;     
  border: 2px solid #ff5722;
  margin: 0 auto;
}

#game-stats {
  display: flex;
  justify-content: space-between;
  padding: 10px;
  background-color: rgba(0, 0, 0, 0.7);
}

#game-canvas {
  position: absolute;
  top: 0;
  left: 0;
}

/* Configuration Screen */
#config-screen .form-container {
  max-width: 600px;
}

.config-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  overflow: auto;
}

.modal-content {
  position: relative;
  background-color: #333;
  margin: 10% auto;
  padding: 30px;
  border-radius: 8px;
  max-width: 600px;
  animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  color: #aaa;
  transition: color 0.3s;
}

.close-modal:hover {
  color: white;
}

/* Scoreboard */
.scoreboard {
  margin-top: 30px;
  background-color: #222;
  border-radius: 8px;
  overflow: hidden;
}

.scoreboard-header {
  background-color: #ff5722;
  padding: 15px;
  text-align: center;
  font-weight: bold;
}

.scoreboard-body {
  padding: 15px;
}

.scoreboard-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 15px;
  border-bottom: 1px solid #444;
}

.scoreboard-row:last-child {
  border-bottom: none;
}

.highlight {
  background-color: rgba(255, 87, 34, 0.3);
  font-weight: bold;
}

/* Game End Message */
.game-end-message {
  text-align: center;
  margin-bottom: 30px;
}

.game-end-message h2 {
  font-size: 36px;
  margin-bottom: 15px;
  color: #ff5722;
}

.game-end-message p {
  font-size: 18px;
  margin-bottom: 15px;
}

.message-champion {
  color: gold;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.7);
}

.message-winner {
  color: #4caf50;
}

.message-lost {
  color: #f44336;
}

.message-better {
  color: #ff9800;
}

.website-link {
  color: #ff5722;
  text-decoration: underline;
  font-weight: bold;
}
.website-link:hover {
  color: #e64a19;
}

/* Custom link-styled button */
a.btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Add space between text and emoji/icon */
a.btn span {
  margin-left: 6px;
}

.background-preview {
  width: 100%;
  height: 120px;
  margin-top: 10px;
  margin-bottom: 20px;
  border: 1px solid #444;
  border-radius: 4px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Welcome Screen Text Styling */
#welcome-screen p:first-of-type {
  font-size: 24px;
  color: #ff9800;
  text-shadow: 0 0 10px rgba(255, 152, 0, 0.5);
  font-weight: bold;
  margin-bottom: 25px;
  letter-spacing: 1px;
  animation: pulse 2s infinite;
}

#welcome-screen p:nth-of-type(2) {
  font-size: 16px;
  color: #b0bec5;
  font-style: italic;
  margin-bottom: 30px;
  text-shadow: 0 0 5px rgba(176, 190, 197, 0.3);
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.9;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}


/* Modal background and container */
#about-modal .modal-content {
  background: linear-gradient(to bottom, #1a2a3a, #0a1520);
  border: 2px solid #ff5722;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(255, 87, 34, 0.3), 0 0 40px rgba(0, 0, 0, 0.5);
  padding: 30px;
  max-width: 650px;
  position: relative;
}

/* Close button */
#about-modal .close-modal {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 28px;
  color: #ff5722;
  opacity: 0.8;
  transition: all 0.3s;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
}

#about-modal .close-modal:hover {
  opacity: 1;
  transform: scale(1.1);
  background-color: rgba(255, 255, 255, 0.2);
}

/* Modal title */
#about-modal h2 {
  font-size: 32px;
  color: #ff5722;
  text-align: center;
  margin-bottom: 10px;
  text-shadow: 0 0 10px rgba(255, 87, 34, 0.5);
  letter-spacing: 1px;
}

/* Creator information */
#about-modal p:first-of-type {
  font-size: 18px;
  color: #b0bec5;
  text-align: center;
  font-style: italic;
  margin-bottom: 20px;
}

/* Section headings */
#about-modal h3 {
  font-size: 22px;
  color: #29b6f6;
  margin: 20px 0 10px 0;
  border-bottom: 1px solid rgba(41, 182, 246, 0.3);
  padding-bottom: 5px;
  text-shadow: 0 0 5px rgba(41, 182, 246, 0.3);
}

/* List styling */
#about-modal ul {
  list-style-type: none;
  padding-left: 10px;
  margin-left: 10px;
}

#about-modal li {
  padding: 8px 0 8px 30px;
  position: relative;
  font-size: 16px;
  color: #e0e0e0;
  line-height: 1.5;
}

#about-modal li:before {
  content: '🚀';
  position: absolute;
  left: 0;
  top: 8px;
  font-size: 14px;
  color: #ff9800;
}

/* Challenges section list */
#about-modal h3:nth-of-type(2) + p + ul li:before {
  content: '⚡';
}

/* Regular paragraphs */
#about-modal p {
  line-height: 1.6;
  color: #e0e0e0;
  margin-bottom: 10px;
}

/* Space between sections */
#about-modal br {
  display: none;
}