body {
  margin: 0;
  font-family: sans-serif;
  background-color: #111;
  color: #f5f5f5;
  line-height: 1.6;
}

.container {
  width: 90%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

/* General heading styles */
h1, h2, h3 {
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 10px;
  text-align: center;
}

/* Back link for subpages */
.back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: #00aaff;
  text-decoration: none;
  font-size: 16px;
}

.back-link:hover {
  text-decoration: underline;
}

/* Buttons */
.primary-button {
  display: inline-block;
  background-color: #00aaff;
  border: none;
  border-radius: 4px;
  color: #fff;
  padding: 12px 24px;
  font-size: 18px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

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

/* Home page grid layout */
.grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-top: 40px;
}

.card {
  background-color: #222;
  border-radius: 8px;
  padding: 20px;
  width: 280px;
  text-decoration: none;
  color: #f5f5f5;
  transition: transform 0.2s ease, background-color 0.2s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.card:hover {
  transform: translateY(-6px);
  background-color: #2e2e2e;
}

.card-icon {
  font-size: 48px;
  text-align: center;
  margin-bottom: 10px;
}

.card-title {
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  margin-top: 10px;
}

.card-desc {
  font-size: 14px;
  text-align: center;
  margin-top: 10px;
  color: #ccc;
}

/* Clicker styles */
.clicker-container {
  margin-top: 40px;
  text-align: center;
}

#clickCount {
  font-size: 48px;
  margin-top: 10px;
  display: block;
}

/* Life stats styles */
.stats-container {
  margin-top: 20px;
}

.stats-container ul {
  list-style: none;
  padding-left: 0;
}

.stats-container li {
  margin-bottom: 8px;
}

/* Spend page styles */
.items-container {
  margin-top: 20px;
  border-top: 1px solid #333;
}

.item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #333;
}

.item-name {
  flex: 1;
  font-size: 16px;
}

.item-price {
  width: 120px;
  text-align: right;
  font-size: 16px;
}

.quantity-controls {
  display: flex;
  align-items: center;
}

.quantity-controls button {
  background-color: #333;
  color: #fff;
  border: none;
  padding: 6px 12px;
  font-size: 16px;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

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

.quantity {
  width: 40px;
  text-align: center;
  font-size: 16px;
}

.over-budget {
  color: #ff6666;
  font-weight: bold;
}

/* Ocean Depth Explorer */
.ocean-container {
  position: relative;
  height: 5000px;
  width: 100%;
  background: linear-gradient(to bottom, #4abfed 0%, #001f3f 100%);
  overflow: hidden;
}

.ocean-item {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  text-align: center;
  max-width: 300px;
  padding: 10px;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  font-size: 14px;
}

.ocean-item .emoji {
  font-size: 32px;
  margin-bottom: 5px;
}

.depth-display {
  position: fixed;
  top: 20px;
  right: 20px;
  color: #fff;
  font-size: 20px;
  background: rgba(0, 0, 0, 0.5);
  padding: 8px 12px;
  border-radius: 4px;
  z-index: 1000;
}

/* Size Explorer */
.size-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 40px;
}

.size-display {
  margin-top: 30px;
  text-align: center;
  color: #fff;
}

.planet {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: bold;
}

.size-slider {
  width: 80%;
  margin-top: 20px;
}

/* Random Facts */
.fact-box {
  background-color: #222;
  padding: 20px;
  border-radius: 8px;
  display: inline-block;
  max-width: 600px;
  margin-top: 20px;
  color: #fff;
}

/* Sign-in link on home page */
.sign-in-link {
  float: right;
  color: #00aaff;
  text-decoration: none;
  font-size: 14px;
  margin-top: 10px;
}

.sign-in-link:hover {
  text-decoration: underline;
}

/* Sign-in page styles */
.signin-container {
  margin-top: 30px;
  text-align: center;
}

.signin-button {
  display: inline-block;
  background-color: #00aaff;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 16px;
  margin: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

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

.signin-input {
  padding: 10px 12px;
  border-radius: 4px;
  border: 1px solid #444;
  background-color: #222;
  color: #fff;
  margin: 8px;
  font-size: 16px;
  width: 240px;
}

.signin-message {
  margin-top: 15px;
  color: #00ddff;
  font-size: 16px;
}

/* Timer display for clicker */
.timer-display {
  font-size: 24px;
  margin-top: 10px;
  color: #00ddff;
}

/* Draw a Circle */
.canvas-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#circleCanvas {
  border: 2px dashed #444;
  background-color: #111;
  cursor: crosshair;
}

.score-display {
  margin-top: 16px;
  font-size: 24px;
  color: #00ddff;
}

/* Absurd Trolley Problems */
.trolley-container {
  max-width: 700px;
  margin: 0 auto;
  margin-top: 20px;
  padding: 20px;
  background-color: #1a1a1a;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.scenario-desc {
  font-size: 18px;
  margin: 20px 0;
  line-height: 1.4;
}

.choice-button {
  background-color: #333;
  color: #fff;
  border: none;
  padding: 12px 20px;
  margin: 10px;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

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

.result-summary {
  margin-top: 20px;
  font-size: 18px;
  line-height: 1.4;
}