/* --- Flash Messages --- */
.flash-messages {
  width: 100%;
  max-width: 960px;
  margin: 1.5rem auto 0;
  padding: 0 20px;
  box-sizing: border-box;
}
.flash-message {
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  font-weight: 500;
}
.flash-success {
  background-color: rgba(37, 161, 98, 0.1);
  color: #2ecc71;
  border: 1px solid rgba(46, 204, 113, 0.2);
}
.flash-danger {
  background-color: rgba(231, 76, 60, 0.1);
  color: #e74c3c;
  border: 1px solid rgba(231, 76, 60, 0.2);
}
.flash-info {
  background-color: rgba(52, 152, 219, 0.1);
  color: #3498db;
  border: 1px solid rgba(52, 152, 219, 0.2);
}

/* --- Main Content Padding --- */
.main-content {
  padding-top: 100px; /* Increased to account for fixed navbar */
}

/* --- Auth Forms --- */
.auth-container {
  max-width: 450px;
  margin: 120px auto 4rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
}
.auth-form h2 {
  text-align: center;
  color: #fff;
  margin-bottom: 1.5rem;
}
.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-color);
}
.form-group input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-color);
  font-family: "Poppins", sans-serif;
}
.form-group input:focus {
  outline: none;
  border-color: var(--secondary-color);
}
.auth-button {
  width: 100%;
  padding: 0.85rem;
  border: none;
  border-radius: 8px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}
.auth-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(37, 117, 252, 0.4);
}
.auth-switch {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--text-color);
}
.auth-switch a {
  color: var(--secondary-color);
  font-weight: 600;
  text-decoration: none;
}

/* --- Dashboard --- */
.dashboard-container {
  max-width: 960px;
  margin: 120px auto 4rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
}
.dashboard-container h2 {
  color: #fff;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}
.api-note {
  background-color: rgba(241, 196, 15, 0.1);
  border-left: 4px solid #f1c40f;
  padding: 1rem;
  margin: 1.5rem 0;
  border-radius: 4px;
  color: var(--text-color);
}
.api-note a {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 600;
}
.api-key-list {
  margin-top: 1rem;
  margin-bottom: 2rem;
}
.api-key-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.api-key-details {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.api-key-masked {
  font-weight: 600;
  color: var(--text-color);
  font-family: "Courier New", Courier, monospace;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.api-key-masked i {
  color: var(--secondary-color);
  margin-right: 0.5rem;
}
.api-key-usage,
.api-key-created {
  color: var(--text-color);
  font-size: 0.9rem;
}
.btn-delete {
  background: #e74c3c;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}
.btn-delete:hover {
  background: #c0392b;
  transform: translateY(-2px);
}
.btn-copy {
  background: none;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}
.btn-copy:hover {
  background: rgba(255, 255, 255, 0.1);
}
.btn-copy.copied {
  color: #2ecc71;
  background: rgba(46, 204, 113, 0.1);
}
