* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Georgia", "Times New Roman", serif;
  background: #1a2332;
  background-image: repeating-linear-gradient(
      0deg,
      transparent,
      transparent 20px,
      rgba(59, 130, 246, 0.03) 20px,
      rgba(59, 130, 246, 0.03) 40px
    ),
    radial-gradient(
      circle at 20% 50%,
      rgba(59, 130, 246, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(37, 99, 235, 0.15) 0%,
      transparent 50%
    ),
    linear-gradient(135deg, #1a2332 0%, #0f172a 100%);
  color: #cbd5e1;
  line-height: 1.6;
  padding: 20px;
  min-height: 100vh;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  background: #1e293b;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.05) 2px,
    rgba(0, 0, 0, 0.05) 4px
  );
  border: 4px solid #3b82f6;
  border-style: double;
  border-radius: 0;
  box-shadow: 0 0 0 4px #1e40af, 0 0 0 8px #3b82f6,
    0 0 20px rgba(59, 130, 246, 0.5), inset 0 0 50px rgba(59, 130, 246, 0.1);
  padding: 30px;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  position: relative;
  z-index: 10;
}

header {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 3px solid #3b82f6;
  border-style: double;
  text-align: center;
  position: relative;
}

header::before,
header::after {
  content: "◆";
  position: absolute;
  bottom: -8px;
  color: #3b82f6;
  font-size: 1.2em;
}

header::before {
  left: 20%;
}

header::after {
  right: 20%;
}

h1 {
  font-family: "Press Start 2P", cursive;
  font-size: 1.8em;
  font-weight: normal;
  margin-bottom: 15px;
  color: #60a5fa;
  text-shadow: 3px 3px 0px #3b82f6, 6px 6px 0px #1e40af,
    0 0 10px rgba(96, 165, 250, 0.5);
  letter-spacing: 2px;
  line-height: 1.6;
  transform: perspective(500px) rotateX(5deg);
  animation: pixelGlow 2s ease-in-out infinite alternate;
}

@keyframes pixelGlow {
  0% {
    text-shadow: 3px 3px 0px #3b82f6, 6px 6px 0px #1e40af,
      0 0 10px rgba(96, 165, 250, 0.5);
  }
  100% {
    text-shadow: 3px 3px 0px #3b82f6, 6px 6px 0px #1e40af,
      0 0 20px rgba(96, 165, 250, 0.8);
  }
}

.subtitle {
  font-size: 0.95em;
  color: #94a3b8;
  font-style: italic;
  text-shadow: 0 0 5px rgba(148, 163, 184, 0.3);
  letter-spacing: 0.5px;
}

.week-header {
  margin-bottom: 20px;
  padding: 15px;
  background: rgba(0, 0, 0, 0.4);
  border: 3px solid #3b82f6;
  border-style: double;
  border-radius: 0;
  text-align: center;
  box-shadow: inset 0 0 10px rgba(59, 130, 246, 0.3),
    0 0 10px rgba(59, 130, 246, 0.2);
}

.week-header p {
  font-weight: bold;
  font-size: 1.2em;
  color: #e2e8f0;
}

.stats-box {
  margin-bottom: 25px;
  padding: 15px;
  background: rgba(0, 0, 0, 0.5);
  border: 3px solid #60a5fa;
  border-style: double;
  border-radius: 0;
  box-shadow: inset 0 0 15px rgba(96, 165, 250, 0.2),
    0 0 10px rgba(59, 130, 246, 0.3);
}

.stats {
  font-family: "Courier New", monospace;
  font-size: 1em;
  text-align: center;
  color: #cbd5e1;
}

.stat-label {
  color: #94a3b8;
  font-weight: bold;
}

.stat-value {
  color: #60a5fa;
  font-weight: bold;
  font-size: 1.2em;
  text-shadow: 0 0 5px rgba(96, 165, 250, 0.5);
}

.stat-value.negative {
  color: #f87171;
}

.section {
  margin-bottom: 25px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.4);
  border: 3px solid #3b82f6;
  border-style: double;
  border-radius: 0;
  box-shadow: inset 0 0 15px rgba(59, 130, 246, 0.2),
    0 0 10px rgba(59, 130, 246, 0.2);
}

.section p {
  margin-bottom: 15px;
  color: #cbd5e1;
  line-height: 1.7;
}

.section strong {
  font-weight: bold;
  color: #e2e8f0;
}

#actionsGrid {
  margin-top: 15px;
}

.action-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: rgba(30, 41, 59, 0.6);
  border: 3px solid #3b82f6;
  border-style: double;
  border-radius: 0;
  padding: 15px;
  margin-bottom: 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 1em;
  color: #cbd5e1;
  transition: all 0.15s;
  box-shadow: 0 0 0 2px #1e40af, 0 4px 8px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.action-btn::before {
  content: "▶";
  position: absolute;
  left: 10px;
  opacity: 0;
  transition: opacity 0.2s;
  color: #60a5fa;
}

.action-btn:hover {
  background: rgba(59, 130, 246, 0.3);
  border-color: #60a5fa;
  transform: translateX(5px) translateY(-2px);
  box-shadow: 0 0 0 2px #1e40af, 0 6px 12px rgba(59, 130, 246, 0.4),
    0 0 20px rgba(96, 165, 250, 0.3);
  color: #e2e8f0;
}

.action-btn:hover::before {
  opacity: 1;
}

.action-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.action-title {
  font-weight: bold;
  margin-bottom: 8px;
  color: #60a5fa;
  font-size: 1.1em;
  text-shadow: 0 0 5px rgba(96, 165, 250, 0.5);
  padding-left: 20px;
}

.action-btn:hover .action-title {
  color: #93c5fd;
  text-shadow: 0 0 10px rgba(147, 197, 253, 0.8);
}

.action-description {
  color: #94a3b8;
  font-size: 0.95em;
  line-height: 1.6;
}

.action-effects {
  display: none;
}

.event-card {
  margin-bottom: 25px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.3);
  border: 3px solid #3b82f6;
  border-style: double;
  border-radius: 0;
  box-shadow: inset 0 0 15px rgba(59, 130, 246, 0.2),
    0 0 10px rgba(59, 130, 246, 0.2);
}

.event-text {
  margin-bottom: 20px;
  line-height: 1.8;
  color: #cbd5e1;
  font-size: 1.05em;
  padding: 15px;
  background: rgba(0, 0, 0, 0.3);
  border-left: 5px solid #60a5fa;
  border-style: double;
  box-shadow: inset 0 0 10px rgba(96, 165, 250, 0.1);
}

.event-choices {
  margin-top: 15px;
}

.event-choice {
  display: block;
  width: 100%;
  text-align: left;
  background: rgba(30, 41, 59, 0.5);
  border: 2px solid #3b82f6;
  border-radius: 0;
  padding: 12px 15px;
  margin-bottom: 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95em;
  color: #cbd5e1;
  transition: all 0.15s;
  box-shadow: 0 0 0 1px #1e40af, 0 2px 4px rgba(0, 0, 0, 0.3);
  position: relative;
  padding-left: 30px;
}

.event-choice::before {
  content: "○";
  position: absolute;
  left: 10px;
  color: #60a5fa;
  font-size: 0.8em;
}

.event-choice:hover {
  background: rgba(59, 130, 246, 0.3);
  border-color: #60a5fa;
  transform: translateX(8px);
  color: #e2e8f0;
  box-shadow: 0 0 0 1px #1e40af, 0 4px 8px rgba(59, 130, 246, 0.4),
    0 0 15px rgba(96, 165, 250, 0.3);
}

.event-choice:hover::before {
  content: "●";
  color: #93c5fd;
}

.event-choice:active {
  transform: translateX(2px);
}

.event-choice-effects {
  display: none;
}

.event-feedback {
  margin-top: 15px;
  padding: 12px 15px;
  background: rgba(59, 130, 246, 0.15);
  border: 2px solid #60a5fa;
  border-style: double;
  border-radius: 0;
  color: #cbd5e1;
  font-style: italic;
  line-height: 1.6;
  animation: fadeIn 0.3s ease-in;
  box-shadow: inset 0 0 10px rgba(96, 165, 250, 0.2),
    0 0 10px rgba(59, 130, 246, 0.2);
}

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

.summary-content {
  margin-bottom: 20px;
  line-height: 1.8;
  color: #cbd5e1;
  padding: 15px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.perspective-box {
  margin: 25px 0;
  padding: 20px;
  background: rgba(0, 0, 0, 0.4);
  border: 3px solid #3b82f6;
  border-style: double;
  border-left: 5px solid #60a5fa;
  border-radius: 0;
  box-shadow: inset 0 0 15px rgba(59, 130, 246, 0.2),
    0 0 10px rgba(59, 130, 246, 0.2);
}

.perspective-box p {
  margin-bottom: 15px;
  line-height: 1.7;
  color: #cbd5e1;
}

.perspective-box p:last-child {
  margin-bottom: 0;
}

.perspective-box strong {
  color: #e2e8f0;
}

.btn {
  background: #1e40af;
  color: #e2e8f0;
  border: 3px solid #60a5fa;
  border-style: double;
  padding: 12px 30px;
  font-family: inherit;
  font-size: 1em;
  cursor: pointer;
  transition: all 0.15s;
  border-radius: 0;
  box-shadow: 0 0 0 2px #3b82f6, 0 4px 8px rgba(0, 0, 0, 0.4);
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
}

.btn:hover {
  background: #3b82f6;
  border-color: #93c5fd;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 0 0 2px #3b82f6, 0 6px 12px rgba(59, 130, 246, 0.5),
    0 0 20px rgba(96, 165, 250, 0.4);
  text-shadow: 0 0 10px rgba(226, 232, 240, 0.8);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

#contractScreen {
  text-align: center;
}

.contract-content {
  text-align: left;
  padding: 20px;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid #334155;
  border-radius: 4px;
  line-height: 1.8;
}

.contract-content p {
  margin-bottom: 15px;
  color: #cbd5e1;
}

.contract-content ul {
  margin: 15px 0;
  padding-left: 30px;
  color: #cbd5e1;
}

.contract-content li {
  margin-bottom: 8px;
}

.contract-signature {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 2px solid #334155;
  text-align: center;
}

#playerNameInput {
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid #334155;
  border-radius: 4px;
  padding: 12px 15px;
  font-family: inherit;
  font-size: 1em;
  color: #e2e8f0;
  width: 100%;
  max-width: 400px;
  margin-bottom: 15px;
  text-align: center;
}

#playerNameInput:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

#endScreen {
  margin-top: 40px;
  text-align: center;
}

#endScreen h2 {
  font-family: "Press Start 2P", cursive;
  font-size: 1.5em;
  font-weight: normal;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 3px solid #3b82f6;
  border-style: double;
  color: #60a5fa;
  text-shadow: 2px 2px 0px #3b82f6, 4px 4px 0px #1e40af,
    0 0 10px rgba(96, 165, 250, 0.5);
  letter-spacing: 2px;
}

.ending-text {
  margin-bottom: 25px;
  line-height: 1.8;
  font-size: 1.05em;
  color: #cbd5e1;
  padding: 20px;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid #334155;
  border-radius: 4px;
  text-align: left;
}

.ratemyta-reviews {
  margin: 25px 0;
  padding: 20px;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid #334155;
  border-radius: 4px;
  text-align: left;
}

.ratemyta-header {
  border-bottom: 2px solid #334155;
  padding-bottom: 15px;
  margin-bottom: 20px;
}

.ratemyta-header h3 {
  font-size: 1.5em;
  font-weight: bold;
  margin-bottom: 5px;
  color: #e2e8f0;
}

.ratemyta-department {
  color: #94a3b8;
  font-size: 0.9em;
  margin-bottom: 15px;
}

.ratemyta-rating {
  font-size: 2em;
  font-weight: bold;
  color: #3b82f6;
  margin-bottom: 5px;
}

.rating-number {
  color: #3b82f6;
}

.rating-max {
  color: #94a3b8;
  font-size: 0.6em;
}

.ratemyta-subtitle {
  color: #94a3b8;
  font-size: 0.85em;
  margin-top: 5px;
}

.ratemyta-tags {
  margin: 20px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid #3b82f6;
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 0.85em;
  color: #cbd5e1;
}

.ratemyta-reviews-list {
  margin-top: 25px;
}

.ratemyta-reviews-list h4 {
  font-size: 1.2em;
  font-weight: bold;
  margin-bottom: 15px;
  color: #e2e8f0;
  border-bottom: 1px solid #334155;
  padding-bottom: 10px;
}

.review-item {
  padding: 15px 0;
  border-bottom: 1px solid #334155;
}

.review-item:last-child {
  border-bottom: none;
}

.review-header {
  display: flex;
  gap: 15px;
  margin-bottom: 8px;
}

.review-rating {
  font-weight: bold;
  color: #3b82f6;
  font-size: 1.1em;
}

.review-difficulty {
  color: #94a3b8;
  font-size: 0.9em;
}

.review-meta {
  display: flex;
  gap: 15px;
  margin-bottom: 10px;
  font-size: 0.9em;
  color: #94a3b8;
}

.review-text {
  line-height: 1.7;
  color: #cbd5e1;
  margin-bottom: 10px;
}

.review-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.review-tag {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid #3b82f6;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 0.8em;
  color: #94a3b8;
}

.stat-change {
  font-family: "Courier New", monospace;
  font-weight: normal;
}

.stat-change.positive {
  color: #a67c52;
}

.stat-change.negative {
  color: #8b5a2b;
}

/* Floating Item Decorations */
.floating-items {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.floating-item {
  position: absolute;
  cursor: pointer;
  pointer-events: auto; /* Enable interaction for hover */
  z-index: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.floating-item:hover {
  z-index: 1;
}

.floating-emoji {
  font-size: 1.5em;
  line-height: 1;
  filter: drop-shadow(2px 2px 0px rgba(0, 0, 0, 0.5))
    drop-shadow(0 0 8px rgba(96, 165, 250, 0.2));
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  display: block;
  animation: float 3s ease-in-out infinite;
  opacity: 0.4;
  transition: opacity 0.3s ease, filter 0.3s ease;
}

.floating-item:hover .floating-emoji {
  opacity: 1;
  filter: drop-shadow(2px 2px 0px rgba(0, 0, 0, 0.5))
    drop-shadow(0 0 20px rgba(96, 165, 250, 0.6));
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  25% {
    transform: translateY(-15px) rotate(5deg);
  }
  50% {
    transform: translateY(-10px) rotate(0deg);
  }
  75% {
    transform: translateY(-20px) rotate(-5deg);
  }
}

.item-tooltip {
  position: fixed;
  background: rgba(30, 41, 59, 0.98);
  border: 3px solid #60a5fa;
  border-style: double;
  border-radius: 0;
  padding: 12px 15px;
  color: #cbd5e1;
  font-size: 0.9em;
  z-index: 1000;
  pointer-events: none;
  box-shadow: 0 0 0 2px #1e40af, 0 4px 12px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(96, 165, 250, 0.4);
  max-width: 280px;
  min-width: 200px;
  text-align: center;
  font-style: italic;
  white-space: normal;
  word-wrap: break-word;
  line-height: 1.5;
}

.item-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(30, 41, 59, 0.98);
  border: 3px solid #60a5fa;
  border-style: double;
  border-radius: 0;
  padding: 15px 20px;
  color: #cbd5e1;
  z-index: 1000;
  box-shadow: 0 0 0 2px #1e40af, 0 4px 12px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(96, 165, 250, 0.4);
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
}

.item-notification.show {
  opacity: 1;
  transform: translateX(0);
}

.item-notification-emoji {
  font-size: 2em;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

.item-notification-text {
  font-family: "Press Start 2P", cursive;
  font-size: 0.7em;
  color: #60a5fa;
  text-shadow: 0 0 5px rgba(96, 165, 250, 0.5);
}

.items-empty {
  text-align: center;
  color: #94a3b8;
  font-style: italic;
  padding: 10px;
  font-size: 0.9em;
}

.event-auto-grant {
  margin-top: 15px;
  padding: 12px;
  background: rgba(59, 130, 246, 0.15);
  border: 2px solid #60a5fa;
  border-style: double;
  border-radius: 0;
  text-align: center;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  animation: fadeIn 0.3s ease-in;
}

.item-granted-emoji {
  font-size: 2em;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

.item-granted-text {
  font-size: 0.95em;
  color: #60a5fa;
  font-weight: bold;
}

@media (max-width: 600px) {
  body {
    padding: 15px 10px;
  }

  .container {
    padding: 20px;
  }

  h1 {
    font-size: 1.8em;
  }

  .stats {
    font-size: 0.9em;
  }

  .floating-emoji {
    font-size: 1.2em;
  }
}

/* Credits Footer */
.credits-footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 2px solid #334155;
  z-index: 100;
  font-size: 0.75em;
  color: #94a3b8;
  line-height: 1.6;
  pointer-events: none;
  text-align: center;
}

.credits-footer p {
  margin: 5px 0;
}

.credits-footer a {
  color: #60a5fa;
  text-decoration: none;
  pointer-events: auto;
  transition: color 0.2s ease, text-shadow 0.2s ease;
  border-bottom: 1px dotted rgba(96, 165, 250, 0.5);
}

.credits-footer a:hover {
  color: #93c5fd;
  text-shadow: 0 0 5px rgba(147, 197, 253, 0.5);
  border-bottom-color: rgba(147, 197, 253, 0.8);
}

@media (max-width: 600px) {
  .credits-footer {
    font-size: 0.65em;
    margin-top: 30px;
    padding-top: 15px;
  }
}
