body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  font-family: Arial, sans-serif;
  background-color: #f0f0f0;
  margin: 0;
  transition: opacity 1s ease-in-out;
}

body.dark-mode {
  background-color: #121212;
  color: #ffffff;
}

.container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  gap: 20px;
}

.main-content {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.calculator {
  background-color: #333;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  width: 300px;
}

body.dark-mode .calculator {
  background-color: #1e1e1e;
}

.display {
  background-color: #fff;
  color: #000;
  text-align: right;
  padding: 10px;
  font-size: 24px;
  margin-bottom: 10px;
  border-radius: 5px;
}

body.dark-mode .display {
  background-color: #333;
  color: #fff;
}

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

.buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

button {
  background-color: #666;
  color: white;
  border: none;
  padding: 15px;
  font-size: 18px;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.2s;
}

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

.operator {
  background-color: #f4a460;
}

.clear {
  grid-column: span 2;
  background-color: #ff6347;
}

.equals {
  background-color: #4CAF50;
}

.ai-response {
  background-color: #444;
  color: white;
  text-align: center;
  padding: 10px;
  font-size: 16px;
  margin-bottom: 10px;
  border-radius: 5px;
  min-height: 20px;
}

.divide-by-zero-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: white;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.divide-by-zero-overlay.active {
  display: flex;
  opacity: 1;
}

.divide-by-zero-content {
  text-align: center;
  max-width: 600px;
  padding: 20px;
  background-color: #f0f0f0;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.divide-by-zero-content h1 {
  color: #333;
  font-size: 2.5em;
  margin-bottom: 20px;
}

.divide-by-zero-content p {
  color: #666;
  font-size: 1.5em;
  margin-bottom: 20px;
}

.math-explanation {
  color: #444;
  font-size: 1.2em;
  line-height: 1.6;
}

.anger-meter-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.anger-meter {
  width: 30px;
  height: 300px;
  background-color: #ddd;
  border-radius: 15px;
  overflow: hidden;
  position: relative;
}

.anger-meter-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, #ff6347, #ff4500, #8b0000);
  transition: height 0.3s ease;
}

.anger-meter-label {
  margin-top: 10px;
  font-weight: bold;
  color: #333;
}

.chat-container {
  background-color: #444;
  border-radius: 10px;
  width: 300px;
  height: 400px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.dark-mode .chat-container {
  background-color: #2a2a2a;
}

.chat-box {
  flex-grow: 1;
  overflow-y: auto;
  padding: 10px;
  background-color: #333;
  color: white;
}

.chat-input-area {
  display: flex;
  padding: 10px;
  background-color: #222;
}

body.dark-mode .chat-input-area {
  background-color: #1a1a1a;
}

#chat-input {
  flex-grow: 1;
  padding: 10px;
  background-color: #555;
  color: white;
  border: none;
  border-radius: 5px;
  margin-right: 10px;
}

body.dark-mode #chat-input {
  background-color: #444;
  color: #fff;
}

#chat-send {
  background-color: #4CAF50;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
}

.user-message, .ai-message {
  margin-bottom: 10px;
  padding: 8px;
  border-radius: 5px;
  max-width: 80%;
}

.user-message {
  background-color: #555;
  align-self: flex-end;
  margin-left: auto;
}

.ai-message {
  background-color: #666;
  align-self: flex-start;
}

.easter-egg-spoiler {
  position: absolute;
  top: 10px;
  left: 10px;
}

#reveal-easter-eggs {
  background-color: #333;
  color: white;
  border: none;
  padding: 10px;
  cursor: pointer;
  border-radius: 5px;
}

.easter-egg-list {
  display: none;
  background-color: #444;
  color: white;
  padding: 15px;
  border-radius: 5px;
  margin-top: 10px;
  max-width: 250px;
}

.easter-egg-list.visible {
  display: block;
}

.easter-egg-list ul {
  padding-left: 20px;
  list-style-type: disc;
}

.easter-egg-list li {
  margin-bottom: 5px;
}

.vanish {
  opacity: 1;
  transition: opacity 1s ease-in-out;
}

.vanish.disappeared {
  opacity: 0;
}

.nothing-message {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #666;
}

.nothing-message.visible {
  display: block;
}

.theme-toggle {
  position: fixed;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #2196F3;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.keyboard-shortcuts {
  position: fixed;
  bottom: 10px;
  left: 10px;
  background-color: rgba(0,0,0,0.7);
  color: white;
  padding: 10px;
  border-radius: 5px;
  display: none;
}

.keyboard-shortcuts ul {
  list-style-type: none;
  padding: 0;
}

.keyboard-shortcuts li {
  margin-bottom: 5px;
}

@keyframes police-lights {
  0%, 33% {
    background-color: rgba(0, 0, 255, 0.3);
    box-shadow: 0 0 40px rgba(0, 0, 255, 0.6);
  }
  66%, 100% {
    background-color: rgba(255, 0, 0, 0.3);
    box-shadow: 0 0 40px rgba(255, 0, 0, 0.6);
  }
}

.police-lights {
  animation: police-lights 1s infinite;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}