/* ============================================
   PC端页面样式 - index.php 专用CSS
   只包含index.php实际使用的样式类
   ============================================ */

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

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: rgb(240, 240, 240);
    color: rgb(88, 88, 88);
}

/* ========== 主容器布局 ========== */
/* 页面主容器 - 使用flex布局分为左侧边栏和右侧内容区 */
.container {
    display: flex;
    min-height: 100vh;
}

/* ========== 左侧导航栏 ========== */
/* 左侧边栏容器 */
.sidebar {
    width: 280px;
    background: rgb(240, 240, 240);
    padding: 0;
}

/* 工具卡片板块 - 包含设置按钮和欢迎图片 */
.tools-section {
    background: white;
    margin: 20px 0 20px 20px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 20px;
}

/* 设置按钮 */
.settings-btn {
    width: 100%;
    padding: 12px 16px;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    transition: opacity 0.2s ease;
}

.settings-btn:hover {
    opacity: 0.9;
}

.settings-btn:active {
    opacity: 0.8;
}

/* 欢迎图片容器 */
.welcome-box {
    margin-top: 15px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    cursor: pointer;
    transition: opacity 0.2s ease;
    text-decoration: none;
    display: block;
}

.welcome-box:hover {
    opacity: 0.9;
}

/* 欢迎图片 */
.welcome-image {
    width: 100%;
    border-radius: 6px;
    display: block;
}

/* ========== 友情链接和小工具板块 ========== */
/* 通用板块容器 - 用于友情链接和小工具列表 */
.member-section {
    background: white;
    margin: 0 0 20px 20px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 20px;
}

/* 导航菜单容器 */
.nav-menu {
    padding: 0;
}

/* 导航区块 */
.nav-section {
    margin-bottom: 25px;
}

/* 导航区块头部 - 包含标题和搜索按钮 */
.nav-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    position: relative;
}

/* 导航区块标题 */
.nav-section-title {
    font-size: 16px;
    font-weight: bold;
    color: rgb(88, 88, 88);
    transition: opacity 0.3s ease;
}

/* 标题隐藏状态 - 搜索时使用 */
.nav-section-title.hidden {
    opacity: 0;
    pointer-events: none;
}

/* ========== 搜索功能 ========== */
/* 搜索容器 */
.tools-search-container {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 搜索图标按钮 */
.search-icon-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: rgb(88, 88, 88);
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.search-icon-btn:hover {
    background: rgb(240, 240, 240);
    color: #667eea;
}

/* 搜索输入框容器 - 展开时显示 */
.search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 5px;
    position: absolute;
    right: 0;
    top: 0;
    background: white;
    padding: 0;
    border-radius: 4px;
    animation: slideIn 0.3s ease;
}

/* 搜索框展开动画 */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 搜索输入框 */
.search-input {
    width: 120px;
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 12px;
    outline: none;
    transition: border-color 0.2s ease;
}

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

/* 搜索按钮 */
.search-btn {
    padding: 6px 12px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

.search-btn:hover {
    opacity: 0.9;
}

/* 搜索关闭按钮 */
.search-close-btn {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: rgb(88, 88, 88);
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.search-close-btn:hover {
    background: rgb(240, 240, 240);
    color: #ea4335;
}

/* ========== 导航项目列表 ========== */
/* 导航项隐藏状态 - 搜索时使用 */
.nav-item.hidden {
    display: none;
}

/* 导航项 - 小工具列表项 */
.nav-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    margin-bottom: 8px;
    cursor: pointer;
    text-decoration: none;
    color: rgb(88, 88, 88);
    font-size: 14px;
}

/* 导航项激活状态 */
.nav-item.active {
    color: #5a67d8;
    font-weight: 500;
}

/* 导航项图标 */
.nav-item i {
    margin-right: 10px;
    width: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* 导航项图片图标 */
.nav-icon-img {
    width: 16px;
    height: 16px;
    object-fit: contain;
    display: block;
}

/* ========== 主内容区域 ========== */
/* 主内容容器 */
.main-content {
    flex: 1;
    padding: 20px;
    background: rgb(240, 240, 240);
}

/* 内容容器 - 白色背景卡片 */
.content-container {
    background: white;
    border-radius: 6px;
    padding: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* ========== 加载动画 ========== */
/* 加载容器 - JS动态创建 */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 50px;
}

/* 加载旋转器 - JS动态创建 */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 加载点容器 - JS动态创建 */
.loading-dots {
    display: flex;
    gap: 8px;
    margin-top: 20px;
}

/* 加载点 - JS动态创建 */
.loading-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #667eea;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 加载文本 - JS动态创建 */
.loading-text {
    margin-top: 16px;
    font-size: 14px;
    color: #6b7280;
}

/* ========== 内容切换动画 ========== */
/* 淡出动画 - JS动态添加 */
.fade-out {
    opacity: 0;
    transition: opacity 0.15s ease;
}

/* 淡入动画 - JS动态添加 */
.fade-in {
    opacity: 1;
    transition: opacity 0.15s ease;
}

/* ========== Toast 提示系统 ========== */
/* Toast容器 - JS动态创建 */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    pointer-events: none;
}

/* Toast提示卡片 - JS动态创建 */
.toast {
    padding: 12px 20px;
    border-radius: 4px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    transform: translateX(100%);
    transition: all 0.3s ease;
    opacity: 0;
}

/* Toast显示状态 */
.toast.show {
    transform: translateX(0);
    opacity: 1;
}

/* Toast隐藏状态 */
.toast.hide {
    transform: translateX(100%);
    opacity: 0;
}

/* Toast处理中状态 - 橙色 */
.toast.processing {
    background: #f59e0b;
}

/* Toast成功状态 - 蓝色 */
.toast.success {
    background: #3b82f6;
}

/* Toast图标 */
.toast-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #333;
}

/* ========== 友情链接 ========== */
/* 友情链接云容器 */
.friend-links-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
}

/* 友情链接标签 */
.friend-link-tag {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 15px;
    color: white;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.friend-link-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    opacity: 0.9;
}

.friend-link-tag:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ========== 模态框系统 ========== */
/* 模态框容器 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

/* 模态框显示状态 */
.modal.show {
    display: flex;
}

/* 模态框内容容器 */
.modal-content {
    background: white;
    border-radius: 16px;
    padding: 0;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 模态框头部 */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
}

/* 模态框标题 */
.modal-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

/* 模态框关闭按钮 */
.modal-close {
    background: #007aff;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.modal-close:hover {
    opacity: 0.9;
}

/* 模态框主体内容 */
.modal-body {
    padding: 20px;
    max-height: calc(80vh - 70px);
    overflow-y: auto;
}

/* ========== 模态框标签页系统 ========== */
/* 标签页容器 - JS动态创建 */
.modal-tabs {
    width: 100%;
}

/* 标签按钮容器 - JS动态创建 */
.tab-buttons {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 20px;
}

/* 标签按钮 - JS动态创建 */
.tab-btn {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* 标签按钮激活状态 */
.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

/* 标签内容容器 - JS动态创建 */
.tab-content {
    width: 100%;
}

/* 标签面板 - JS动态创建 */
.tab-pane {
    display: none;
}

/* 标签面板激活状态 */
.tab-pane.active {
    display: block;
}

/* ========== 信息卡片 ========== */
/* 信息卡片组容器 - JS动态创建 */
.info-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 信息卡片 - JS动态创建 */
.info-card {
    background: #f9fafb;
    border-radius: 8px;
    padding: 16px;
}

/* 信息卡片标题 - JS动态创建 */
.info-card-title {
    font-size: 15px;
    font-weight: bold;
    color: #333;
    margin-bottom: 12px;
}

/* 信息卡片内容 - JS动态创建 */
.info-card-content p {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 8px;
}

.info-card-content p:last-child {
    margin-bottom: 0;
}

/* ========== 配置表单 ========== */
/* 配置区域容器 - JS动态创建 */
.config-section {
    width: 100%;
}

/* 表单组 - JS动态创建 */
.form-group {
    margin-bottom: 16px;
}

/* 表单标签 - JS动态创建 */
.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

/* 输入框 - JS动态创建 */
.input-field {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    color: rgb(88, 88, 88);
}

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

/* 按钮基础样式 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

/* 主要按钮样式 */
.btn-primary {
    width: 100%;
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    opacity: 0.9;
}

/* ========== 响应式设计 ========== */
/* 小屏幕适配 - 平板和手机 */
@media (max-width: 768px) {
    /* 容器改为垂直布局 */
    .container {
        flex-direction: column;
    }
    
    /* 侧边栏占满宽度 */
    .sidebar {
        width: 100%;
    }
    
    /* 主内容区减少内边距 */
    .main-content {
        padding: 20px;
    }
}
