*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #f5f7fa; color: #333; line-height: 1.6; }

header { background: #1a1a2e; color: #fff; padding: 0 20px; position: sticky; top: 0; z-index: 100; }
.header-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 24px; height: 56px; }
.logo { color: #fff; text-decoration: none; font-size: 20px; font-weight: 700; white-space: nowrap; }
header nav { display: flex; gap: 16px; }
header nav a { color: #aaa; text-decoration: none; font-size: 14px; }
header nav a:hover { color: #fff; }
.lang-switcher { display: flex; gap: 0; margin-left: auto; }
.lang-link { color: #aaa; text-decoration: none; font-size: 12px; padding: 4px 8px; border-radius: 3px; }
.lang-link:hover { color: #fff; background: rgba(255,255,255,0.1); }
.lang-link.active { color: #fff; background: #e94560; }
.header-search { margin-left: 12px; display: flex; gap: 0; }
.header-search input { border: none; padding: 6px 12px; border-radius: 4px 0 0 4px; width: 200px; font-size: 14px; }
.header-search button { border: none; background: #e94560; color: #fff; padding: 6px 14px; border-radius: 0 4px 4px 0; cursor: pointer; font-size: 14px; }

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

.hero { text-align: center; padding: 48px 0 32px; }
.hero h1 { font-size: 32px; margin-bottom: 8px; }
.hero p { color: #666; margin-bottom: 20px; }
.hero-search { display: flex; max-width: 480px; margin: 0 auto; }
.hero-search input { flex: 1; padding: 12px 16px; border: 2px solid #ddd; border-radius: 6px 0 0 6px; font-size: 16px; }
.hero-search input:focus { border-color: #e94560; outline: none; }
.hero-search button { padding: 12px 24px; background: #e94560; color: #fff; border: none; border-radius: 0 6px 6px 0; cursor: pointer; font-size: 16px; }

.categories { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.category-card { background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); transition: box-shadow 0.2s; }
.category-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.category-card a { display: block; padding: 16px 20px; text-decoration: none; color: inherit; }
.category-card h2 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.category-card .count { font-size: 13px; color: #999; }

.breadcrumb { font-size: 13px; color: #999; margin-bottom: 16px; }
.breadcrumb a { color: #e94560; text-decoration: none; }

.category-header { display: flex; align-items: baseline; gap: 12px; margin-bottom: 20px; }
.category-header h1 { font-size: 24px; }
.category-header .count { color: #999; font-size: 14px; }

.anchor-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; padding: 12px; background: #fff; border-radius: 6px; }
.anchor-nav a { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; background: #f0f0f0; border-radius: 4px; text-decoration: none; color: #333; font-size: 13px; font-weight: 600; }
.anchor-nav a:hover { background: #e94560; color: #fff; }

.site-list { display: flex; flex-direction: column; gap: 2px; }
.site-item { display: flex; gap: 16px; background: #fff; padding: 16px; border-radius: 6px; }
.site-item:hover { background: #fafafa; }
.site-thumb { flex-shrink: 0; width: 120px; height: 80px; overflow: hidden; border-radius: 4px; background: #eee; }
.site-thumb img { width: 100%; height: 100%; object-fit: cover; }
.site-info { flex: 1; min-width: 0; }
.site-info h3 { font-size: 16px; margin-bottom: 4px; }
.site-info h3 a { color: #1a1a2e; text-decoration: none; }
.site-info h3 a:hover { color: #e94560; }
.site-desc { font-size: 13px; color: #666; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.site-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.btn-visit { display: inline-block; padding: 4px 12px; background: #e94560; color: #fff; text-decoration: none; border-radius: 4px; font-size: 13px; }
.btn-visit:hover { background: #d63850; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag { display: inline-block; padding: 2px 8px; background: #f0f0f0; border-radius: 3px; font-size: 12px; color: #666; }

.site-category { font-size: 12px; color: #999; margin-bottom: 4px; }

.site-detail { background: #fff; border-radius: 8px; padding: 32px; }
.site-detail-header { display: flex; gap: 24px; margin-bottom: 24px; }
.site-detail-thumb { width: 240px; height: 160px; flex-shrink: 0; border-radius: 8px; overflow: hidden; background: #eee; }
.site-detail-thumb img { width: 100%; height: 100%; object-fit: cover; }
.site-detail-info h1 { font-size: 28px; margin-bottom: 16px; }
.site-detail-desc { line-height: 1.8; color: #444; font-size: 14px; margin-bottom: 20px; }
.site-detail-desc p { margin-bottom: 12px; }
.site-detail-desc a { color: #e94560; }

.search-page { }
.search-page h1 { font-size: 24px; margin-bottom: 16px; }
.search-form { display: flex; max-width: 500px; margin-bottom: 20px; }
.search-form input { flex: 1; padding: 10px 14px; border: 2px solid #ddd; border-radius: 6px 0 0 6px; font-size: 15px; }
.search-form input:focus { border-color: #e94560; outline: none; }
.search-form button { padding: 10px 20px; background: #e94560; color: #fff; border: none; border-radius: 0 6px 6px 0; cursor: pointer; }
.search-info { color: #666; margin-bottom: 16px; }

.submit-page { max-width: 600px; }
.submit-page h1 { font-size: 24px; margin-bottom: 8px; }
.submit-page > p { color: #666; margin-bottom: 20px; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: #e94560; outline: none; }
.btn-submit { padding: 10px 24px; background: #e94560; color: #fff; border: none; border-radius: 6px; cursor: pointer; font-size: 15px; }

.success-msg { padding: 12px 16px; background: #d4edda; color: #155724; border-radius: 6px; margin-bottom: 16px; }
.error-msg { padding: 12px 16px; background: #f8d7da; color: #721c24; border-radius: 6px; margin-bottom: 16px; }
.empty-state { text-align: center; padding: 48px; color: #999; }
.error-page { text-align: center; padding: 60px 0; }
.error-page h1 { font-size: 28px; margin-bottom: 16px; }
.error-page a { color: #e94560; }

.redirect-page { display: flex; justify-content: center; padding: 60px 16px; min-height: 60vh; align-items: center; }
.redirect-box { background: #fff; border-radius: 16px; padding: 48px 40px 40px; max-width: 460px; width: 100%; text-align: center; box-shadow: 0 4px 24px rgba(0,0,0,0.08); }
.redirect-icon { margin-bottom: 20px; display: flex; justify-content: center; }
.redirect-icon svg { width: 56px; height: 56px; }
.redirect-box h1 { font-size: 22px; margin-bottom: 12px; color: #1a1a2e; }
.redirect-desc { color: #888; font-size: 14px; margin-bottom: 24px; line-height: 1.7; }
.redirect-site { background: #f8f9fc; border-radius: 12px; padding: 20px; margin-bottom: 28px; text-align: left; }
.redirect-label { display: block; font-size: 11px; color: #aaa; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px; }
.redirect-label:not(:first-child) { margin-top: 12px; }
.redirect-site strong { display: block; font-size: 16px; color: #1a1a2e; margin-bottom: 0; }
.redirect-site code { font-size: 13px; color: #666; word-break: break-all; display: block; }
.redirect-actions { display: flex; gap: 12px; justify-content: center; }
.btn-cancel, .btn-continue { display: inline-flex; align-items: center; padding: 12px 28px; border-radius: 8px; text-decoration: none; font-size: 15px; font-weight: 500; transition: all 0.2s; }
.btn-cancel { background: #f0f2f5; color: #555; }
.btn-cancel:hover { background: #e4e6ea; }
.btn-continue { background: #e94560; color: #fff; }
.btn-continue:hover { background: #d63850; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(233,69,96,0.3); }

footer { text-align: center; padding: 32px 20px; color: #999; font-size: 13px; }

@media (max-width: 768px) {
    .header-inner { flex-wrap: wrap; height: auto; padding: 10px 0; }
    .header-search { margin-left: 0; width: 100%; }
    .header-search input { width: 1px; flex: 1; }
    .categories { grid-template-columns: 1fr; }
    .site-item { flex-direction: column; }
    .site-thumb { width: 100%; height: 140px; }
    .site-detail-header { flex-direction: column; }
    .site-detail-thumb { width: 100%; height: 200px; }
}
