/* Discord emoji styling */
img.emoji { 
  height: 1em; 
  width: 1em; 
  margin: 0 0.05em 0 0.1em; 
  vertical-align: -0.1em; 
}

/* Center-align standalone sections */
.section {
  max-width: 1400px;
  margin: 0 auto 30px;
}

/* Base styles */
body { 
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
  margin: 0; 
  padding: 20px; 
  background: #f8f9fa; 
  color: #333; 
  line-height: 1.5;
}

.container { 
  max-width: 1400px; 
  margin: 0 auto; 
  background: white; 
  padding: 30px; 
  border-radius: 8px; 
  box-shadow: 0 1px 3px rgba(0,0,0,0.1); 
}

/* Navigation */
.nav { 
  margin-bottom: 20px; 
  padding-bottom: 15px; 
  border-bottom: 2px solid #e9ecef; 
}

.nav a { 
  color: #007bff; 
  text-decoration: none; 
  margin-right: 20px; 
  font-weight: 500;
  padding: 5px 0;
}

.nav a:hover { 
  text-decoration: underline; 
}

.nav a.active {
  font-weight: 600;
  color: #495057;
  border-bottom: 2px solid #007bff;
}

/* Header */
.header { 
  margin-bottom: 30px; 
}

.header h1 { 
  margin: 0; 
  color: #495057; 
  font-size: 1.8rem; 
  font-weight: 600; 
}

.header p {
  margin: 5px 0 0 0;
  color: #6c757d;
  font-size: 0.95rem;
}

/* Authentication section */
.auth-section { 
  background: #f8f9fa; 
  padding: 20px; 
  border-radius: 6px; 
  margin-bottom: 20px; 
  border-left: 4px solid #007bff;
}

.auth-section h3 {
  margin-top: 0;
  color: #495057;
}

.auth-section input { 
  padding: 10px; 
  border: 1px solid #ced4da; 
  border-radius: 4px; 
  margin-right: 10px; 
  width: 300px; 
  font-size: 14px;
}

.auth-section button { 
  padding: 10px 16px; 
  background: #007bff; 
  color: white; 
  border: none; 
  border-radius: 4px; 
  cursor: pointer; 
  font-weight: 500;
}

.auth-section button:hover {
  background: #0056b3;
}

/* Status cards */
.status-grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
  gap: 20px; 
  margin-bottom: 30px; 
}

.status-card { 
  background: #f8f9fa; 
  padding: 20px; 
  border-radius: 6px; 
  text-align: center; 
  border-left: 4px solid #007bff;
}

.status-card strong { 
  display: block; 
  margin-bottom: 10px; 
  color: #495057; 
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-value { 
  font-size: 1.5rem; 
  font-weight: 600; 
  color: #007bff; 
}

/* Forms */
.form-row { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 20px; 
  margin-bottom: 20px; 
}

.form-group { 
  display: flex; 
  gap: 10px; 
  align-items: center; 
}

.form-group input { 
  flex: 1; 
  padding: 10px; 
  border: 1px solid #ced4da; 
  border-radius: 4px; 
  font-size: 14px;
}

.form-group input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.form-group textarea {
  flex: 1;
  padding: 10px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 100px;
}

.form-group textarea:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Buttons */
.btn { 
  padding: 10px 16px; 
  border: none; 
  border-radius: 4px; 
  cursor: pointer; 
  font-weight: 500; 
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
  font-size: 14px;
}

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

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

.btn-primary:hover:not(:disabled) { 
  background: #0056b3; 
}

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

.btn-success:hover:not(:disabled) { 
  background: #1e7e34; 
}

.btn-secondary { 
  background: #6c757d; 
  color: white; 
}

.btn-secondary:hover:not(:disabled) { 
  background: #545b62; 
}

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

.btn-danger:hover:not(:disabled) { 
  background: #c82333; 
}

.btn-outline {
  background: transparent;
  border: 1px solid #007bff;
  color: #007bff;
}

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

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

/* Controls */
.controls {
  margin: 20px 0;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
}

.controls label {
  font-weight: 500;
  color: #495057;
}

.controls .btn-group {
  display: flex;
  gap: 5px;
}

/* Tables */
.feeds-table, .data-table { 
  width: 100%; 
  border-collapse: collapse; 
  margin: 20px 0; 
}

.feeds-table th, .feeds-table td,
.data-table th, .data-table td { 
  padding: 12px; 
  text-align: left; 
  border-bottom: 1px solid #e9ecef; 
}

.feeds-table th, .data-table th { 
  background: #f8f9fa; 
  font-weight: 600; 
  color: #495057;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.feeds-table tr:hover, .data-table tr:hover { 
  background: #f8f9fa; 
}

.feeds-table tbody tr:first-child:hover {
  background: transparent;
}

/* Sections */
.section { 
  background: #f8f9fa; 
  padding: 20px; 
  border-radius: 6px; 
  margin-bottom: 20px; 
  border-left: 4px solid #007bff;
}

.section h2 { 
  margin-top: 0; 
  color: #495057; 
  display: flex;
  align-items: center;
  gap: 8px;
}

.section h3 {
  margin-top: 0;
  color: #495057;
  font-size: 1.1rem;
}

/* Loading states */
.loading, .error { 
  text-align: center; 
  padding: 40px; 
  color: #6c757d; 
}

.error { 
  color: #dc3545; 
}

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Code/Output */
.code-output {
  background: #2d3748;
  color: #e2e8f0;
  padding: 15px;
  border-radius: 4px;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
  font-size: 13px;
  white-space: pre-wrap;
  overflow-x: auto;
  max-height: 400px;
  overflow-y: auto;
}

/* Responsive design */
@media (max-width: 768px) {
  body {
    padding: 15px;
  }
  
  .container {
    padding: 20px;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .status-grid {
    grid-template-columns: 1fr;
  }
  
  .controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .controls .btn-group {
    justify-content: center;
  }
  
  .nav a {
    display: block;
    margin: 5px 0;
  }
  
  .feeds-table, .data-table {
    font-size: 0.9rem;
  }
  
  .feeds-table th, .feeds-table td,
  .data-table th, .data-table td {
    padding: 8px;
  }
}

/* Utility classes */
.hidden { 
  display: none !important; 
}

.text-center { 
  text-align: center; 
}

.text-left { 
  text-align: left; 
}

.text-right { 
  text-align: right; 
}

.mt-10 { margin-top: 10px; }
.mt-15 { margin-top: 15px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-15 { margin-bottom: 15px; }
.mb-20 { margin-bottom: 20px; }

.flex { 
  display: flex; 
}

.flex-between { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.gap-10 { gap: 10px; }
.gap-15 { gap: 15px; }
.gap-20 { gap: 20px; }

.w-full { width: 100%; }

/* Animations */
.fade-in {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
