/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

.container {
  max-width: 2000px;
  margin: 0 auto;
  padding: 20px;
}

h1 {
  color: #2c3e50;
  margin-bottom: 10px;
  font-size: 2.5em;
  text-align: center;
}

h1 + p {
  text-align: center;
  color: #7f8c8d;
  margin-bottom: 30px;
  font-size: 1.1em;
}

/* Table styles */
.table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: auto;
  margin-bottom: 30px;
  max-height: 70vh;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1600px;
}

thead {
  position: sticky;
  top: 0;
  background: #34495e;
  color: white;
  z-index: 10;
}

th,
td {
  padding: 16px 12px;
  text-align: left;
  border-bottom: 1px solid #ddd;
  vertical-align: middle;
}

th {
  font-weight: 600;
  font-size: 1em;
  white-space: nowrap;
}

/* Column widths - Improved for better usability */
th:nth-child(1),
td:nth-child(1) {
  width: 60px;
} /* Nr. */
th:nth-child(2),
td:nth-child(2) {
  width: 200px;
} /* Anzeigename */
th:nth-child(3),
td:nth-child(3) {
  width: 110px;
} /* TYP */
th:nth-child(4),
td:nth-child(4) {
  width: 220px;
} /* E-Mail-Adresse */
th:nth-child(5),
td:nth-child(5) {
  width: 100px;
} /* E-Mail */
th:nth-child(6),
td:nth-child(6) {
  width: 140px;
} /* Lokales Office */
th:nth-child(7),
td:nth-child(7) {
  width: 130px;
} /* Terminalserver */
th:nth-child(8),
td:nth-child(8) {
  width: 100px;
} /* Teams */
th:nth-child(9),
td:nth-child(9) {
  width: 120px;
} /* MS Access */
th:nth-child(10),
td:nth-child(10) {
  width: 100px;
} /* Visio */
th:nth-child(11),
td:nth-child(11) {
  width: 160px;
} /* Außenstelle */
th:nth-child(12),
td:nth-child(12) {
  width: 220px;
} /* Benötigte Lizenz */
th:nth-child(13),
td:nth-child(13) {
  width: 120px;
} /* Aktionen */

tbody tr:hover {
  background-color: #f8f9fa;
}

.row-number {
  text-align: center;
  font-weight: 600;
  background-color: #ecf0f1;
  color: #2c3e50;
}

/* Form controls */
input,
select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 15px;
  background: white;
  min-height: 20px;
}

input:focus,
select:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

input[type="email"] {
  font-size: 15px;
}

/* License result */
.license-result {
  font-weight: 600;
  color: #27ae60;
  text-align: center;
  background-color: #e8f5e8;
  border-radius: 6px;
  padding: 8px;
  font-size: 14px;
  line-height: 1.4;
}

/* Buttons */
.controls {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
  justify-content: center;
  flex-wrap: wrap;
}

button {
  padding: 14px 24px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-add {
  background-color: #27ae60;
  color: white;
}

.btn-add:hover {
  background-color: #229954;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(39, 174, 96, 0.3);
}

.btn-export {
  background-color: #f39c12;
  color: white;
}

.btn-export:hover {
  background-color: #e67e22;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(243, 156, 18, 0.3);
}

.btn-remove {
  background-color: #e74c3c;
  color: white;
  padding: 8px 16px;
  font-size: 14px;
}

.btn-remove:hover {
  background-color: #c0392b;
}

/* Summary section */
.summary {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 25px;
}

.summary h3 {
  color: #2c3e50;
  margin-bottom: 15px;
  border-bottom: 2px solid #3498db;
  padding-bottom: 10px;
}

#licenseSummary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.license-item {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 6px;
  border-left: 4px solid #3498db;
}

.license-item strong {
  color: #2c3e50;
  display: block;
  margin-bottom: 5px;
}

/* Responsive design */
@media (max-width: 768px) {
  .container {
    padding: 10px;
  }

  h1 {
    font-size: 2em;
  }

  .table-container {
    font-size: 12px;
  }

  th,
  td {
    padding: 10px 6px;
  }

  input,
  select {
    font-size: 14px;
    padding: 8px;
  }

  .controls {
    flex-direction: column;
    align-items: center;
  }

  button {
    width: 200px;
  }
}

/* Loading and success states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.success-message {
  background: #d4edda;
  color: #155724;
  padding: 15px;
  border-radius: 5px;
  margin: 15px 0;
  border: 1px solid #c3e6cb;
}

.error-message {
  background: #f8d7da;
  color: #721c24;
  padding: 15px;
  border-radius: 5px;
  margin: 15px 0;
  border: 1px solid #f5c6cb;
}

/* Steve Mode Button */
.steve-mode-container {
  display: flex;
  justify-content: center;
  margin-top: 40px;
  padding: 20px;
}

.steve-mode-btn {
  background: linear-gradient(
    45deg,
    #ff6b6b,
    #feca57,
    #48dbfb,
    #ff9ff3,
    #54a0ff
  );
  color: white;
  font-size: 18px;
  padding: 15px 30px;
  border: 3px solid #2f3542;
  border-radius: 15px;
  cursor: pointer;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  animation: rainbow-glow 2s infinite alternate;
}

.steve-mode-btn:hover {
  animation: rainbow-glow 0.5s infinite alternate;
  transform: scale(1.1);
}

@keyframes rainbow-glow {
  0% {
    box-shadow:
      0 0 10px #ff6b6b,
      0 0 20px #ff6b6b,
      0 0 30px #ff6b6b;
  }
  25% {
    box-shadow:
      0 0 10px #feca57,
      0 0 20px #feca57,
      0 0 30px #feca57;
  }
  50% {
    box-shadow:
      0 0 10px #48dbfb,
      0 0 20px #48dbfb,
      0 0 30px #48dbfb;
  }
  75% {
    box-shadow:
      0 0 10px #ff9ff3,
      0 0 20px #ff9ff3,
      0 0 30px #ff9ff3;
  }
  100% {
    box-shadow:
      0 0 10px #54a0ff,
      0 0 20px #54a0ff,
      0 0 30px #54a0ff;
  }
}
