/* 前台样式 - Favicon Gallery */

/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

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

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

/* 顶部导航 */
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
}

.logo a {
    text-decoration: none;
    color: inherit;
}

.logo h1 {
    font-size: 24px;
    color: #667eea;
    margin-bottom: 2px;
}

.logo p {
    font-size: 13px;
    color: #999;
}

.nav-links {
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-links a {
    color: #666;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: #667eea;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: #667eea;
}

.admin-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    padding: 8px 16px;
    border-radius: 6px;
}

.admin-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 统计栏 */
.stats-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px 0;
    color: white;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}

.stat-item {
    padding: 20px;
}

.stat-number {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 8px;
}

.stat-text {
    font-size: 16px;
    opacity: 0.9;
}

/* 搜索区域 */
.search-section {
    padding: 40px 0 30px;
}

.search-bar {
    margin-bottom: 30px;
}

.search-input-group {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    gap: 10px;
}

.search-input-group input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.search-input-group input:focus {
    outline: none;
    border-color: #667eea;
}

.search-btn {
    padding: 15px 30px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.search-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 筛选标签 */
.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 10px 20px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: #666;
    font-weight: 500;
    transition: all 0.3s;
}

.filter-tab:hover {
    border-color: #667eea;
    color: #667eea;
}

.filter-tab.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

/* 图标网格 */
.gallery-section {
    padding: 40px 0 80px;
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.icon-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.icon-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.icon-preview {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.icon-preview img {
    max-width: 80px;
    max-height: 80px;
    border-radius: 4px;
}

.icon-placeholder {
    width: 80px;
    height: 80px;
    background: #e0e0e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #999;
}

.icon-info {
    text-align: center;
    width: 100%;
}

.icon-domain {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    word-break: break-all;
}

.icon-meta {
    display: flex;
    gap: 5px;
    justify-content: center;
    flex-wrap: wrap;
}

.tag {
    display: inline-block;
    padding: 3px 8px;
    font-size: 11px;
    border-radius: 4px;
    font-weight: 600;
}

.tag-success {
    background: #d4edda;
    color: #155724;
}

.tag-warning {
    background: #fff3cd;
    color: #856404;
}

.tag-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* 空状态 */
.empty-gallery {
    text-align: center;
    padding: 100px 20px;
}

.empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.empty-gallery h3 {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

.empty-gallery p {
    color: #999;
    font-size: 16px;
}

/* 分页 */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-btn {
    padding: 10px 20px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: #666;
    font-weight: 500;
    transition: all 0.3s;
}

.page-btn:hover {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.page-numbers {
    display: flex;
    gap: 5px;
}

.page-num {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: #666;
    font-weight: 500;
    transition: all 0.3s;
}

.page-num:hover {
    background: #f8f9fa;
    border-color: #667eea;
    color: #667eea;
}

.page-num.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.page-dots {
    display: flex;
    align-items: center;
    padding: 0 5px;
    color: #999;
}

/* 详情页 */
.detail-section {
    padding: 40px 0 80px;
    min-height: calc(100vh - 300px);
}

.detail-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
}

.detail-icon-display {
    text-align: center;
    margin-bottom: 40px;
}

.icon-sizes {
    display: flex;
    gap: 30px;
    justify-content: center;
    align-items: center;
}

.icon-size-item {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.3s;
    border: 3px solid transparent;
}

.icon-size-item.active {
    border-color: #667eea;
    background: white;
}

.icon-size-item img {
    display: block;
    margin-bottom: 10px;
}

.size-label {
    display: block;
    font-size: 12px;
    color: #999;
    font-weight: 600;
}

.detail-info {
    max-width: 800px;
    margin: 0 auto;
}

.detail-domain {
    font-size: 32px;
    color: #333;
    margin-bottom: 15px;
    word-break: break-all;
}

.detail-tags {
    margin-bottom: 30px;
}

.detail-meta {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.meta-item {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

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

.meta-label {
    font-weight: 600;
    color: #666;
    min-width: 120px;
}

.meta-value {
    color: #333;
}

.download-section,
.api-section {
    margin-top: 40px;
}

.download-section h3,
.api-section h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.download-buttons {
    display: flex;
    gap: 15px;
}

.download-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
}

.download-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.code-blocks {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.code-block {
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #e9ecef;
    border-bottom: 1px solid #dee2e6;
}

.code-header span {
    font-weight: 600;
    font-size: 13px;
    color: #495057;
}

.copy-btn {
    padding: 5px 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.copy-btn:hover {
    background: #5568d3;
}

.code-block pre {
    padding: 15px;
    margin: 0;
    overflow-x: auto;
}

.code-block code {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #333;
}

/* 相关图标 */
.related-section {
    margin-top: 40px;
}

.related-section h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
}

.related-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    border: 2px solid #e0e0e0;
    text-align: center;
}

.related-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.related-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 8px;
}

.related-icon img {
    max-width: 48px;
    max-height: 48px;
}

.related-domain {
    font-size: 13px;
    color: #666;
    word-break: break-all;
}

/* API文档页面 */
.docs-section {
    padding: 40px 0 80px;
    min-height: calc(100vh - 300px);
}

.docs-title {
    font-size: 40px;
    color: #333;
    margin-bottom: 10px;
    text-align: center;
}

.docs-subtitle {
    font-size: 18px;
    color: #999;
    text-align: center;
    margin-bottom: 40px;
}

.docs-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.docs-card h2 {
    font-size: 28px;
    color: #333;
    margin-bottom: 20px;
}

.docs-card h3 {
    font-size: 20px;
    color: #555;
    margin: 25px 0 15px;
}

.docs-card p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.8;
}

.code-example {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    position: relative;
}

.code-example pre {
    margin: 0;
    overflow-x: auto;
}

.code-example code {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #333;
}

.copy-btn-inline {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.copy-btn-inline:hover {
    background: #5568d3;
}

.docs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.docs-table th,
.docs-table td {
    padding: 12px 15px;
    text-align: left;
    border: 1px solid #e0e0e0;
}

.docs-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.docs-table td {
    color: #666;
}

.docs-table code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #e83e8c;
}

.docs-list {
    margin-left: 30px;
    color: #666;
}

.docs-list li {
    margin-bottom: 10px;
    line-height: 1.8;
}

.docs-note {
    background: #e7f3ff;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #2196F3;
    margin: 20px 0;
}

.docs-note strong {
    color: #1976D2;
    display: block;
    margin-bottom: 10px;
}

.docs-note ul {
    margin-left: 20px;
}

.docs-note li {
    color: #555;
    margin-bottom: 5px;
}

/* API测试器 */
.api-tester {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-top: 20px;
}

.tester-inputs {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.input-group {
    flex: 1;
    min-width: 200px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
}

.test-btn {
    padding: 12px 30px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    align-self: flex-end;
}

.test-btn:hover {
    background: #5568d3;
}

.test-result {
    margin-top: 20px;
}

.alert-info,
.alert-error {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.test-success {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #28a745;
}

.test-success h4 {
    color: #28a745;
    margin-bottom: 15px;
}

.result-info p {
    margin: 8px 0;
    color: #666;
}

.result-json {
    margin-top: 20px;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
}

.result-json pre {
    margin-top: 10px;
    overflow-x: auto;
}

/* 页脚 */
.footer {
    background: #2c3e50;
    color: white;
    padding: 40px 0 20px;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.footer-info h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.footer-info p {
    color: #95a5a6;
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 25px;
}

.footer-links a {
    color: #ecf0f1;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #667eea;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #34495e;
}

.footer-bottom p {
    color: #95a5a6;
    font-size: 13px;
}

/* 响应式 */
@media (max-width: 768px) {
    .main-nav {
        flex-direction: column;
        gap: 20px;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .stats-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .icon-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .search-input-group {
        flex-direction: column;
    }
    
    .filter-tabs {
        flex-direction: column;
    }
    
    .icon-sizes {
        flex-direction: column;
    }
    
    .download-buttons {
        flex-direction: column;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .related-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .tester-inputs {
        flex-direction: column;
    }
    
    .test-btn {
        align-self: stretch;
    }
}
