/* 基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  transition: background 0.3s ease, background-color 0.3s ease, background-image 0.3s ease;
  position: relative;
}

/* 代码片段卡片样式 */
.snippet-card {
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  background-color: white;
  position: relative;
  z-index: 10;
}

.dark .snippet-card {
  background-color: #1f2937;
}

.snippet-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.snippet-preview {
  height: 200px;
  position: relative;
  overflow: hidden;
}

.snippet-actions {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: space-between;
  opacity: 0;
  transition: opacity 0.2s;
}

.snippet-preview:hover .snippet-actions {
  opacity: 1;
}

.action-button {
  background: white;
  color: black;
  border: none;
  border-radius: 0.25rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.2s;
}

.action-button:hover {
  background: #f0f0f0;
}

/* 预览覆盖层动画 */
#preview-overlay {
  transition: opacity 0.3s;
}

#preview-overlay.hidden {
  pointer-events: none;
  opacity: 0;
}

#preview-overlay:not(.hidden) {
  opacity: 1;
}

/* 复制按钮动画 */
#copy-code.copied {
  background-color: #10B981;
}

/* 通知样式 */
.notification {
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* 重置按钮样式 */
#reset-bg {
  cursor: pointer;
  position: relative;
  z-index: 20;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .snippet-actions {
    opacity: 1;
  }
} 