:root,
body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background-color: #f5f5f5;
}

main {
  padding: 20px;
}

main.login-page .container {
  max-width: 400px;
  margin: 100px auto;
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1 {
  text-align: center;
  color: #333;
  margin-bottom: 30px;
}

.header {
  background: white;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header h1 {
  margin: 0;
  color: #333;
}

.user-info {
  color: #6c757d;
  margin-top: 5px;
}

.logout {
  float: right;
  background: #dc3545;
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 4px;
}

.logout:hover {
  background: #c82333;
}

.content {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

th,
td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #dee2e6;
}

th {
  background-color: #f8f9fa;
  font-weight: 600;
  word-break: keep-all;
  white-space: nowrap;
}

.btn-group .btn {
  width: 100px;
  max-width: 164px;
}

.btn {
  margin: 2px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  font-size: 12px;
}

.btn-primary {
  background: #007bff;
  color: white;
}

.btn-danger {
  background: #dc3545;
  color: white;
}

.btn-success {
  background: #28a745;
  color: white;
}

.btn:hover {
  opacity: 0.8;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-link {
  display: inline-block;
  padding: 0;
  margin: 0;
  text-decoration: none;
}

button {
  width: 100%;
  padding: 6px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}

button:hover {
  background-color: #0056b3;
}

button:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
}

.status-whitelist {
  background: #d4edda;
  color: #155724;
}

.status-badge {
  font-size: 12px;
  word-break: keep-all;
}

.status-normal {
  background: #f8d7da;
  color: #721c24;
}

.status-creator {
  background: #d1ecf1;
  color: #0c5460;
}

.status-player {
  background: #d4edda;
  color: #155724;
}

.empty-state {
  text-align: center;
  padding: 40px;
  color: #6c757d;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.stat-card {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.stat-number {
  font-size: 2em;
  font-weight: bold;
  color: #007bff;
}

.stat-label {
  color: #6c757d;
  margin-top: 5px;
}

.tabs {
  display: flex;
  margin-bottom: 20px;
}

.tab-button {
  background: #e9ecef;
  border: none;
  padding: 10px 20px;
  margin-right: 5px;
  cursor: pointer;
  border-radius: 4px 4px 0 0;
}

.tab-button.active {
  background-color: #007bff;
}

.tab-content {
  background: white;
  padding: 20px;
  border-radius: 0 8px 8px 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading-indicator {
  display: none;
  margin-left: 5px;
}

.loading-indicator.show {
  display: inline-block;
}

.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 5px;
  color: #555;
}

input[type='text'],
input[type='password'] {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
}

.error {
  color: #dc3545;
  margin-top: 10px;
  padding: 10px;
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
}

.info {
  color: #6c757d;
  font-size: 14px;
  margin-top: 15px;
}

.success {
  color: #155724;
  margin-top: 10px;
  padding: 10px;
  background: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: 4px;
}

@media (max-width: 768px) {
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 700px;
    font-size: 14px;
  }

  .admin-page table {
    min-width: 800px;
  }

  th,
  td {
    padding: 8px 6px;
    white-space: nowrap;
  }

  .btn {
    padding: 4px;
    font-size: 11px;
    margin: 1px;
  }

  .mobile-card-view table,
  .mobile-card-view thead,
  .mobile-card-view tbody,
  .mobile-card-view th,
  .mobile-card-view td,
  .mobile-card-view tr {
    display: block;
  }

  .mobile-card-view thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  .mobile-card-view tr {
    background: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    margin-bottom: 10px;
    padding: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }

  .mobile-card-view td {
    border: none;
    border-bottom: 1px solid #eee;
    position: relative;
    padding-left: 50% !important;
    padding-top: 8px;
    padding-bottom: 8px;
    white-space: normal;
  }

  .mobile-card-view td:before {
    content: attr(data-label) ': ';
    position: absolute;
    left: 6px;
    width: 45%;
    padding-right: 10px;
    white-space: nowrap;
    font-weight: bold;
    color: #333;
  }

  .mobile-card-view td:last-child {
    border-bottom: 0;
  }
}
