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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f0f4f8;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

h1 {
  margin-bottom: 20px;
  color: #333;
}

#card-container {
  perspective: 1000px;
  width: 90vw;
  max-width: 400px;
  height: 250px;
  margin-bottom: 20px;
  cursor: pointer;
}

#card {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.6s;
  transform-style: preserve-3d;
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  background: white;
}

#card.flip {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  padding: 20px;
  backface-visibility: hidden;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
}

#card-front {
  background: #fff;
  color: #222;
  font-weight: 600;
}

#card-back {
  background: #007bff;
  color: white;
  transform: rotateY(180deg);
  font-weight: 600;
}

.card-text {
  font-size: 1rem;
  line-height: 1.4;
  text-align: center;
  word-wrap: break-word;
}

button {
  padding: 12px 24px;
  margin: 0 8px;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  background: #007bff;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s;
  user-select: none;
}

button:hover {
  background: #0056b3;
}

#button-container {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 400px;
}

/* Themen-Filter */
#filter-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-top: 24px;
  padding-top: 12px;
  border-top: 1px solid #ccc;
  max-width: 400px;
  width: 90vw;
  font-size: 1rem;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

@media (max-width: 400px) {
  #card-container {
    height: 200px;
  }

  .card-text {
    font-size: 0.9rem;
  }

  button {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
}