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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
  line-height: 1.6;
}

#app {
  max-width: 1200px;
  margin: 0 auto;
}

/* Header */
.header {
  text-align: center;
  padding: 40px 20px 60px;
  color: white;
}

.title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  letter-spacing: -1px;
}

.slogan {
  font-size: 1.2rem;
  opacity: 0.95;
  font-weight: 300;
}

/* Data Status Bar */
.status-bar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 15px 30px;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #333;
}

.status-item svg {
  color: #667eea;
  flex-shrink: 0;
}

.status-label {
  font-weight: 500;
  color: #666;
  font-size: 0.95rem;
}

.status-value {
  font-weight: 700;
  color: #667eea;
  font-size: 1rem;
}

/* Search Section */
.search-section {
  margin-bottom: 50px;
}

.search-container {
  background: white;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.search-row {
  display: flex;
  gap: 12px;
  margin-bottom: 25px;
  align-items: center;
}

/* Deep Search Checkbox */
.deep-search-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.checkbox-input {
  width: 18px;
  height: 18px;
  accent-color: #667eea;
  cursor: pointer;
}

.checkbox-label {
  font-size: 0.95rem;
  color: #555;
  cursor: pointer;
  user-select: none;
  font-weight: 500;
}

.search-box {
  display: flex;
  flex: 1;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.3s;
}

.search-box:focus-within {
  border-color: #667eea;
}

.search-input {
  flex: 1;
  border: none;
  padding: 18px 20px;
  font-size: 1.1rem;
  outline: none;
}

.search-button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  padding: 0 30px;
  cursor: pointer;
  color: white;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-button:hover {
  opacity: 0.9;
}

.clear-button {
  background: #f5f5f5;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  padding: 0 25px;
  cursor: pointer;
  color: #666;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
}

.clear-button:hover {
  background: #e0e0e0;
  border-color: #c0c0c0;
  color: #333;
}

/* Recommended Queries */
.recommended-queries {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.recommended-label {
  color: #666;
  font-size: 0.95rem;
  font-weight: 500;
}

.query-chip {
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  color: #555;
  transition: all 0.3s;
}

.query-chip:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Results Section */
.results-section {
  background: white;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.results-header {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #f0f0f0;
}

.results-title {
  font-size: 1.8rem;
  color: #333;
  margin-bottom: 5px;
}

.results-subtitle {
  color: #666;
  font-size: 1rem;
}

.results-container {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

/* Paper Cards */
.paper-card {
  border: 2px solid #f0f0f0;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s;
  background: white;
}

.paper-card:hover {
  border-color: #667eea;
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15);
  transform: translateY(-4px);
}

.card-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 15px 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.card-number {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.card-title {
  color: white;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
  flex: 1;
  margin: 0;
}

.card-content {
  padding: 18px;
}

.card-meta-row {
  margin-bottom: 10px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #555;
  font-size: 0.9rem;
}

.meta-icon {
  color: #667eea;
  flex-shrink: 0;
}

.card-authors {
  font-weight: 500;
}

.card-orgs {
  font-style: italic;
  color: #666;
}

.card-abstract {
  margin: 12px 0;
  padding: 15px;
  background: #f9f9f9;
  border-left: 4px solid #667eea;
  border-radius: 8px;
}

.card-abstract p {
  color: #444;
  line-height: 1.5;
  margin: 0;
  font-size: 0.9rem;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
}

.meta-info {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #777;
  font-size: 0.85rem;
}

.meta-icon-small {
  color: #999;
}

.card-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.3s;
}

.card-link:hover {
  gap: 10px;
  color: #764ba2;
}

/* Loading State */
.loading-section {
  background: white;
  border-radius: 20px;
  padding: 80px 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #667eea;
  border-right: 4px solid #764ba2;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-text {
  font-size: 1.1rem;
  color: #666;
  font-weight: 500;
  animation: pulse 2s ease-in-out infinite;
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 20px;
}

.empty-state h3 {
  font-size: 1.8rem;
  color: #333;
  margin-bottom: 10px;
}

.empty-state p {
  color: #666;
  font-size: 1.1rem;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  padding: 30px 0 10px;
  margin-top: 30px;
  border-top: 2px solid #f0f0f0;
}

.page-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s;
}

.page-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

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

.page-numbers {
  display: flex;
  gap: 8px;
}

.page-number {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.95rem;
  color: #555;
  transition: all 0.3s;
}

.page-number:hover {
  border-color: #667eea;
  background: #f8f9ff;
  transform: translateY(-2px);
}

.page-number.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: transparent;
}

/* Responsive Design */
@media (max-width: 768px) {
  .title {
    font-size: 2.5rem;
  }

  .search-container {
    padding: 25px;
  }

  .search-row {
    gap: 8px;
  }

  .clear-button {
    padding: 0 20px;
    min-width: 50px;
  }

  .results-section {
    padding: 25px;
  }

  .results-container {
    gap: 20px;
  }

  .card-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .card-link {
    width: 100%;
  }

  .pagination {
    flex-wrap: wrap;
    gap: 10px;
  }

  .page-numbers {
    flex-wrap: wrap;
    justify-content: center;
  }

  .page-btn {
    padding: 8px 15px;
    font-size: 0.85rem;
  }

  .page-number {
    min-width: 35px;
    height: 35px;
    padding: 0 8px;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  body {
    padding: 10px;
  }

  .title {
    font-size: 2rem;
  }

  .slogan {
    font-size: 1rem;
  }

  .search-input {
    font-size: 1rem;
  }

  .query-chip {
    font-size: 0.8rem;
    padding: 6px 12px;
  }
}

