/* 鲜艳现代化主题CSS */
:root {
    /* 鲜艳配色变量 */
    --bg-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --bg-tertiary: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --bg-card: rgba(255, 255, 255, 0.95);
    --bg-card-secondary: rgba(255, 255, 255, 0.85);
    
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --text-light: #ffffff;
    
    --accent-primary: #667eea;
    --accent-secondary: #f093fb;
    --accent-success: #48bb78;
    --accent-warning: #ed8936;
    --accent-danger: #f56565;
    
    --shadow-primary: 0 10px 25px rgba(0, 0, 0, 0.15);
    --shadow-hover: 0 15px 35px rgba(0, 0, 0, 0.2);
    --shadow-light: 0 4px 15px rgba(102, 126, 234, 0.2);
    
    --border-radius: 20px;
    --border-radius-sm: 12px;
    --border-radius-xs: 8px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(240, 147, 251, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(118, 75, 162, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(79, 172, 254, 0.2) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* 头部样式 - 鲜艳版本（缩小版） */
header {
    text-align: center;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease-out;
    background: var(--bg-card);
    padding: 1.5rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-primary);
    backdrop-filter: blur(10px);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    animation: gradientShift 3s ease-in-out infinite alternate;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

header p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

header p:nth-child(2) {
    color: var(--accent-success);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: rgba(72, 187, 120, 0.1);
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

header p:nth-child(2)::before {
    content: '✓';
    background: var(--accent-success);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.favorite-button {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    font-size: 1rem;
    margin-top: 0.75rem;
    box-shadow: var(--shadow-light);
    position: relative;
    overflow: hidden;
}

.favorite-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.favorite-button:hover::before {
    left: 100%;
}

.favorite-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-hover);
}

.favorite-button:active {
    transform: translateY(-1px) scale(1.02);
}

/* 模块通用样式 - 鲜艳版本 */
.module, .module1, .module2 {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-primary);
    transition: var(--transition);
    animation: fadeInUp 0.8s ease-out;
    position: relative;
    overflow: hidden;
}

.module::before, .module1::before, .module2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary), var(--accent-success));
}

.module:hover, .module1:hover, .module2:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-hover);
}

.module h2, .module1 h2, .module2 h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
}

.module h2::before, .module1 h2::before, .module2 h2::before {
    content: '';
    width: 6px;
    height: 24px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 3px;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    0% { box-shadow: 0 0 5px rgba(102, 126, 234, 0.5); }
    100% { box-shadow: 0 0 20px rgba(102, 126, 234, 0.8); }
}

/* 线路选择模块 - 鲜艳版本 */
.links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.link-item {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    text-decoration: none;
    padding: 2rem;
    border-radius: var(--border-radius-sm);
    text-align: center;
    font-weight: 600;
    font-size: 1.2rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.link-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s;
}

.link-item:hover::before {
    left: 100%;
}

.link-item:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: var(--shadow-hover);
}

.link-item:nth-child(1) {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.link-item:nth-child(2) {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.link-item:nth-child(3) {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.link-item:nth-child(4) {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
}

/* 导航链接 - 鲜艳版本 */
.nav-section {
    margin-bottom: 2.5rem;
}

.nav-section:last-child {
    margin-bottom: 0;
}

.nav-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.nav-link {
    background: var(--bg-card-secondary);
    color: var(--text-primary);
    text-decoration: none;
    padding: 1.25rem;
    border-radius: var(--border-radius-sm);
    text-align: center;
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition);
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.nav-link:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent-primary);
}

/* 热搜模块 - 鲜艳版本 */
.hot-search-container {
    background: var(--bg-card-secondary);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

.hot-search-tab {
    display: flex;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: var(--border-radius-sm) var(--border-radius-sm) 0 0;
}

.hot-search-tab button {
    flex: 1;
    background: transparent;
    border: none;
    padding: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    font-size: 1.1rem;
    position: relative;
}

.hot-search-tab button.active {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.hot-search-tab button.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: white;
    border-radius: 2px;
}

.hot-search-tab button:hover:not(.active) {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.hot-search-content {
    padding: 2rem;
}

.hot-search-list {
    display: none;
}

.hot-search-list.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

.hot-search-list ul {
    list-style: none;
}

.hot-search-list li {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    border-radius: var(--border-radius-xs);
}

.hot-search-list li:last-child {
    border-bottom: none;
}

.hot-search-list li:hover {
    background: rgba(102, 126, 234, 0.05);
    margin: 0 -1rem;
    padding: 1rem;
    transform: translateX(5px);
}

.hot-search-list .rank {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    margin-right: 1rem;
    flex-shrink: 0;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.hot-search-list li:nth-child(1) .rank {
    background: linear-gradient(135deg, var(--accent-danger), #ff7675);
}

.hot-search-list li:nth-child(2) .rank,
.hot-search-list li:nth-child(3) .rank {
    background: linear-gradient(135deg, var(--accent-warning), #fdcb6e);
}

.hot-search-list li:nth-child(n+4) .rank {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
}

.hot-search-list a {
    color: var(--text-primary);
    text-decoration: none;
    flex: 1;
    transition: var(--transition);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hot-search-list a:hover {
    color: var(--accent-primary);
}

.update-time {
    text-align: center;
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-weight: 500;
}

/* 加载和错误状态 */
.loading, .error, .empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-weight: 500;
}

.error {
    color: var(--accent-danger);
    background: rgba(245, 101, 101, 0.1);
    border-radius: var(--border-radius-xs);
}

.empty {
    color: var(--text-secondary);
}

/* 页脚 */
footer {
    text-align: center;
    padding: 2.5rem;
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
    margin-top: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* 动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

/* 响应式设计 - 鲜艳版本 */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    header {
        padding: 2rem 1.5rem;
    }
    
    header h1 {
        font-size: 2.8rem;
    }
    
    .module, .module1, .module2 {
        padding: 2rem;
        margin-bottom: 1.5rem;
    }
    
    .nav-links {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.75rem;
    }
    
    .links {
        grid-template-columns: 1fr;
    }
    
    .link-item {
        padding: 1.5rem;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 2.2rem;
    }
    
    .module, .module1, .module2 {
        padding: 1.5rem;
    }
    
    .nav-links {
        grid-template-columns: 1fr 1fr;
    }
    
    .hot-search-tab button {
        padding: 1rem 0.5rem;
        font-size: 1rem;
    }
    
    .favorite-button {
        padding: 0.875rem 1.75rem;
        font-size: 1rem;
    }
}

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

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

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

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