/* === Basis-Layout === */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #fdf6e3;
  color: #2e2e2e;
  margin: 0;
  padding: 1.5rem;
}

/* === Header / Titel === */
h1, h2, h3 {
  color: #d62828;
  margin-top: 0;
}

a {
  color: #0077cc;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* === Haupt-Container === */
.container {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 0 12px rgba(0,0,0,0.1);
  max-width: 1000px;
  margin: 0 auto;
}

/* === Formular-Design === */
form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

input[type="text"],
input[type="number"],
select {
  padding: 6px 10px;
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  width: 100%;
}

/* === Karten-Zeile (z. B. Pokémon, Trainer, Energie) === */
.card-entry {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1rem;
    max-width: 100%;
}

.card-amount {
  width: 60px;
  flex-shrink: 0;
}

.card-name {
  flex: 1;
  min-width: 180px;
  position: relative;
  display: flex;
  flex-direction: column;
}

.input-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  align-items: flex-start;
}

 .suggestion-box {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: white;
            border: 1px solid #ccc;
            z-index: 1000;
            max-height: 200px;
            overflow-y: auto;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        }
        .suggestion-item {
            padding: 8px;
            cursor: pointer;
        }
        .suggestion-item:hover {
            background-color: #f0f0f0;
        }
        .suggestion-meta {
            font-size: 0.8em;
            color: #555;
        }

.card-name input {
  width: 100%;
}

.card-set {
  width: 80px;
  flex-shrink: 0;
}

.card-number {
  width: 60px;
  flex-shrink: 0;
}

.card-regulation {
  width: 40px;
  flex-shrink: 0;
  text-transform: uppercase;
  text-align: center;
}

/* === Buttons === */
button, .remove-card {
  background-color: #ffcb05; /* Pikachu-Gelb */
  border: 1px solid #2a75bb; /* Pokémon-Blau */
  color: #2a2a2a;
  font-weight: bold;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
}

button:hover, .remove-card:hover {
  background-color: #ffe066;
}

/* Kleiner + Button */
.add-btn {
  padding: 0 10px;
  height: 38px;
  font-size: 1.2rem;
  background-color: #4caf50;
  color: white;
  border: none;
  cursor: pointer;
}

.add-btn:hover {
  background-color: #388e3c;
}


/* === Entfernen-Button für Kartenzeile === */
.remove-card {
  font-size: 16px;
  line-height: 1;
}

/* === Fehlermeldung oder Hinweise === */
.alert {
  background: #ffdddd;
  color: #900;
  padding: 0.75rem 1rem;
  border-left: 4px solid #e60000;
  border-radius: 6px;
  margin-bottom: 1rem;
}

/* === Fortschrittsanzeige === */

.progress-fill {
  height: 100%;
  background-color: #2a75bb;
  width: 0%;
  transition: width 0.3s ease;
  color: white;
  text-align: center;
  line-height: 24px;
}

/* === Kategorie-Überschriften === */
.category-title {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  border-left: 5px solid #2a75bb;
  padding-left: 0.5rem;
  color: #2a75bb;
}

/* === Responsives Verhalten === */
@media (max-width: 768px) {
  .card-row {
    flex-direction: column;
  }

  .card-name {
    min-width: unset;
  }
}
.card-progress-wrapper {
    margin: 1rem 0;
    width: 100%;
    max-width: 400px;
}

#cardCount {
    font-weight: bold;
    margin-bottom: 0.3rem;
    font-size: 1.1em;
    text-align: left;
    color: #333;
}

.progress-bar {
    width: 100%;
    height: 18px;
    background-color: #e0e0e0;
    border-radius: 9px;
    overflow: hidden;
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.2);
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
    background-color: #ffc107; /* default: gelb */
    border-radius: 9px 0 0 9px;
}



/* === Deckabschnitt mit Tabelle === */
.deck-section {
    margin-bottom: 2rem;
    background: #fff;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.05);
}

.deck-section h2 {
    margin-bottom: 1rem;
    color: #2a75bb;
}

/* === Eingabezeile über der Tabelle === */
.input-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.input-row input[type="text"],
.input-row input[type="number"] {
    flex: 1;
    min-width: 100px;
}

/* Autocomplete-Suggestionbox bleibt wie bisher */

.input-row button {
    flex-shrink: 0;
    height: 36px;
}

/* === Tabellenlayout === */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

table thead th {
    background-color: #2a75bb;
    color: white;
    text-align: left;
    padding: 8px;
    border-radius: 6px 6px 0 0;
}

table tbody td {
    padding: 6px 10px;
    border-bottom: 1px solid #ddd;
}

/* === Aktionen (Bearbeiten, Löschen) === */
.edit-btn, .delete-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 4px 6px;
}

.edit-btn:hover {
    color: #0077cc;
}

.delete-btn:hover {
    color: #d62828;
}
