/* Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: linear-gradient(135deg, #2e2577 0%, #240b91 100%);
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 900px;
  margin: 0 auto;
}

.hidden {
  display: none !important;
}

/* Login Box Styles */
.login-box {
  background: white;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  text-align: center;
  max-width: 400px;
  margin: 100px auto;
}

.login-box h1 {
  color: #333;
  margin-bottom: 10px;
  font-size: 24px;
}

.login-box p {
  color: #666;
  margin-bottom: 20px;
}

.login-box input {
  width: 100%;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
  margin-bottom: 15px;
}

.login-box input:focus {
  border-color: #667eea;
  outline: none;
}

.login-box button,
#add-translator-form button {
  background: #667eea;
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s;
}

.login-box button:hover,
#add-translator-form button:hover {
  background: #5568d3;
}

/* Main Application Styles */
header {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

header h1 {
  color: #333;
  font-size: 24px;
}

.btn-secondary {
  background: #666;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 5px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-secondary:hover {
  background: #555;
}

/* Add Translator Section */
.add-translator-section {
  background: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.add-translator-section h2 {
  color: #333;
  margin-bottom: 15px;
  font-size: 18px;
}

#add-translator-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 10px;
  align-items: end;
}

#add-translator-form input,
#add-translator-form select {
  padding: 10px;
  border: 2px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
}

#add-translator-form input:focus,
#add-translator-form select:focus {
  border-color: #667eea;
  outline: none;
}

/* Translators List Section */
.translators-section {
  background: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.translators-section h2 {
  color: #333;
  margin-bottom: 15px;
  font-size: 18px;
}

#translators-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.translator-card {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.translator-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.translator-status {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-light {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ccc;
}

.status-light.connected {
  background: #28a745;
}

.status-light.speaking {
  background: #ffc107;
}

.status-label {
  font-size: 12px;
  color: #666;
}

.translator-details h3 {
  color: #333;
  font-size: 16px;
  margin-bottom: 5px;
}

.language-pair {
  color: #666;
  font-size: 14px;
}

.translator-link {
  color: #667eea;
  font-size: 12px;
  margin-top: 5px;
  cursor: pointer;
}

.translator-link:hover {
  text-decoration: underline;
}

.translator-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-delete {
  background: #dc3545;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 5px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-delete:hover {
  background: #c82333;
}

.error {
  color: #dc3545;
  font-size: 14px;
  margin-top: 10px;
  text-align: center;
}

#no-translators {
  text-align: center;
  color: #666;
  padding: 30px;
}

/* Responsive Design */
@media (max-width: 768px) {
  #add-translator-form {
    grid-template-columns: 1fr;
  }

  .translator-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .translator-actions {
    width: 100%;
    justify-content: space-between;
  }
}