/* Global Styles */
@import './variables.css';

/* Base Styles */
body {
  font-family: var(--font-roboto), var(--font-noto);
  background: linear-gradient(135deg, #1a2a6c, #b21f1f, #1a2a6c);
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

/* Flex Utility Classes */
.flex {
  display: flex;
  align-items: center;
}

.flex.items-center {
  align-items: center;
}

/* Panel Styles */
.panel {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid #e5e7eb;
  transition: all 0.3s ease;
}

.panel:hover {
  box-shadow: var(--shadow-xl);
}

.panel-header-gradient {
  background: linear-gradient(90deg, #4a69bd, #1e3799);
  color: white;
  padding: 1rem 1.5rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

.panel-header-gradient:hover {
  background: linear-gradient(90deg, #3c5aa6, #182a7a);
}

.panel-content {
  padding: 1.5rem;
}

/* Status Styles */
.status-200 {
  background: linear-gradient(90deg, #10b981, #059669);
}

.status-error {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

/* Loading Styles */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
}

/* Error Styles */
.error {
  display: flex;
  align-items: center;
  padding: 1.5rem;
}

/* Status Bar Styles */
.status-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  background: #1e293b;
  color: #e2e8f0;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #334155;
  position: sticky;
  top: 0;
  z-index: 10;
}

.status-item {
  display: flex;
  align-items: center;
  margin-right: 1rem;
  margin-bottom: 0.5rem;
}

/* Info Card Styles */
.info-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1rem;
}

/* Data Info Grid */
.data-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

/* URL Display */
.url-display {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-lg);
  padding: 1rem;
  margin-top: 1.5rem;
}

/* Table Stats */
.table-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.table-stat-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1;
}

/* Modal Styles */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.modal-content {
  background: white;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 2xl;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: var(--shadow-2xl);
}

.modal-header {
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
}

.modal-footer {
  background: #f8fafc;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid #e2e8f0;
}

/* Collapse Icon */
.collapse-icon {
  transition: transform 0.3s ease;
}

.collapsed .collapse-icon {
  transform: rotate(180deg);
}

/* JSON Styles */
.json-key {
  color: #38bdf8;
}

.json-string {
  color: #a3e635;
}

.json-number {
  color: #fbbf24;
}

.json-boolean {
  color: #c084fc;
}

/* Animations */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Footer Styles */
.footer {
  background: #f8fafc;
  color: #64748b;
  text-align: center;
  padding: 1.25rem;
  border-top: 1px solid #e2e8f0;
  font-size: 0.875rem;
}

/* Responsive Adjustments */
@media (max-width: 1400px) {
  .status-item {
    margin-right: 0.75rem;
  }
  
  .data-info {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

@media (max-width: 768px) {
  .status-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .status-item {
    margin-right: 0;
    margin-bottom: 0.25rem;
  }
  
  .data-info {
    grid-template-columns: 1fr;
  }
}