/* assets/css/custom.css */
/* 自定义样式 - 包含Logo变色功能 */
:root {
    --logo-filter-light: invert(0%) brightness(100%);
    --logo-filter-dark: invert(100%) brightness(200%);
}

.sf-logo {
    height: 32px;
    margin-right: 12px;
    transition: all 0.3s ease;
    filter: var(--logo-filter-dark);
}

.sf-theme-dark .sf-logo {
    filter: var(--logo-filter-light);
}

.sf-home-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: -1;
    transition: background-image 1s ease;
    opacity: 0.9;
}

.home-bg main {
    position: relative;
    z-index: 1;
    background: transparent;
}

.sf-hero {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 1rem;
    flex-direction: column;
}

.sf-hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.85);
    border-radius: var(--sf-radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    width: 100%;
}

.sf-theme-dark .sf-hero-content {
    background: rgba(30, 30, 30, 0.85);
}

/* 主页Logo和标题样式 */
.sf-logo-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}

.sf-main-logo {
    height: 80px;
    margin-bottom: 1rem;
    filter: var(--logo-filter-dark);
}

.sf-theme-dark .sf-main-logo {
    filter: var(--logo-filter-light);
}

.sf-logo-title h1 {
    font-size: 3.5rem;
    background: linear-gradient(to right, #4361ee, #06d6a0);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin: 0;
}

.sf-tagline {
    font-size: 1.2rem;
    color: var(--sf-text-secondary);
    margin-bottom: 2rem;
}

.sf-search-title {
    color: var(--sf-primary);
    text-decoration: none;
    font-size: 1.25rem;
    transition: color 0.2s;
    display: block;
    margin-bottom: 0.5rem;
}

.sf-search-title:hover {
    color: var(--sf-primary-dark);
    text-decoration: underline;
}

.sf-search-content {
    color: var(--sf-text);
    line-height: 1.7;
    margin: 1rem 0;
}

.sf-search-url {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sf-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--sf-border);
}

.sf-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.sf-tag {
    font-size: 0.85rem;
    padding: 0.3rem 0.8rem;
}

/* 搜索框样式 - 长方形 */
.sf-search-input {
    border-radius: var(--sf-radius-md) !important;
    height: 50px;
    padding: 0 20px;
    font-size: 1.1rem;
    flex-grow: 1;
}

.sf-search-btn {
    border-radius: var(--sf-radius-md) !important;
    height: 50px;
    padding: 0 25px;
    font-size: 1.1rem;
}

/* 主页加长搜索框 */
.sf-long-input {
    width: 600px;
    max-width: 90%;
}

.sf-long-btn {
    min-width: 160px;
}

/* 深色模式优化 */
.sf-theme-dark {
    --sf-bg: #121212;
    --sf-text: #e8e8e8;
    --sf-text-secondary: #b0b0b0;
    --sf-border: #333333;
    --sf-surface: #1e1e1e;
    --sf-card-bg: #1e1e1e;
    --sf-shadow-color: rgba(0, 0, 0, 0.4);
    --sf-navbar-bg: rgba(30, 30, 30, 0.95);
    --sf-modal-bg: rgba(30, 30, 30, 0.9);
    --sf-toast-bg: rgba(30, 30, 30, 0.95);
}

.sf-theme-dark .sf-card {
    background-color: #252525;
}

.sf-theme-dark .sf-tag {
    background-color: rgba(255, 255, 255, 0.1);
}

.sf-theme-dark .sf-alert {
    background-color: rgba(255, 255, 255, 0.05);
}

/* 弹窗容器定位 */
.sf-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 350px;
    width: 100%;
}

/* 页脚固定定位 */
.sf-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--sf-surface);
    border-top: 1px solid var(--sf-border);
    z-index: 100;
    padding: 0.5rem 0;
}

body.home-bg .sf-footer {
    position: fixed;
    bottom: 0;
}

@media (max-width: 768px) {
    .sf-hero h1 {
        font-size: 2.5rem;
    }
    
    .sf-navbar-brand span {
        display: none;
    }
    
    .sf-hero-content {
        padding: 1.5rem;
    }
    
    .sf-d-flex.sf-justify-between {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .sf-navbar-nav {
        display: flex;
        flex-wrap: wrap;
    }
    
    .sf-search-input {
        height: 45px;
        font-size: 1rem;
    }
    
    .sf-search-btn {
        height: 45px;
        padding: 0 15px;
    }
    
    .sf-long-input {
        width: 100%;
    }
    
    .sf-main-logo {
        height: 60px;
    }
}
.sf-a {
  color: var(--sf-primary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--sf-transition);
  position: relative;
  display: inline-block;
  padding: 0.1rem 0;
}

/* 下划线动画效果 */
.sf-a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--sf-primary);
  transition: width 0.3s ease;
}

.sf-a:hover::after {
  width: 100%;
}

/* 悬停状态 */
.sf-a:hover {
  color: var(--sf-primary-dark);
  transform: translateY(-1px);
}

/* 活动状态 */
.sf-a:active {
  transform: translateY(0);
}

/* 禁用状态 */
.sf-a.disabled {
  color: var(--sf-secondary);
  cursor: not-allowed;
  pointer-events: none;
}

/* 无下划线变体 */
.sf-a.sf-a-no-underline::after {
  display: none;
}

/* 颜色变体 */
.sf-a.sf-a-success {
  color: var(--sf-success);
}
.sf-a.sf-a-success::after {
  background-color: var(--sf-success);
}
.sf-a.sf-a-success:hover {
  color: var(--sf-success);
}

.sf-a.sf-a-danger {
  color: var(--sf-danger);
}
.sf-a.sf-a-danger::after {
  background-color: var(--sf-danger);
}
.sf-a.sf-a-danger:hover {
  color: var(--sf-danger-dark);
}

.sf-a.sf-a-warning {
  color: var(--sf-warning);
}
.sf-a.sf-a-warning::after {
  background-color: var(--sf-warning);
}
.sf-a.sf-a-warning:hover {
  color: var(--sf-warning-dark);
}

/* 按钮式链接 */
.sf-a.sf-a-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--sf-radius-sm);
  background-color: var(--sf-primary);
  color: white;
}
.sf-a.sf-a-btn::after {
  display: none;
}
.sf-a.sf-a-btn:hover {
  background-color: var(--sf-primary-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* 暗色主题适配 */
.sf-theme-dark .sf-a {
  color: var(--sf-primary-light);
}
.sf-theme-dark .sf-a:hover {
  color: var(--sf-primary);
}
@media (max-width: 576px) {
  .sf-search-results .sf-card {
    margin-bottom: 0.5rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  
  .sf-search-title {
    font-size: 1.1rem;
  }
  
  .sf-search-content {
    font-size: 0.9rem;
    margin: 0.5rem 0;
  }
  
  .sf-tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
  }
}
@media (max-width: 576px) {
  .sf-pagination {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .sf-page-item {
    margin-bottom: 0.5rem;
  }
  
  .sf-page-link {
    padding: 0.35rem 0.75rem;
  }
}
@media (max-width: 768px) {
  .sf-hero {
    min-height: 60vh;
    padding: 2rem 1rem;
  }
  
  .sf-hero-content {
    padding: 1.5rem;
    backdrop-filter: blur(5px);
  }
  
  .sf-logo-title h1 {
    font-size: 2.5rem;
  }
  
  .sf-tagline {
    font-size: 1rem;
  }
}

@media (max-width: 576px) {
  .sf-hero {
    min-height: 50vh;
  }
  
  .sf-long-btn {
    min-width: 120px;
    padding: 0.5rem;
  }
}
@media (max-width: 768px) {
  body {
    padding-top: 60px; /* 调整导航栏高度 */
  }
  
  .sf-navbar {
    height: 60px;
  }
  
  .sf-container {
    padding-right: 1rem;
    padding-left: 1rem;
  }
  
  .sf-section {
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 576px) {
  .sf-doc-container {
    padding: 1rem;
  }
  
  .sf-footer {
    font-size: 0.85rem;
  }
}