/* 选项卡图标样式 */
.tab svg, .state-btn svg {
  vertical-align: middle;
  margin-right: 6px;
}

/* 加载动画 */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.spinner {
  border: 4px solid rgba(0,0,0,0.1);
  border-top: 4px solid var(--accent);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

/* 新增按钮容器样式 */
.header-buttons {
  display: flex;
  gap: 0.8rem;
  margin-left: 1rem;
  flex-wrap: wrap;
}

.header-btn {
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: white;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s;
  white-space: nowrap;
}

.header-btn:hover {
  background: #0284c7;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* 骨架屏动画 */
@keyframes pulse {
  0% { background-color: #f0f0f0; }
  50% { background-color: #e0e0e0; }
  100% { background-color: #f0f0f0; }
}

/* 淡入动画 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.card, .comment-card {
  animation: fadeIn 0.3s ease-out;
}

/* 响应式设计 */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .header-buttons {
    margin-left: 0;
    justify-content: center;
  }
  
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .grid {
    grid-template-columns: 1fr;
    padding: 0 1rem 1rem;
  }
  
  .page-tabs, .state-tabs {
    justify-content: center;
  }
  
  .tab, .state-btn {
    font-size: 0.85rem;
    padding: 0.5rem 0.8rem;
  }
}

/* 无障碍优化 */
.tab:focus, .state-btn:focus, .header-btn:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* 性能优化 */
.card {
  will-change: transform;
}
