:root {
  --icon-width: 480px;
  --icon-height: 480px;
  --num-icons: 9;
  --highlight-color: #fff;
  --highlight-brightness: 150%;
  --highlight-width: 4px;
  --winning-flash-duration: 7s;
  
  /* Neon-Farben */
  --neon: #48D1CC;
  --neon-glow: #48D1CC;
}

html, body {
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background: linear-gradient(45deg, grey 0%, lightgray 100%);
  background-image: url(https://i.imgur.com/hTFuMBQ.jpeg);
  background-size: 4%;
  backdrop-filter: invert(100%);
  position: relative;
}

.slots {
  position: relative;
  width: calc(3 * var(--icon-width));
  height: calc(3 * var(--icon-height));
  display: flex;
  justify-content: space-between;
  padding: 0;
  background: transparent;
  border-radius: 3px;
}

.reel {
  position: relative;
  width: var(--icon-width);
  height: calc(3 * var(--icon-height));
  border: 1px solid rgba(0, 0, 0, 0.3);
  border-radius: 3px;
  overflow: hidden;
  background-image: url('https://i.imgur.com/YpuQiaZ.png');
  background-position: 0 0;
  background-repeat: repeat-y;
}

.reel::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(
    rgba(0, 0, 0, 0.4) 0%,
    transparent 30%,
    transparent 70%,
    rgba(0, 0, 0, 0.4) 100%
  );
  box-shadow: inset 0 0 6px 2px rgba(0, 0, 0, 0.3);
}

.start-button {
  position: absolute;
  bottom: 30px;
  padding: 10px 20px;
  font-size: 1.8rem;
  font-family: none;
  color: black;
  background: transparent;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
  z-index: 10;
  border: none;
  outline: none;
}

.start-button:hover {
  background: black;
  color: white;
}

.start-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.debug {
  position: absolute;
  bottom: 100px;
  font-size: 1.2rem;
  padding: 2px 6px;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.3);
  font-family: monospace;
  z-index: 10;
}

p {
  position: absolute;
  bottom: 0;
  left: -110%;
  width: 100%;
  text-align: center;
  font-size: 0.80rem;
  color: #444;
}

a {
  color: red;
  font-weight: 700;
}

.win3 {
  position: relative;
  border: none !important;
}

.slots.win3 .winning-overlay {
  position: absolute;
  top: calc(50% - var(--icon-height) / 2);
  left: 0;
  width: 100%;
  height: var(--icon-height);
  display: none;
  cursor: pointer;
  z-index: 5;
  border: var(--highlight-width) solid var(--highlight-color);
  filter: brightness(var(--highlight-brightness));
}

.slots.win3 .winning-overlay {
  display: block;
}

.reel.clickable {
  cursor: pointer;
}

.reel.clickable:hover::after {
  box-shadow: inset 0 0 10px var(--highlight-color);
  filter: brightness(150%);
}

.reel.clickable:hover {
  border: var(--highlight-width) solid var(--highlight-color);
}

/* Popup-Styling */
.popup {
  display: flex;
  position: fixed;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: transparent;
  padding: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 100;
  width: 200px;
  height: 200px;
  text-align: center;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s, opacity 0.5s ease;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.popup:target {
  display: flex;
  visibility: visible;
  opacity: 1;
}

.popup-download {
  padding: 5px 5px;
  font-size: 1.2rem;
  top: 0px;
  left: 0px;
  font-family: Futura Bold font, sans-serif;
  color: black;
  background: transparent;
  border: 2px solid black;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
  z-index: 10;
  text-decoration: none;
}

.popup-title {
  text-align: center;
  color: black;
  font-family: Futura Bold font, sans-serif;
  font-size: 1.5rem;
  filter: 
    drop-shadow(0 0 30px white)
    drop-shadow(0 0 20px white);
}

.popup-download:hover {
  background: black;
  color: white;
  filter: 
    drop-shadow(0 0 10px white)
    drop-shadow(0 0 20px white)
    drop-shadow(0 0 30px white);
}

.popup-close {
  position: absolute;
  top: 30px;
  left: 15px;
  font-size: 3rem;
  cursor: pointer;
  color: black;
  background: transparent;
  border: none;
  font-weight: bold;
  text-decoration: none;
  filter: 
    drop-shadow(0 0 10px white)
    drop-shadow(0 0 20px white)
    drop-shadow(0 0 30px white);
}

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

.tooltip {
  position: absolute;
  top: 80px;
  left: 75%;
  transform: translateX(-50%);
  background: transparent;
  color: black;
  font-family: Futura Bold font, sans-serif;
  font-size: 1.5rem;
  padding: 10px 15px;
  border-radius: 5px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out;
  white-space: nowrap;
  z-index: 20;
  filter: 
    drop-shadow(0 0 10px white)
    drop-shadow(0 0 20px white)
    drop-shadow(0 0 30px white);
}

/* SVG Styles */
img[src="bilder/text.svg"] {
  width: 650px;
  height: auto;
  display: block;
  position: absolute;
  top: 25px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  background: transparent;
  filter: 
    drop-shadow(0 0 10px black)
    drop-shadow(0 0 20px black)
    drop-shadow(0 0 30px black);
}

img[src="bilder/start.svg"] {
  width: 250px;
  height: auto;
  display: block;
  position: absolute;
  top: 650px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  background: transparent;
  filter: 
    drop-shadow(0 0 10px black)
    drop-shadow(0 0 20px black)
    drop-shadow(0 0 30px black);
}

/* Theme toggle styles */
/* Theme toggle styles */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 150px;
  height: 150px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  background: transparent;
  border: none;
  pointer-events: all;
}

.theme-toggle img[src="bilder/stern.svg"] {
  width: 150px;
  height: auto;
  pointer-events: none;
  filter: 
    drop-shadow(0 0 10px black)
    drop-shadow(0 0 20px black)
    drop-shadow(0 0 30px black);
  transition: filter 0.3s ease, transform 0.3s ease;
}

.theme-toggle:hover img[src="bilder/stern.svg"] {
  transform: scale(1.2);
  filter: 
    drop-shadow(0 0 10px white)
    drop-shadow(0 0 20px white)
    drop-shadow(0 0 30px white)
    drop-shadow(0 0 40px white)
    drop-shadow(0 0 50px white)
    drop-shadow(0 0 60px white)
    drop-shadow(0 0 70px white)
    drop-shadow(0 0 80px white)
    brightness(1.5)
    contrast(1.2);
}

.theme-toggle.active img[src="bilder/stern.svg"] {
  filter: 
    drop-shadow(0 0 10px white)
    drop-shadow(0 0 20px white)
    drop-shadow(0 0 30px white);
}

/* Grayscale functionality */
body.grayscale {
  background-blend-mode: luminosity;
  filter: contrast(200%) grayscale(150%);

}

/* Ensure elements aren't affected by filters */
.popup, 
.reel,
.slots,
.start-button, 
.debug {
  filter: none !important;
}


@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

.win3 {
    animation: blink 0.3s infinite alternate;
}
