body {
  background-color: #000;
  background-image: url('bloodsplatter.png');
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100dvh;
}

h1 {
  color: white;
  text-align: center;
  margin: 1rem 0;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1rem;
  box-sizing: border-box;
}

#deck {
  width: 100px;
  height: 150px;
  background: #222;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
  position: relative;
  flex-shrink: 0;
}
#deck.empty::after {
      content: 'Stapel';
      color: #bbb;
      font-size: 14px;
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      font-style: italic;
      opacity: 0.5;
      pointer-events: none;
    }

    .deck-layer {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      border-radius: 10px;
      border: 2px solid #222;
      background-size: cover;
      background-position: center;
      box-shadow: 2px 2px 6px rgba(0,0,0,0.3);
      pointer-events: none;
    }

#card-container {
  width: 100%;
  max-width: 480px;
  min-height: 200px;
  background: repeating-linear-gradient(to bottom, #f5f5dc, #f5f5dc 22px, #e0d8a0 22px, #e0d8a0 24px);
  border: 2px solid #bbaa77;
  box-shadow: 0 0 12px rgba(0,0,0,0.3);
  border-radius: 8px;
  padding: 1.5rem;
  box-sizing: border-box;
  position: relative; 
  font-family: 'Patrick Hand', cursive;
}

#card-container::before {
  content: "STORY #";
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  font-size: 0.75rem;
  color: #a00;
  font-family: monospace;
  letter-spacing: 1px;
  transform: rotate(5deg);
}

#card-container::after {
  content: "";
  position: absolute;
  top: 1rem;
  left: -8px;
  width: 8px;
  height: 8px;
  background: #666;
  border-radius: 50%;
  box-shadow: 0 40px #666, 0 80px #666;
}

#card-container.flip {
      animation: flipIn 0.6s ease-in-out;
    }

    @keyframes flipIn {
      0%   { transform: rotateY(90deg); opacity: 0; }
      100% { transform: rotateY(0deg); opacity: 1; }
    }


.title {
      text-shadow: red 3px 0 10px;
    }
.card-image {
      width: 100%;
      height: auto;
      aspect-ratio: 2 / 1;
      object-fit: cover;
      border-radius: 0.5rem;
      margin-bottom: 1rem;
      display: block;
    }


