/* ============================================
   CenterPHP 发现工具页样式
   ============================================ */
input,textarea {
    font-size: 16px !important;
}
/* 页面布局 */
.tools-page {
    min-height: calc(100vh - 64px);
    background: #f8fafc;
    padding: 24px 0;
}

.tools-layout {
    display: flex;
    gap: 24px;
}

/* 左侧分类侧边栏 */
.tools-sidebar {
    width: 200px;
    flex-shrink: 0;
}

.sidebar-menu {
    position: sticky;
    top: 88px;
    background: white;
    border-radius: 6px;
    padding: 16px 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    text-decoration: none;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 4px;
}

.sidebar-item:hover {
    background: #f9fafb;
    color: #23a894;
}

.sidebar-item.active {
    background: #e8f7f5;
    color: #23a894;
    border-right: 3px solid #23a894;
}

.sidebar-item i {
    width: 18px;
    text-align: center;
    font-size: 14px;
}

/* 右侧工具主内容区 */
.tools-main {
    flex: 1;
    min-width: 0;
}

/* 搜索栏 */
.tools-search {
    margin-bottom: 24px;
}

.tools-search .search-box {
    max-width: 600px;
    position: relative;
}

.tools-search .search-input {
    width: 100%;
    padding: 14px 50px 14px 20px;
    border-radius: 50px;
    border: 1px solid #e5e7eb;
    font-size: 14px;
    background: white;
    outline: none;
    transition: all 0.2s;
}

.tools-search .search-input:focus {
    border-color: #23a894;
    box-shadow: 0 0 0 3px rgba(35, 168, 148, 0.1);
}

.tools-search .search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 16px;
    cursor: pointer;
}

.tools-search .search-icon:hover {
    color: #23a894;
}

/* 工具网格 */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.tools-grid .tool-card {
    background: white;
    border-radius: 6px;
    padding: 24px;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
}

.tools-grid .tool-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(35, 168, 148, 0.15);
}

.tools-grid .tool-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.tools-grid .tool-icon {
    width: 40px;
    height: 40px;
    background: #e8f7f5;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #23a894;
    font-size: 18px;
    flex-shrink: 0;
    transition: all 0.3s;
}

.tools-grid .tool-card:hover .tool-icon {
    background: #23a894;
    color: white;
}

.tools-grid .tool-name {
    font-size: 15px;
    font-weight: 600;
    color: #1e2b3c;
    flex: 1;
    transition: color 0.3s;
}

.tools-grid .tool-card:hover .tool-name {
    color: #23a894;
}

.tools-grid .tool-description {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
    /* 限制最多显示2行 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state p {
    font-size: 16px;
    margin: 0;
}

/* 到底了提示 */
.end-message {
    text-align: center;
    padding: 32px 20px;
    color: #9ca3af;
    font-size: 14px;
}

/* 响应式 - 平板设备 */
@media (max-width: 1024px) {
    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 响应式 - 移动设备 */
@media (max-width: 768px) {
    .tools-layout {
        flex-direction: column;
    }
    
    .tools-sidebar {
        width: 100%;
    }
    
    .sidebar-menu {
        display: flex;
        overflow-x: auto;
        gap: 8px;
        border: none;
        background-color: transparent;
        box-shadow: none;
        padding: 0 20px;
        border-radius: 0;
        margin-right: -20px;
        margin-left: -20px;
    }
    
    .sidebar-menu::-webkit-scrollbar {
        display: none;
    }
    
    .sidebar-item {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 8px 16px;
        background: white;
        border: 1px solid #e5e7eb;
        border-radius: 3px;
        font-size: 14px;
        color: #6b7280;
        cursor: pointer;
        transition: all 0.2s;
        white-space: nowrap;
    }

    .sidebar-item.active {
        background: linear-gradient(135deg, #23a894 0%, #1a8677 100%);
        color: white;
        border-right: 0;
        border-color: #23a894;
        box-shadow: 0 2px 8px rgba(35, 168, 148, 0.25);
    }
    
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .tools-grid .tool-card {
        padding: 20px;
    }
}

/* 响应式 - 小屏设备 */
@media (max-width: 480px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }
}

/* 面包屑导航 */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0 0 20px;
    background: transparent;
}

/* 面包屑每一项容器 */
.breadcrumb-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

/* 可点击的链接样式（圆润药丸，半透明背景） */
.breadcrumb-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #4f6b6f;
    background: rgba(35, 168, 148, 0.08);
    padding: 0.35rem 1rem;
    border-radius: 6px;
    transition: all 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    border: 1px solid transparent;
}

/* 悬浮效果：主色介入，微上浮 + 阴影 */
.breadcrumb-link:hover {
    background: #ffffff;
    color: #23a894;
    border-color: rgba(35, 168, 148, 0.35);
    box-shadow: 0 6px 14px -8px rgba(35, 168, 148, 0.3);
    transform: translateY(-1px);
}

/* 当前激活项（不可点击，高亮主色背景） */
.breadcrumb-active {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(115deg, #23a894 0%, #2bc0aa 100%);
    padding: 0.35rem 1.2rem;
    border-radius: 6px;
    color: white;
    box-shadow: 0 6px 12px -6px rgba(35, 168, 148, 0.35);
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(1px);
}

/* 优雅的分隔符：右箭头图标替代斜线 */
.breadcrumb-separator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #b3cfca;
    font-size: 0.7rem;
    margin: 0 0.1rem;
}

/* 图标与文字间距微调 */
.breadcrumb-link i,
.breadcrumb-active i {
    font-size: 0.85rem;
    width: 1.1rem;
    text-align: center;
}

.breadcrumb {
    animation: fadeSlide 0.3s ease-out;
}

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

.pagination {
    display: flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    background: white;
    border: 1px solid #e5e7eb;
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.page-link:hover {
    border-color: #23a894;
    color: #23a894;
    background: #f0faf8;
}

.pagination .active .page-link {
    background: #23a894;
    border-color: #23a894;
    color: white;
}

.pagination .active .page-link:hover {
    background: #1a8677;
    border-color: #1a8677;
}

.pagination li.disabled span,
.pagination li.disabled a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    color: #d1d5db;
    font-size: 14px;
    font-weight: 500;
    cursor: not-allowed;
}

/* ============================================
   CenterPHP 工具详情页样式
   ============================================ */

/* 页面布局 */
.tool-detail-page {
    min-height: calc(100vh - 64px);
    background: #f8fafc;
    padding: 24px 0;
}

.tool-detail-layout {
    display: flex;
    gap: 24px;
}

/* 左侧分类侧边栏 */
.tool-sidebar {
    width: 200px;
    flex-shrink: 0;
}

/* 右侧工具主内容区 */
.tool-main {
    flex: 1;
    min-width: 0;
}

/* 工具头部 */
.tool-header {
    background: white;
    border-radius: 6px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.tool-header-left {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.tool-icon-large {
    width: 64px;
    height: 64px;
    background: #e8f7f5;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #23a894;
    font-size: 28px;
    flex-shrink: 0;
}

.tool-info {
    flex: 1;
}

.tool-title {
    font-size: 22px;
    font-weight: 700;
    color: #1e2b3c;
    margin-bottom: 8px;
}

.tool-info .tool-description {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
}

.favorite-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 3px;
    color: #6b7280;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.favorite-btn:hover,.favorite-btn.active {
    border-color: #23a894;
    color: #23a894;
}

.favorite-btn i {
    font-size: 16px;
}

/* 工具使用区域（未登录） */
.tool-usage-locked {
    background: #f0faf8;
    border: 2px dashed #23a894;
    border-radius: 12px;
    padding: 48px;
    text-align: center;
    margin-bottom: 24px;
}

.lock-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: #23a894;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
}

.lock-title {
    font-size: 20px;
    font-weight: 600;
    color: #1e2b3c;
    margin-bottom: 8px;
}

.lock-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 32px;
}

.lock-features {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 32px;
}

.lock-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1e2b3c;
    font-size: 14px;
    font-weight: 500;
}

.lock-feature i {
    color: #23a894;
    font-size: 16px;
}

.lock-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.btn-login,
.btn-register {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-login {
    background: #23a894;
    color: white;
}

.btn-login:hover {
    background: #1a8677;
}

.btn-register {
    background: white;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

.btn-register:hover {
    border-color: #23a894;
    color: #23a894;
}

/* 工具iframe容器 */
.tool-iframe-container {
    border-radius: 6px;
    margin-bottom: 24px;
}

.tool-iframe {
    width: 100%;
    height: 600px;
    border: none;
    border-radius: 6px;
}

/* 工具亮点 */
.tool-features {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.features-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e2b3c;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.features-title i {
    color: #23a894;
}

.features-list {
    list-style: none;
    padding: 0;
}

.features-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    font-size: 14px;
    color: #5e6f7d;
    line-height: 1.6;
}

.features-list li i {
    color: #23a894;
    font-size: 14px;
    margin-top: 2px;
    flex-shrink: 0;
}



/* 区块通用样式 */
.help-section, .related-section {
    background: white;
    border-radius: 6px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.section-title i {
    color: #23a894;
}

/* 帮助说明 */
.help-content {
    display: grid;
    gap: 12px;
}

.help-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 6px;
}

.help-item i {
    color: #10b981;
    font-size: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

.help-item div {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
}

.help-item strong {
    color: #374151;
}


/* 响应式 - 平板设备 */
@media (max-width: 1024px) {
    .tool-sidebar {
        width: 180px;
    }
}

/* 响应式 - 移动设备 */
@media (max-width: 768px) {
    .tool-detail-layout {
        flex-direction: column;
    }
    
    .tool-sidebar {
        width: 100%;
    }
    
    .tool-header {
        flex-direction: column;
        gap: 16px;
    }
    
    .tool-header-left {
        width: 100%;
    }
    
    .lock-features {
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }
    
    .lock-actions {
        flex-direction: column;
    }
    
    .btn-login,
    .btn-register {
        justify-content: center;
    }
}

/* 响应式 - 小屏设备 */
@media (max-width: 480px) {
    .tool-detail-page {
        padding: 24px 0;
    }
    
    .tool-header {
        padding: 20px;
    }
    
    .tool-icon-large {
        width: 56px;
        height: 56px;
        font-size: 24px;
    }
    
    .tool-title {
        font-size: 20px;
    }
    
    .tool-usage-locked {
        padding: 32px 24px;
    }
    
    .lock-title {
        font-size: 18px;
    }
    .breadcrumb-link, .breadcrumb-active {
        padding: 0.25rem 0.75rem;
        font-size: 0.8rem;
    }
    .breadcrumb-item {
        gap: 0.3rem;
    }
}