/**
 * 网址详情页样式
 * 
 * @package FoxNav
 */

/* 网址详情页容器 */
.foxnav-site-detail {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 2rem;
}

/* 网站头部 */
.site-header {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 2rem;
}

.site-header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.site-title-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.site-favicon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px;
    flex-shrink: 0;
}

.site-title-info {
    flex: 1;
}

.site-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.site-url {
    margin-top: 0.5rem;
}

.site-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.site-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    text-decoration: none;
}

/* 网站徽章 */
.site-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.badge-official {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-verified {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-sponsored {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* 网站截图 */
.site-screenshot {
    text-align: center;
    margin-top: 1.5rem;
}

.screenshot-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* 网站内容区域 */
.site-content {
    padding: 2rem;
}

.site-content section {
    margin-bottom: 2rem;
}

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

.site-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    color: #1f2937;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.5rem;
}

.site-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    color: #374151;
}

/* 网站描述 */
.site-description .description-content {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #4b5563;
}

/* 文章内容 */
.site-article .article-content {
    font-size: 1rem;
    line-height: 1.7;
    color: #374151;
}

.site-article .article-content p {
    margin-bottom: 1rem;
}

/* 分类和标签 */
.site-taxonomy {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.category-list,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #f3f4f6;
    color: #374151;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.category-tag:hover {
    background: #e5e7eb;
    color: #1f2937;
    text-decoration: none;
}

.tag-item {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #dbeafe;
    color: #1e40af;
    text-decoration: none;
    border-radius: 12px;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.tag-item:hover {
    background: #bfdbfe;
    color: #1e3a8a;
    text-decoration: none;
}

/* 统计信息 */
.site-stats {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

/* 操作按钮 */
.site-actions {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: #3b82f6;
    color: #fff;
}

.btn-primary:hover {
    background: #2563eb;
    color: #fff;
    text-decoration: none;
}

.btn-secondary {
    background: #6b7280;
    color: #fff;
}

.btn-secondary:hover {
    background: #4b5563;
    color: #fff;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* 相关网站 */
.related-sites {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e5e7eb;
}

.related-sites h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 1.5rem 0;
    color: #1f2937;
    text-align: center;
}

.related-sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.related-site-item {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-site-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 面包屑导航 */
.foxnav-breadcrumb {
    margin-bottom: 1.5rem;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.875rem;
}

.breadcrumb-list li {
    display: flex;
    align-items: center;
}

.breadcrumb-list li:not(:last-child)::after {
    content: '›';
    margin-left: 0.5rem;
    color: #9ca3af;
}

.breadcrumb-list a {
    color: #3b82f6;
    text-decoration: none;
}

.breadcrumb-list a:hover {
    color: #2563eb;
    text-decoration: underline;
}

.breadcrumb-list .active {
    color: #6b7280;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .site-header {
        padding: 1.5rem;
    }
    
    .site-header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .site-title-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .site-title {
        font-size: 1.5rem;
    }
    
    .site-badges {
        align-self: flex-start;
    }
    
    .site-content {
        padding: 1.5rem;
    }
    
    .site-taxonomy {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .related-sites-grid {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 480px) {
    .site-header {
        padding: 1rem;
    }
    
    .site-content {
        padding: 1rem;
    }
    
    .site-title {
        font-size: 1.25rem;
    }
    
    .site-link {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
    
    .badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem;
    }
}

/* 加载动画 */
.foxnav-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: foxnav-spin 0.8s linear infinite;
    vertical-align: middle;
    margin-left: 8px;
}

@keyframes foxnav-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 分享按钮样式 */
.foxnav-share-btn {
    position: relative;
}

.foxnav-share-btn:hover {
    background: #4b5563;
}

/* 收藏按钮样式 */
.foxnav-favorite-btn {
    position: relative;
}

.foxnav-favorite-btn:hover {
    background: #4b5563;
}

.foxnav-favorite-btn.favorited {
    background: #f59e0b;
}

.foxnav-favorite-btn.favorited:hover {
    background: #d97706;
}

/* 页面链接样式 */
.page-links {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.page-links a {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    background: #f3f4f6;
    color: #374151;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.page-links a:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.page-links .current {
    background: #3b82f6;
    color: #fff;
}

/* 侧边栏样式 */
#secondary {
    margin-top: 2rem;
}

.widget {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    overflow: hidden;
}

.widget-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    padding: 1rem 1.5rem;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    color: #1f2937;
}

.foxnav-widget-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget-site-item {
    border-bottom: 1px solid #f3f4f6;
}

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

.widget-site-item .site-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: #374151;
    transition: all 0.3s ease;
}

.widget-site-item .site-link:hover {
    background: #f9fafb;
    color: #1f2937;
    text-decoration: none;
}

.widget-site-item .site-favicon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    flex-shrink: 0;
}

.widget-site-item .site-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    min-width: 0;
}

.widget-site-item .site-name {
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.widget-site-item .site-clicks,
.widget-site-item .site-date {
    font-size: 0.8rem;
    color: #6b7280;
}

/* 权重显示样式 */
.sites-seo-load {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.seo-rank-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.seo-rank-item:hover {
    background: transparent;
    transform: translateY(-2px);
    box-shadow: none;
}

.seo-rank-item.loading {
    background: transparent;
    border: none;
}

.seo-rank-item.loaded {
    background: transparent;
    border: none;
}

.seo-rank-item.error {
    background: transparent;
    border: none;
}

.seo-rank-item img {
    max-width: none;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* 初始logo图片大小限制 */
.seo-rank-item img.rank-logo-init {
    height: 22px;
    width: auto;
}

.rank-text {
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    min-width: 20px;
    text-align: center;
    display: none; /* 默认隐藏文字，只显示图片 */
}

/* 权重颜色（已移除，只显示图片） */
.seo-rank-item.rank-high {
    background: transparent;
    border: none;
}

.seo-rank-item.rank-medium {
    background: transparent;
    border: none;
}

.seo-rank-item.rank-low {
    background: transparent;
    border: none;
}

.seo-rank-item.rank-0 {
    background: transparent;
    border: none;
}

/* 权重图标动画 */
.seo-rank-item.loading img {
    animation: rankLoading 1s infinite;
}

@keyframes rankLoading {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 权重提示框 */
.seo-rank-item::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    margin-bottom: 5px;
}

.seo-rank-item::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #333;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    margin-bottom: 1px;
}

.seo-rank-item:hover::after,
.seo-rank-item:hover::before {
    opacity: 1;
    visibility: visible;
}

/* 侧边栏响应式 */
@media screen and (max-width: 768px) {
    #secondary {
        margin-top: 1rem;
    }
    
    .widget {
        margin-bottom: 1rem;
    }
    
    .widget-title {
        font-size: 1.1rem;
        padding: 0.75rem 1rem;
    }
    
    .widget-site-item .site-link {
        padding: 0.75rem 1rem;
    }
    
    .sites-seo-load {
        gap: 8px;
    }
    
    .seo-rank-item {
        padding: 0;
    }
    
    .seo-rank-item img {
        max-width: none;
        width: auto;
        height: auto;
    }
}
