/**
 * Life Grid - Custom CSS
 * Additional styles not covered by Tailwind CSS
 */

/* 覆盖设置按钮的样式，使其显示在header下方 */
#settingsIconBtn {
  position: static !important;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  top: auto;
  right: auto;
  padding: 0.75rem 1.25rem;
  background-color: var(--tile-bg);
  border: 1px solid var(--tile-border);
  border-radius: 0.5rem;
  color: var(--text-color);
  transition: all 0.2s ease;
  font-size: 1rem;
  min-width: 120px;
}

#settingsIconBtn:hover {
  background-color: var(--settings-icon-hover-bg);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 用户指南样式 */
.user-guide {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.user-guide h2 {
  color: var(--link-color);
  position: relative;
  padding-bottom: 0.75rem;
}

.user-guide h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 2px;
  background-color: var(--link-color);
  opacity: 0.7;
}

.guide-step .step-number {
  background-color: var(--link-color);
  color: var(--modal-bg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.learn-more-btn {
  background-color: transparent;
  color: var(--link-color);
  transition: all 0.2s ease;
}

.learn-more-btn:hover {
  background-color: var(--link-color);
  color: var(--modal-bg);
}

/* Features Section Styles */
.features-section {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.features-section h2 {
  color: var(--link-color);
  position: relative;
  padding-bottom: 0.75rem;
}

.features-section h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 2px;
  background-color: var(--link-color);
  opacity: 0.7;
}

.feature-card {
  padding: 1.5rem;
  border-radius: 0.5rem;
  height: 100%;
  transition: all 0.3s ease;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
  background-color: rgba(255, 255, 255, 0.05);
}

.feature-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
}

.feature-icon svg {
  color: var(--link-color);
}

.feature-card h3 {
  text-align: center;
  color: var(--heading-color);
}

.feature-card p {
  text-align: center;
  color: var(--text-muted-color);
  line-height: 1.6;
}

/* Common styles */
.prose {
  max-width: 65ch;
  margin: 0 auto;
}

.prose h1 {
  font-size: 2.25rem;
  line-height: 2.5rem;
  margin-top: 0;
  margin-bottom: 1rem;
  font-weight: 700;
  color: var(--heading-color);
}

.prose h2 {
  font-size: 1.875rem;
  line-height: 2.25rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 700;
  color: var(--heading-color);
}

.prose h3 {
  font-size: 1.5rem;
  line-height: 2rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: var(--heading-color);
}

.prose p {
  margin-top: 1rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.prose a {
  color: var(--link-color);
  text-decoration: underline;
}

.prose a:hover {
  color: var(--link-hover-color);
}

.prose ul,
.prose ol {
  margin-top: 1rem;
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.prose li {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.prose blockquote {
  border-left: 4px solid var(--tile-border);
  padding-left: 1rem;
  margin-left: 0;
  margin-right: 0;
  font-style: italic;
  color: var(--text-muted-color);
}

/* Header and navigation */
.site-header {
  /* 移除底部边框 */
}

.nav-link {
  color: var(--text-color);
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  transition: background-color 0.2s;
}

.nav-link:hover {
  background-color: var(--theme-button-hover-bg);
}

.nav-link.active {
  font-weight: 600;
  color: var(--link-color);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--tile-border);
}

/* Dark mode adjustments */
body.dark-mode .prose {
  color: var(--text-color);
}

body.dark-mode .prose strong {
  color: var(--heading-color);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .prose {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Animation for page transitions */
.page-transition {
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* 在 custom.css 中添加 */
html {
  scroll-behavior: smooth;
}

/* 在 custom.css 中添加 */
:target {
  scroll-margin-top: 80px; /* 调整为您导航栏的高度 */
}
