/* Base styles */
* {
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  margin: 0;
  padding: 0;
  background: #f5f5f5;
  font-size: 0.9375rem;
  line-height: 1.4;
}

.hidden {
  display: none !important;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Header */
header {
  text-align: center;
  margin-bottom: 20px;
}

header h1 {
  font-size: 2rem;
  font-weight: bold;
  color: #1f2937;
  margin-bottom: 8px;
}

header p {
  font-size: 1.125rem;
  color: #6b7280;
}

.nav-links {
  margin-top: 15px;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.nav-links a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: #764ba2;
}

/* Search form */
.search-form {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  border: 1px solid #e5e7eb;
  padding: 15px;
  margin-bottom: 15px;
}

.search-container {
  display: flex;
  gap: 10px;
}

.search-input {
  flex-grow: 1;
  padding: 12px 16px;
  font-size: 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  outline: none;
  transition: all 0.2s;
}

.search-input:focus {
  border-color: #667eea;
  background: #f8f9ff;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.search-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

/* Search guide */
.search-guide {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  border: 2px solid #e0e0e0;
  padding: 20px;
  margin-bottom: 20px;
}

.guide-header {
  display: flex;
  align-items: start;
  margin-bottom: 15px;
  cursor: pointer;
  user-select: none;
}

.guide-header i {
  color: #667eea;
  margin-top: 4px;
  margin-right: 10px;
}

.guide-header h2 {
  flex-grow: 1;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}

.guide-toggle-icon {
  color: #667eea;
  transition: transform 0.3s;
}

.guide-toggle-icon.rotate-180 {
  transform: rotate(180deg);
}

.guide-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.guide-content.expanded {
  max-height: 1000px;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  font-size: 13px;
}

.guide-section {
  background: #f8f9ff;
  border-radius: 6px;
  padding: 12px;
  border: 1px solid #e0e0e0;
}

.guide-section h3 {
  font-weight: 600;
  color: #333;
  margin: 0 0 10px 0;
  display: flex;
  align-items: center;
  font-size: 15px;
}

.guide-section h3 i {
  margin-right: 8px;
  font-size: 12px;
}

.guide-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.guide-section li {
  margin-bottom: 6px;
  color: #6b7280;
  font-size: 12px;
}

.guide-section li:last-child {
  margin-bottom: 0;
}

.guide-section code {
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  font-weight: 600;
  color: #667eea;
}

/* Loading */
.loading {
  text-align: center;
  padding: 40px;
}

.loading-spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 3px solid #e5e7eb;
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading p {
  margin-top: 15px;
  color: #6b7280;
}

/* No results */
.no-results {
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  color: #92400e;
  padding: 20px;
  border-radius: 6px;
  margin-bottom: 20px;
}

.no-results p:first-child {
  font-weight: bold;
  margin-bottom: 5px;
}

.no-results p:last-child {
  margin: 0;
}

/* Results count */
.results-count {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 15px;
}

.results-count span {
  font-weight: 500;
  color: #1f2937;
}

/* Asset cards */
.asset-grid {
  display: grid;
  gap: 15px;
}

.asset-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  border: 2px solid #e0e0e0;
  overflow: hidden;
  transition: all 0.2s ease;
}

.asset-card:hover {
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  border-color: #667eea;
}

.asset-header {
  padding: 12px 16px;
  border-bottom: none;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.asset-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: white;
}

.asset-body {
  padding: 15px;
}

.field-group {
  margin-bottom: 12px;
}

.field-group:last-child {
  margin-bottom: 0;
}

.field-label {
  color: #999;
  font-size: 12px;
  margin-bottom: 4px;
  line-height: 1.3;
}

.field-value {
  color: #333;
  font-size: 14px;
  word-break: break-word;
  line-height: 1.5;
}

/* Pagination */
.pagination {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.pagination button {
  padding: 8px 12px;
  background: #e5e7eb;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.pagination button:hover:not(:disabled) {
  background: #d1d5db;
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination span {
  padding: 8px 15px;
  font-size: 14px;
  color: #374151;
}

/* Responsive */
@media (min-width: 768px) {
  .asset-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
  .guide-content {
    max-height: none !important;
  }
  
  .guide-toggle-icon {
    display: none;
  }
}

@media (max-width: 767px) {
  header h1 {
    font-size: 1.5rem;
  }
  
  header p {
    font-size: 0.875rem;
  }
  
  .nav-links {
    gap: 15px;
  }
  
  .search-container {
    flex-direction: column;
  }
  
  .search-button, #refreshButton {
    width: 100%;
  }
  
  .asset-card {
    margin: 0 -10px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  
  .guide-content {
    max-height: 0;
  }
  
  .guide-grid {
    grid-template-columns: 1fr;
  }
}
