:root {
    --primary-color: #0071e3;
    --secondary-color: #1d1d1f;
    --bg-color: #f5f5f7;
    --card-bg: #ffffff;
    --text-color: #1d1d1f;
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --accent-color: #6e6e73;
    --border-radius: 12px;
    --transition-speed: 0.3s;
}

/* 深色模式变量 */
.dark-mode {
    --primary-color: #2997ff;
    --secondary-color: #f5f5f7;
    --bg-color: #1d1d1f;
    --card-bg: #2c2c2e;
    --text-color: #f5f5f7;
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --accent-color: #a1a1a6;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: -apple-system, BlinkMacSystemFont, "San Francisco", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    padding-bottom: 2rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* 顶部导航栏 */
.top-nav {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

.dark-mode .top-nav {
    background-color: rgba(29, 29, 31, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.app-header {
    padding: 3rem 0 1.5rem;
}

.app-header h1 {
    font-weight: 600;
    letter-spacing: -0.02em;
}

.app-header p {
    color: var(--accent-color);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

.search-container {
    max-width: 600px;
    margin: 1.5rem auto 3rem;
}

.search-input {
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    background-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.dark-mode .search-input {
    background-color: rgba(44, 44, 46, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15);
}

.dark-mode .search-input:focus {
    box-shadow: 0 0 0 4px rgba(41, 151, 255, 0.15);
}

.category-title {
    margin: 2.5rem 0 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--secondary-color);
    font-weight: 600;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
}

.dark-mode .category-title {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.category-title i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.site-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    transition: all var(--transition-speed) ease;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.03);
    overflow: hidden;
}

.dark-mode .site-card {
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.site-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.dark-mode .site-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.site-card .card-body {
    padding: 1.5rem;
}

.site-icon {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.card-text {
    color: var(--accent-color);
    font-size: 0.9rem;
    line-height: 1.4;
}

.theme-switch {
    background: none;
    border: none;
    color: var(--accent-color);
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.2s ease;
}

.theme-switch:hover {
    color: var(--primary-color);
}

footer {
    color: var(--accent-color);
    font-size: 0.9rem;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

footer a:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

/* 分类标签 */
.category-tabs {
    display: flex;
    overflow-x: auto;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    gap: 0.5rem;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.category-tabs::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.category-tabs::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.dark-mode .category-tabs::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
}

.category-tab {
    background-color: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-color);
}

.dark-mode .category-tab {
    background-color: rgba(255, 255, 255, 0.05);
}

.category-tab.active {
    background-color: var(--primary-color);
    color: white;
}

.category-tab:hover:not(.active) {
    background-color: rgba(0, 0, 0, 0.1);
}

.dark-mode .category-tab:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.1);
}

/* 分类标签导航优化 */
.category-nav {
    position: relative;
    margin-bottom: 2rem;
}

.category-scroll-hint {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 30px;
    pointer-events: none;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-scroll-hint.left {
    left: 0;
    background: linear-gradient(to right, var(--bg-color), transparent);
}

.category-scroll-hint.right {
    right: 0;
    background: linear-gradient(to left, var(--bg-color), transparent);
}

.category-scroll-hint.active {
    opacity: 1;
}

.category-scroll-hint i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* 滚动到顶部按钮 */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    opacity: 0.9;
    transition: all 0.2s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.scroll-top-btn:hover {
    opacity: 1;
    transform: translateY(-3px);
}

/* 响应式调整 */
@media (max-width: 767.98px) {
    .app-header {
        padding: 2rem 0 1rem;
    }
    
    .app-header h1 {
        font-size: 2.2rem;
    }
    
    .app-header p {
        font-size: 1rem;
    }
    
    .site-card {
        margin-bottom: 1rem;
    }
    
    .category-title {
        margin: 2rem 0 1rem;
    }
    
    .scroll-top-btn {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .category-tabs {
        padding: 0.5rem 0;
        flex-wrap: nowrap;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch; /* 添加惯性滚动效果 */
    }
    
    .category-tab {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
        flex-shrink: 0;
    }
}

/* 搜索引擎样式 */
.search-engines {
    margin-top: 2rem;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
}

.search-engines::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: var(--primary-color);
}

.search-engines-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
}

.search-engines-title i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.search-engine-tabs {
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.search-engine-tabs::-webkit-scrollbar {
    display: none;
}

.dark-mode .search-engine-tabs {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.search-engine-tab {
    padding: 0.5rem 1rem;
    border: none;
    background: none;
    font-size: 0.9rem;
    color: var(--accent-color);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.search-engine-tab.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    font-weight: 500;
}

.search-engine-form {
    display: none;
}

.search-engine-form.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-engine-form .input-group {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.search-engine-form .input-group:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.dark-mode .search-engine-form .input-group:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.search-engine-form .input-group-text {
    background-color: var(--card-bg);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--primary-color);
}

.dark-mode .search-engine-form .input-group-text,
.dark-mode .search-engine-form .form-control {
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

.dark-mode .search-engine-form .input-group-text {
    background-color: var(--card-bg);
}

.search-engine-form .form-control {
    border-left: 0;
    border-right: 0;
}

.search-engine-form .btn-primary {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* 设置菜单样式 */
.settings-dropdown {
    position: relative;
    display: inline-block;
}

.settings-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 40px;
    background-color: var(--card-bg);
    min-width: 160px;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    z-index: 1100;
    animation: slideDown 0.2s ease;
    overflow: hidden;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.settings-dropdown-content.show {
    display: block;
}

.settings-dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s ease;
}

.dark-mode .settings-dropdown-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.settings-dropdown-item:last-child {
    border-bottom: none;
}

.settings-dropdown-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.dark-mode .settings-dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.settings-dropdown-item i {
    margin-right: 0.75rem;
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

/* 快捷工具样式 */
.quick-tools {
    margin-top: 1rem;
}

.quick-tool {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    height: 100%;
}

.quick-tool:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.dark-mode .quick-tool:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.tool-item {
    padding: 1.2rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
}

.tool-item i {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.tool-item span {
    font-size: 0.9rem;
    text-align: center;
}

/* 最近访问样式 */
.recent-visits {
    padding-top: 1rem;
}

/* 响应式调整 */
@media (max-width: 767.98px) {
    .search-engines .col-6 {
        margin-bottom: 0.5rem;
    }
    
    .search-engine-form .btn-primary {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
} 