@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  --primary-color: #3b82f6;
  --primary-hover: #2563eb;
  --bg-color: #f9fafb;
  --card-color: #ffffff;
  --text-color: #111827;
  --text-muted: #6b7280;
  --border-color: #e5e7eb;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}



/* 新增：资源链接按钮在移动端的竖直间距 */
.resource-link-buttons button{
  display: inline-block;
  margin-bottom: 10px;
}

.resource-link-buttons input {
  display: inline-block;
  margin-bottom: 10px;
}

.resource-link-buttons a {
  display: inline-block;
  margin-bottom: 10px;
  text-align: center;
}

.logo {
  max-width: 220px;
  transition: transform 0.2s;
}

.logo:hover {
  transform: scale(1.02);
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* 搜索框样式 */
.search-box {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.search-input {
  border-radius: 0.5rem 0 0 0.5rem;
  border: 1px solid var(--border-color);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.2s;
}

.search-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.search-button {
  background-color: var(--primary-color);
  color: white;
  border-radius: 0 0.5rem 0.5rem 0;
  transition: background-color 0.2s;
}

.search-button:hover {
  background-color: var(--primary-hover);
}

/* 通知栏样式 */
.notification-bar {
  background-color: #fff6f7;
  padding: 0.75rem 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* 资源卡片样式 */
.resource-card {
  border-radius: 0.5rem;
  background-color: var(--card-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: all 0.3s;
  overflow: hidden;
}

.resource-card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

.resource-item {
  transition: all 0.2s;
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
}

.resource-item:hover {
  background-color: rgba(243, 244, 246, 0.5);
}

.resource-item a {
  color: var(--primary-color);
  font-weight: 500;
  text-decoration: none;
}

.resource-item a:hover {
  text-decoration: underline;
}

/* 标签样式 */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  background-color: #fee2e2;
  color: #b91c1c;
}

/* 按钮样式 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-secondary {
  background-color: white;
  color: var(--text-color);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: #f9fafb;
}

/* 复制按钮 */
.copy-button {
  @apply inline-flex items-center px-3 py-1.5 border border-blue-300 text-sm font-medium rounded-md text-blue-700 bg-white hover:bg-blue-50;
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.copy-button:hover {
  background-color: #eff6ff;
  transform: translateY(-1px);
}

.action-button {
  @apply inline-flex items-center px-3 py-1.5 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50;
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.action-button:hover {
  background-color: #f3f4f6;
  transform: translateY(-1px);
}

/* 分页样式 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
}

.pagination-item {
  margin: 0 0.25rem;
  min-width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  font-weight: 500;
  transition: all 0.2s;
}

.pagination-item.active {
  background-color: var(--primary-color);
  color: white;
}

.pagination-item:not(.active):hover {
  background-color: #f3f4f6;
}

.pagination-arrow {
  color: var(--text-muted);
  background-color: white;
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  transition: all 0.2s;
}

.pagination-arrow:hover {
  background-color: #f3f4f6;
  transform: translateY(-1px);
}

.pagination-arrow:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .pagination-text {
    display: none;
  }

  .pagination-item {
    min-width: 2rem;
    height: 2rem;
  }
}