/* Token筛选页面样式 - 黑色主题 + 移动端优化 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    min-height: 100vh;
    color: #e2e8f0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px;
}

.header {
    text-align: center;
    margin-bottom: 25px;
    color: white;
}

.header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.header p {
    font-size: 1rem;
    opacity: 0.8;
    color: #a0aec0;
    margin-bottom: 20px;
}

/* 导航链接 */
.nav-links {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #2d3748;
    border: 1px solid #4a5568;
    border-radius: 25px;
    color: #a0aec0;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background: #4a5568;
    color: #e2e8f0;
    transform: translateY(-1px);
}

.nav-link.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* 筛选器面板 */
.filter-panel {
    background: #2d3748;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 1px solid #4a5568;
}

.search-sort-area {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.search-box {
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 14px 50px 14px 16px;
    border: 2px solid #4a5568;
    border-radius: 25px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: #1a202c;
    color: #e2e8f0;
    min-height: 48px;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.search-box input::placeholder {
    color: #718096;
}

.search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 1.2rem;
    pointer-events: none;
}

.sort-controls {
    display: flex;
    gap: 12px;
}

.filter-btn {
    flex: 1;
    padding: 12px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.filter-btn:hover {
    background: #5a67d8;
    transform: translateY(-1px);
}

.clear-filters-btn {
    padding: 12px 20px;
    background: #e53e3e;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
    white-space: nowrap;
}

.clear-filters-btn:hover {
    background: #c53030;
    transform: translateY(-1px);
}

/* 当前筛选条件显示 */
.active-filters {
    background: #2d3748;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 1px solid #667eea;
}

.active-filters h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #f7fafc;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #667eea;
    color: white;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.filter-tag .remove-tag {
    cursor: pointer;
    font-weight: bold;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.filter-tag .remove-tag:hover {
    opacity: 1;
}

/* 结果统计 */
.results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 16px 20px;
    background: rgba(45, 55, 72, 0.8);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid #4a5568;
    gap: 16px;
}

.results-count {
    font-weight: 600;
    color: #f7fafc;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.results-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sort-dropdown {
    position: relative;
}

.sort-select {
    padding: 8px 12px;
    background: #1a202c;
    border: 2px solid #4a5568;
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 36px;
    min-width: 160px;
}

.sort-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.sort-select option {
    background: #1a202c;
    color: #e2e8f0;
    padding: 8px;
}

.view-toggle {
    display: flex;
    gap: 4px;
    background: #1a202c;
    padding: 4px;
    border-radius: 8px;
    border: 1px solid #4a5568;
}

.view-btn {
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8rem;
    color: #cbd5e0;
    min-height: 32px;
    white-space: nowrap;
}

.view-btn.active {
    background: #667eea;
    color: white;
}

.view-btn:hover:not(.active) {
    background: #2d3748;
}

/* Token网格布局 */
.tokens-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.tokens-grid.list-view {
    grid-template-columns: 1fr;
    gap: 12px;
}

/* Token卡片 */
.token-card {
    background: #2d3748;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #4a5568;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.token-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #f6ad55, #ed8936);
}

.token-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    border-color: #667eea;
}

.token-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.token-info {
    flex: 1;
}

.token-symbol {
    font-size: 1.3rem;
    font-weight: 700;
    color: #f7fafc;
    margin-bottom: 4px;
}

.token-name {
    font-size: 0.9rem;
    color: #a0aec0;
    margin-bottom: 8px;
}

.token-address {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.8rem;
    color: #718096;
    word-break: break-all;
}

.token-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.score-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f6ad55;
}

.score-label {
    font-size: 0.7rem;
    color: #a0aec0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.token-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.token-metric {
    text-align: center;
    padding: 10px;
    background: #1a202c;
    border-radius: 8px;
    border: 1px solid #4a5568;
}

.token-metric-value {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: #e2e8f0;
}

.token-metric-value.positive { color: #68d391; }
.token-metric-value.negative { color: #fc8181; }

.token-metric-label {
    font-size: 0.75rem;
    color: #a0aec0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.token-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.token-tag {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.token-tag.verified {
    background: #22543d;
    color: #c6f6d5;
}

.token-tag.high-risk {
    background: #c53030;
    color: #fed7d7;
}

.token-tag.honeypot {
    background: #c05621;
    color: #fef5e7;
}

/* Token关注按钮 */
.token-follow-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #667eea;
    border: none;
    border-radius: 20px;
    color: white;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.token-follow-btn:hover {
    background: #5a67d8;
    transform: scale(1.05);
}

.token-follow-btn.following {
    background: #38a169;
}

.token-follow-btn.following:hover {
    background: #2f855a;
}

/* 列表视图样式 */
.token-card.list-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    gap: 20px;
}

.token-card.list-item .token-header {
    margin-bottom: 0;
    flex: 0 0 200px;
}

.token-card.list-item .token-metrics {
    display: flex;
    gap: 20px;
    margin-bottom: 0;
    flex: 1;
}

.token-card.list-item .token-metric {
    background: transparent;
    border: none;
    padding: 0;
    text-align: left;
}

.token-card.list-item .token-tags {
    margin-bottom: 0;
    flex: 0 0 auto;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 30px 0;
}

.pagination button {
    padding: 12px 16px;
    border: 1px solid #4a5568;
    background: #2d3748;
    color: #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    min-width: 44px;
    min-height: 44px;
}

.pagination button:hover:not(:disabled) {
    background: #4a5568;
    border-color: #667eea;
}

.pagination button.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination .page-info {
    padding: 0 16px;
    color: #a0aec0;
    font-size: 0.9rem;
}

/* 回到顶部按钮 */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: #667eea;
    color: white;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-to-top:hover {
    background: #5a67d8;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.5);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 12px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .header p {
        font-size: 0.9rem;
    }
    
    .nav-links {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .nav-link {
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }
    
    .filter-panel {
        padding: 16px;
    }
    
    .sort-controls {
        flex-direction: column;
        gap: 8px;
    }
    
    .filter-btn,
    .clear-filters-btn {
        width: 100%;
    }
    
    .tokens-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .token-card {
        padding: 16px;
    }
    
    .results-info {
        flex-direction: column;
        gap: 12px;
        text-align: center;
        padding: 12px 16px;
    }
    
    .results-controls {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .sort-dropdown {
        width: 100%;
    }
    
    .sort-select {
        width: 100%;
        min-width: auto;
    }
    
    .view-toggle {
        width: 100%;
        justify-content: center;
    }
    
    .view-btn {
        flex: 1;
        max-width: 120px;
    }
    
    .pagination {
        gap: 6px;
    }
    
    .pagination button {
        padding: 10px 12px;
        min-width: 40px;
        min-height: 40px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.6rem;
    }
    
    .token-card {
        padding: 12px;
    }
    
    .token-header {
        flex-direction: column;
        gap: 12px;
    }
    
    .token-follow-btn {
        position: static;
        align-self: flex-start;
    }
    
    .token-metrics {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
}