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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #f2f2f2 0%, #4b4a4b 100%);
  min-height: 100vh;
  padding: 20px;
}

nav {
  background: rgba(255, 255, 255, 0.95);
  padding: 15px 30px;
  border-radius: 12px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

nav h1 {
  font-size: 22px;
  color: #7c1331;
}

nav a {
  color: #7c1331;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 6px;
  transition: all 0.3s;
  margin-left: 10px;
}

nav a:hover {
  background: #7c1331;
  color: white;
}

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

/* API Key Card */
#keyCard {
  background: white;
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  max-width: 500px;
  margin: 100px auto;
  text-align: center;
}

#keyCard h2 {
  color: #7c1331;
  margin-bottom: 10px;
}

#keyCard p {
  color: #666;
  margin-bottom: 20px;
}

#keyCard input {
  width: 100%;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  margin-bottom: 15px;
  transition: border-color 0.3s;
}

#keyCard input:focus {
  outline: none;
  border-color: #7c1331;
}

#keyCard button {
  width: 100%;
  padding: 12px;
  background: #7c1331;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s;
}

#keyCard button:hover {
  background: #5568d3;
}

.header {
  background: white;
  border-radius: 12px;
  padding: 20px 30px;
  margin-bottom: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header h2 {
  color: #7c1331;
  font-size: 28px;
}

.header button {
  padding: 10px 20px;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
}

.header button:hover {
  background: #c82333;
}

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

.metric-card {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.metric-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.metric-card h3 {
  color: #7c1331;
  font-size: 16px;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.metric-value {
  font-size: 36px;
  font-weight: bold;
  color: #333;
  margin-bottom: 10px;
}

.metric-label {
  color: #666;
  font-size: 14px;
}

.status-ok {
  color: #28a745;
}

.status-error {
  color: #dc3545;
}

.status-warning {
  color: #ffc107;
}

.refresh-info {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  color: #666;
  font-size: 14px;
  margin-top: 20px;
}

.refresh-btn {
  background: #7c1331;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  margin-top: 10px;
  transition: background 0.3s;
}

.refresh-btn:hover {
  background: #5568d3;
}

/* Button Row Layout */
.button-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.button-row #login,
.button-row #register {
  margin: 0;
}

.password-toggle {
  background: transparent;
  border: 1px solid rgba(124, 19, 49, 0.2);
  border-radius: 8px;
  cursor: pointer;
  padding: 8px 10px;
  font-size: 16px;
  color: rgba(124, 19, 49, 0.7);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.password-toggle:hover {
  background: rgba(124, 19, 49, 0.05);
  border-color: rgba(124, 19, 49, 0.4);
  color: #7c1331;
  transform: scale(1.05);
}

.password-toggle:active {
  transform: scale(0.98);
}

.password-toggle:focus {
  outline: 2px solid rgba(124, 19, 49, 0.3);
  outline-offset: 2px;
}
