/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-light);
    overflow-x: hidden;
}

/* 背景动画 */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0.05;
}

.bg-animation::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveBackground 20s linear infinite;
}

@keyframes moveBackground {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部 */
.header {
    padding: 40px 0 20px;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.logo {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.logo .icon {
    font-size: 3rem;
    animation: magnetRotate 3s ease-in-out infinite;
}

@keyframes magnetRotate {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-10deg);
    }
    75% {
        transform: rotate(10deg);
    }
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    font-weight: 300;
}

/* 搜索区域 */
.search-section {
    padding: 40px 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.search-box {
    display: flex;
    max-width: 700px;
    margin: 0 auto;
    background: white;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    transition: transform 0.3s ease;
}

.search-box:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

#searchInput {
    flex: 1;
    padding: 18px 30px;
    border: none;
    outline: none;
    font-size: 1rem;
    color: var(--text-dark);
}

#searchInput::placeholder {
    color: var(--text-light);
}

#searchBtn {
    padding: 18px 35px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

#searchBtn:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    transform: scale(1.05);
}

/* 主要内容 */
.main-content {
    padding: 50px 0;
    min-height: 60vh;
}

/* 分类标签 */
.category-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    justify-content: center;
}

.tab-btn {
    padding: 12px 28px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-dark);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tab-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-md);
}

/* 网站卡片网格 */
.sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* 网站卡片 */
.site-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    opacity: 1;
    animation: fadeInUp 0.5s ease;
}

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

.site-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.site-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
}

.tag {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--bg-light);
    color: var(--text-light);
}

.tag.hot {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
}

.site-desc {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-grow: 1;
    line-height: 1.6;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.visit-btn {
    flex: 1;
    min-width: 90px;
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.visit-btn:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.detail-btn {
    flex: 1;
    min-width: 90px;
    padding: 10px 16px;
    background: white;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    border: 2px solid var(--primary-color);
}

.detail-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.site-status {
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.site-status.online {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.site-status.offline {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-light);
}

.empty-state p:first-child {
    font-size: 3rem;
    margin-bottom: 15px;
}

.empty-hint {
    font-size: 1.1rem;
    color: var(--text-light);
}

/* 页脚 */
.footer {
    background: white;
    border-top: 1px solid var(--border-color);
    padding: 50px 0 30px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--text-dark);
    font-weight: 600;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 10px;
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.8;
}

.footer-section li::before {
    content: "• ";
    color: var(--primary-color);
    font-weight: bold;
    margin-right: 8px;
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
    font-size: 0.9rem;
}

.disclaimer {
    margin-top: 8px;
    font-size: 0.85rem;
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .logo {
        font-size: 2rem;
    }

    .logo .icon {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .search-section {
        padding: 30px 0;
    }

    .search-box {
        border-radius: 40px;
    }

    #searchInput {
        padding: 15px 20px;
        font-size: 0.95rem;
    }

    #searchBtn {
        padding: 15px 25px;
    }

    .main-content {
        padding: 30px 0;
    }

    .category-tabs {
        gap: 10px;
        margin-bottom: 30px;
    }

    .tab-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .sites-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .site-card {
        padding: 20px;
    }

    .site-name {
        font-size: 1.2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer {
        padding: 40px 0 20px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 30px 0 15px;
    }

    .logo {
        font-size: 1.8rem;
    }

    .logo .icon {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .container {
        padding: 0 15px;
    }

    .category-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }

    .category-tabs::-webkit-scrollbar {
        height: 4px;
    }

    .category-tabs::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 2px;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 选中文本样式 */
::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}


/* 搜索区域 */
.search-section {
    padding: 40px 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.search-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    max-width: 700px;
    margin: 0 auto;
}

.search-box {
    flex: 1;
    display: flex;
    background: white;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    transition: transform 0.3s ease;
}

.search-box:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

#searchInput {
    flex: 1;
    padding: 18px 30px;
    border: none;
    outline: none;
    font-size: 1rem;
    color: var(--text-dark);
}

#searchInput::placeholder {
    color: var(--text-light);
}

/* 搜索按钮 - 统一样式 */
#searchBtn {
    padding: 18px 35px;
    background: val(linear-gradient(135deg, #667eea 0%, #764ba2 100%)); /* 成功绿色 */
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    color: white;
    box-shadow: var(--shadow-xl);
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 700;
    min-width: 120px;
}

#searchBtn .search-text {
    font-size: 1.1rem;
    font-weight: 700;
}

#searchBtn:hover {
    background: val(linear-gradient(135deg, #667eea 0%, #764ba2 100%)); /* 深一点的绿色 */
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

#searchBtn:active {
    transform: translateY(0);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .search-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-box {
        width: 100%;
        border-radius: 40px;
    }
    
    #searchInput {
        padding: 15px 20px;
    }
    
    #searchBtn {
        width: 100%;
        padding: 15px 25px;
        border-radius: 40px;
        min-width: auto;
    }
}

@media (min-width: 769px) {
    .search-container {
        flex-direction: row;
    }
    
    #searchBtn {
        min-width: 120px;
    }
}

/* 热词区域 */
.hot-keywords-section {
    padding: 40px 0;
    margin-bottom: 40px;
}

.section-header {
    text-align: center;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
}

.hot-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    max-width: 900px;
    margin: 0 auto;
}

.keyword-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.keyword-tag:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hot-keywords-section {
        padding: 30px 0;
        margin-bottom: 30px;
    }
    
    .section-header h2 {
        font-size: 1.6rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .hot-keywords {
        gap: 12px;
    }
    
    .keyword-tag {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .hot-keywords {
        gap: 10px;
    }
    
    .keyword-tag {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
}