:root {
    --bg-image: url('img/starry-night-pixel.png');
}
.day-theme {
    --bg-image: url('img/cloudy-day-pixel.png')
}

body {
    margin: 0;
    height: 100vh;
    background-image: var(--bg-image);
    background-size: 2048px 1024px;
    background-repeat: repeat;
    background-position: center;
    image-rendering: pixelated;
    font-family: 'Press Start 2P', cursive;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-image 0.5s ease-in-out;
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    50% { transform: translateX(10px); }
    75% { transform: translateX(-10px); }
    100% { transform: translateX(0); }
}

.eight-ball {
    width: 500px;
    height: 500px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    image-rendering: pixelated;
    background-image: url("img/8-ball-pixel.png");
    background-size: contain;
    background-repeat: no-repeat;
}

.shake {
    animation: shake 0.5s ease-in-out;
}
  
input {
    margin: 10px 0;
    width: 80%;
    padding: 8px;
    text-align: center;
    background-color: white;
    color: black;
    font-size: 14px;
    font-family: 'Press Start 2P', cursive;
    border: 3px solid #000;
    outline: none;
    image-rendering: pixelated;
}

button {
    margin: 10px 0;
    width: 80%;
    padding: 8px;
    text-align: center;
    background-color: #444;
    color: black;
    font-size: 14px;
    font-family: 'Press Start 2P', cursive;
    border: 3px solid #000;
    outline: none;
    image-rendering: pixelated;
}

#response{
    margin: 10px 0;
    width: 80%;
    padding: 8px;
    text-align: center;
    background-color: white;
    color: black;
    font-size: 14px;
    font-family: 'Press Start 2P', cursive;
    border: 3px solid #000;
    outline: none;
    image-rendering: pixelated;
    height: 50px;
    line-height: 50px;
    overflow: auto;
}

#theme-switch {
    position: fixed;
  bottom: 10px;
  right: 10px;
  cursor: pointer;
  border: 2px solid #fff;  /* width + style + color */
  border-radius: 5px;
  padding: 5px 10px;        /* add some padding so it’s easier to click */
  background-color: rgba(0,0,0,0.5); /* optional, makes it visible over backgrounds */
  color: #fff;              /* text color */
  font-family: 'Press Start 2P', cursive;
  user-select: none;
}

/* Toggle button in bottom-right corner */
#history-toggle {
  position: fixed;
  top: 10px;
  right: 10px;
  cursor: pointer;
  border: 2px solid #fff;
  border-radius: 5px;
  padding: 5px 8px;
  background-color: rgba(0,0,0,0.5);
  color: #fff;
  font-family: 'Press Start 2P', cursive;
  z-index: 100;
  user-select: none;
}

/* Hidden panel by default, slides in */
#history-panel {
  position: fixed;
  top: 50px;
  right: 10px;
  width: 300px;
  max-height: 800px;
  background-color: rgba(0,0,0,0.7);
  border: 2px solid #fff;
  border-radius: 5px;
  overflow-y: auto;
  padding: 10px;
  font-family: 'Press Start 2P', cursive;
  font-size: 12px;
  color: #fff;
  display: none; /* hidden until toggle */
  z-index: 99;
}

#history-panel ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#history-panel li {
  margin: 5px;
  background-color: rgba(0,0,0,0.5);
  padding: 3px;
  border: 1px solid #fff;
}

#voice-toggle {
  position: fixed;
  top: 10px;
  left: 10px;
  cursor: pointer;
  border: 2px solid #fff;
  border-radius: 5px;
  padding: 5px 8px;
  background-color: rgba(0,0,0,0.5);
  color: #fff;
  font-family: 'Press Start 2P', cursive;
  user-select: none;
  z-index: 100;
}
