/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* 主内容区域 */
.main-content {
    min-height: 100vh;
    padding: 20px 0;
}

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

/* 工具详情页特定样式 */
.tool-detail-page {
    background-color: #f5f7fa;
}

.tool-detail-page .main-content {
    padding: 40px 0;
}

/* 工具卡片容器 */
.tool-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* 工具头部信息 */
.tool-header {
    display: flex;
    align-items: flex-start;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.tool-logo {
    flex-shrink: 0;
    margin-right: 20px;
}

.tool-logo .favicon-container {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-logo .favicon-container img {
    max-width: 70px;
    max-height: 70px;
}

.tool-title-section {
    flex: 1;
}

.tool-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
}

.tool-url {
    display: inline-block;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.tool-url:hover {
    color: white;
    text-decoration: underline;
}

.tool-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 14px;
    opacity: 0.9;
}

.tool-meta a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
}

.tool-meta a:hover {
    color: white;
    text-decoration: underline;
}

.tool-introduction {
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.9);
    max-width: 800px;
}

/* 操作按钮 */
.action-buttons {
    display: flex;
    gap: 12px;
    padding: 24px 30px;
    border-bottom: 1px solid #f0f0f0;
    flex-wrap: wrap;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-like {
    background-color: #f0f2f5;
    color: #333;
}

.btn-like:hover {
    background-color: #e4e6eb;
}

.btn-like.liked {
    background-color: #1877f2;
    color: white;
}

.btn-favorite {
    background-color: #f0f2f5;
    color: #333;
}

.btn-favorite:hover {
    background-color: #e4e6eb;
}

.btn-favorite.favorited {
    background-color: #ffd700;
    color: #333;
}

.btn-report {
    background-color: #f0f2f5;
    color: #333;
}

.btn-report:hover {
    background-color: #e4e6eb;
}

.btn-visit {
    background-color: #667eea;
    color: white;
    margin-left: auto;
}

.btn-visit:hover {
    background-color: #5a6fd8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* 工具内容 */
.tool-content {
    padding: 30px;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #333;
    border-bottom: 2px solid #667eea;
    padding-bottom: 8px;
    display: inline-block;
}

.tool-description {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 30px;
    color: #555;
}

/* 工具详细信息 */
.tool-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.detail-item {
    background-color: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
}

.detail-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    margin-bottom: 4px;
}

.detail-value {
    display: block;
    font-size: 16px;
    color: #333;
}

.detail-value a {
    color: #667eea;
    text-decoration: none;
    transition: all 0.3s ease;
}

.detail-value a:hover {
    text-decoration: underline;
}

/* 统计信息 */
.stats-section {
    display: flex;
    gap: 30px;
    padding: 24px 30px;
    background-color: #f8f9fa;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
    display: block;
}

.stat-label {
    font-size: 14px;
    color: #666;
    margin-top: 4px;
}

/* 用户列表 */
.users-section {
    padding: 30px;
    border-top: 1px solid #f0f0f0;
}

.users-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 12px;
    margin-top: 16px;
    padding: 16px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 10px;
    background-color: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.user-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.user-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.user-link:hover {
    transform: translateY(-2px);
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #667eea;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 8px;
}

.user-info span {
    font-size: 12px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

/* 相似工具、工具集和行业 */
.similar-tools-section {
    padding: 30px;
    border-top: 1px solid #f0f0f0;
}

.similar-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* 错误页面 */
.error-section {
    text-align: center;
    padding: 60px 30px;
}

.error-section h2 {
    font-size: 24px;
    margin-bottom: 16px;
    color: #333;
}

.error-section p {
    font-size: 16px;
    margin-bottom: 30px;
    color: #666;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .tool-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .tool-logo {
        margin-bottom: 20px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn-visit {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }
    
    .stats-section {
        flex-direction: column;
        gap: 20px;
    }
    
    .stat-item {
        text-align: left;
    }
    
    .tool-details {
        grid-template-columns: 1fr;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .similar-tools-grid {
        grid-template-columns: 1fr;
    }
}