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

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

.container {
  max-width: 900px;
  margin: 0 auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  padding: 40px;
}

header {
  text-align: center;
  margin-bottom: 30px;
}

h1 {
  color: #333;
  font-size: 2em;
  margin-bottom: 10px;
}

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

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  align-items: center;
}

#query {
  flex: 1 1 300px;
  padding: 12px 16px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 1em;
}

#query:focus {
  outline: none;
  border-color: #667eea;
}

button {
  padding: 12px 24px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1em;
  cursor: pointer;
  transition: background 0.3s;
}

button:hover {
  background: #5568d3;
}

button:active {
  transform: scale(0.98);
}

label {
  font-weight: 600;
  color: #555;
  font-size: 0.9em;
}

select,
input[type="number"] {
  padding: 8px 12px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 0.95em;
}

.status {
  padding: 12px;
  background: #f0f0f0;
  border-radius: 6px;
  margin-bottom: 20px;
  text-align: center;
  color: #555;
  font-weight: 500;
}

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

.paper {
  padding: 20px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  transition: all 0.3s;
  background: white;
  cursor: pointer;
}

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

.title {
  color: #333;
  font-size: 1.2em;
  margin-bottom: 10px;
  line-height: 1.4;
}

.meta {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.tag {
  background: #667eea;
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.85em;
  font-weight: 500;
}

.abstract {
  color: #666;
  line-height: 1.6;
  font-size: 0.95em;
}

.empty {
  text-align: center;
  padding: 40px;
  color: #999;
  font-size: 1.1em;
}

footer {
  text-align: center;
  margin-top: 30px;
  color: #999;
  font-size: 0.9em;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin: 30px 0;
  padding: 20px;
}

.page-btn {
  padding: 10px 20px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95em;
  transition: all 0.3s;
}

.page-btn:hover:not(:disabled) {
  background: #5568d3;
  transform: translateY(-2px);
}

.page-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
}

.page-info {
  font-weight: 600;
  color: #555;
  min-width: 100px;
  text-align: center;
}

@media (max-width: 600px) {
  .container {
    padding: 20px;
  }

  h1 {
    font-size: 1.5em;
  }

  .controls {
    flex-direction: column;
    align-items: stretch;
  }

  #query {
    width: 100%;
  }
}
