* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #1e3a8a, #1e40af);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.header p {
    font-size: 1.1em;
    opacity: 0.9;
}

.content {
    padding: 30px;
}

.upload-section {
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.upload-section:hover {
    border-color: #3b82f6;
    background: #f1f5f9;
}

.upload-section input[type="file"] {
    display: none;
}

.upload-btn {
    background: #1e40af;
    margin-top: 10px;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-btn:hover {
    background: #1e3a8a;
    transform: translateY(-2px);
}

.search-section {
    margin: 30px 0;
    padding: 20px;
    background: #f8fafc;
    border-radius: 10px;
}

.filter-section {
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    position: relative;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.advanced-filter-toggle {
    margin: 15px 0;
    text-align: center;
}

.toggle-btn {
    background: #f8fafc;
    border: 2px solid #cbd5e1;
    color: #64748b;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.95em;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.toggle-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #475569;
}

.toggle-btn.active {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1e40af;
}

#toggleIcon {
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

#toggleIcon.rotated {
    transform: rotate(90deg);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

.filter-section::before {
    content: "高级筛选";
    position: absolute;
    top: -10px;
    left: 20px;
    background: #10b981;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
}

.filter-section h4 {
    color: #059669;
    margin-bottom: 15px;
    font-size: 1.1em;
    font-weight: bold;
}

.filter-help {
    color: #64748b;
    font-size: 0.9em;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: #f0fdf4;
    border-radius: 6px;
    border-left: 3px solid #10b981;
}

.filter-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1em;
    outline: none;
    transition: border-color 0.3s ease;
    margin-bottom: 10px;
}

.filter-input:focus {
    border-color: #3b82f6;
}

.filter-apply-btn, .filter-clear-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.9em;
    cursor: pointer;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.filter-apply-btn {
    background: #10b981;
    color: white;
}

.filter-apply-btn:hover {
    background: #059669;
}

.filter-clear-btn {
    background: #6b7280;
    color: white;
}

.filter-clear-btn:hover {
    background: #4b5563;
}

.filter-status {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9em;
    display: none;
}

.filter-status.active {
    display: block;
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.filter-status.empty {
    display: block;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fbbf24;
}

.geo-search-section {
    margin-top: 25px;
    margin-bottom: 25px;
    padding: 20px;
    background: #ffffff;
    border: 2px solid #3b82f6;
    border-radius: 8px;
    position: relative;
}

.geo-search-section::before {
    content: "GEO关键词搜索";
    position: absolute;
    top: -10px;
    left: 20px;
    background: #3b82f6;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
}

.geo-search-section h4 {
    color: #1e40af;
    margin-bottom: 15px;
    font-size: 1.2em;
    font-weight: bold;
}

.search-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #cbd5e1;
    border-radius: 25px;
    font-size: 1.1em;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    border-color: #3b82f6;
}

.filter-buttons {
    margin: 20px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn, .filter-keywords {
    padding: 8px 16px;
    border: 2px solid #3b82f6;
    background: white;
    color: #3b82f6;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: #3b82f6;
    color: white;
}

.results-section {
    margin-top: 30px;
}

.search-info {
    color: #64748b;
    font-size: 0.9em;
    margin-bottom: 15px;
    padding: 8px 12px;
    background: #f1f5f9;
    border-radius: 6px;
    border-left: 3px solid #3b82f6;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #64748b, #475569);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.stat-card h3 {
    font-size: 2em;
    margin-bottom: 5px;
}

.stat-card p {
    opacity: 0.9;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.results-table th {
    background: #1e40af;
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    position: relative;
}

.results-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease;
}

.results-table th.sortable:hover {
    background: #1e3a8a;
}

.sort-icon {
    font-size: 0.8em;
    margin-left: 5px;
    opacity: 0.7;
}

.results-table th.sortable:hover .sort-icon {
    opacity: 1;
}

.results-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.results-table tr:hover {
    background: #f1f5f9;
}

.highlight {
    background: #fff3cd !important;
    font-weight: bold;
}

mark {
    background-color: #fef08a;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: bold;
    color: #92400e;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1.2em;
}

.export-btn {
    background: #64748b;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin: 10px 5px;
}

.export-btn:hover {
    background: #475569;
}

@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 10px;
    }

    .header {
        padding: 20px;
    }

    .header h1 {
        font-size: 2em;
    }

    .content {
        padding: 20px;
    }

    .stats-cards {
        grid-template-columns: 1fr;
    }

    .filter-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-btn {
        margin: 5px 0;
        text-align: center;
    }

    .toggle-btn {
        width: 100%;
        justify-content: center;
    }

    .advanced-filter-toggle {
        margin: 20px 0;
    }

    .display-limit-section {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .display-limit-section select {
        width: 150px;
    }
    
    .results-table {
        font-size: 0.8em;
    }
    
    .results-table th,
    .results-table td {
        padding: 8px 4px;
    }
    
    .sort-icon {
        display: none;
    }
}

/* 友情链接样式 */
.footer {
    background: linear-gradient(135deg, #1e3a8a, #1e40af);
    color: white;
    margin-top: 50px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 20px;
}

.footer h3 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.8em;
    color: #ecf0f1;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.link-category h4 {
    color: #93c5fd;
    margin-bottom: 15px;
    font-size: 1.2em;
    border-bottom: 2px solid #93c5fd;
    padding-bottom: 5px;
}

.link-category ul {
    list-style: none;
    padding: 0;
}

.link-category li {
    margin-bottom: 8px;
}

.link-category a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    padding: 5px 0;
}

.link-category a:hover {
    color: #93c5fd;
    padding-left: 10px;
}

.footer-bottom {
    border-top: 1px solid #3b82f6;
    padding-top: 20px;
    text-align: center;
    color: #cbd5e1;
}

.footer-bottom p {
    margin: 5px 0;
}

@media (max-width: 768px) {
    .links-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .footer-content {
        padding: 30px 15px 15px;
    }
}