/* ===== 站长工具 - 前台样式 ===== */

/* 全局变量 */
:root {
    --primary: #4a6cf7;
    --primary-light: #6b8cff;
    --primary-dark: #3a56d7;
    --bg: #f5f7fa;
    --sidebar-bg: #1e293b;
    --header-bg: #ffffff;
    --text: #333333;
    --text-muted: #6c757d;
    --border: #e9ecef;
    --card: #ffffff;
    --shadow: 0 2px 15px rgba(0,0,0,0.05);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
}

/* 重置 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* 主布局 */
.layout { display: flex; min-height: 100vh; }

/* ===== 左侧边栏 ===== */
.sidebar {
    width: 12%;
    min-width: 160px;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    color: #a0aec0;
}
.sidebar-header { padding: 24px 20px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.sidebar-logo {
    display: flex; align-items: center; gap: 12px;
    font-size: 20px; font-weight: 700; color: #ffffff; white-space: nowrap;
}
.sidebar-logo i { font-size: 24px; color: var(--primary); }

/* 侧边栏客服版块 */
.sidebar-service {
    margin: 12px 12px 0;
    padding: 14px 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
}
.sidebar-service .service-title {
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.sidebar-service .service-title i {
    font-size: 13px;
    color: var(--primary);
}
.sidebar-service .service-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.sidebar-service .service-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    color: #cbd5e1;
    transition: var(--transition);
    cursor: pointer;
}
.sidebar-service .service-item:hover {
    background: rgba(255,255,255,0.1);
    color: #ffffff;
}
.sidebar-service .service-item i {
    width: 18px;
    text-align: center;
    font-size: 16px;
    flex-shrink: 0;
}
.sidebar-service .service-qq i { color: #12B7F5; }
.sidebar-service .service-tg i { color: #2AABEE; }
.sidebar-service .service-desc {
    font-size: 11px;
    color: #64748b;
    margin-left: auto;
}

.sidebar-nav { flex: 1; overflow-y: auto; padding: 16px 0; }
.sidebar-nav ul { display: flex; flex-direction: column; gap: 4px; padding: 0 12px; }
.sidebar-nav a {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; border-radius: var(--radius-sm);
    color: #a0aec0; font-size: 14px; transition: var(--transition); white-space: nowrap;
}
.sidebar-nav a:hover { background: rgba(255,255,255,0.08); color: #ffffff; }
.sidebar-nav a.active { background: var(--primary); color: #ffffff; font-weight: 500; }
.sidebar-nav a i { width: 20px; text-align: center; font-size: 16px; flex-shrink: 0; }
.sidebar-footer { padding: 20px; border-top: 1px solid rgba(255,255,255,0.08); margin-top: auto; }
.sidebar-copyright { text-align: center; font-size: 12px; line-height: 1.8; color: #718096; }
.sidebar-copyright p:first-child { color: #a0aec0; }
.sidebar-copyright i { color: #e74c3c; margin-right: 4px; }

/* ===== 右侧主内容区 ===== */
.main-wrapper { flex: 1; margin-left: 12%; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }

/* ===== 顶部栏 ===== */
.header {
    background: var(--header-bg); padding: 0 32px; height: 70px;
    display: flex; align-items: center; justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06); position: sticky; top: 0; z-index: 50;
}
.header-left { flex: 1; max-width: 400px; }
.header-search {
    display: flex; align-items: center; background: var(--bg);
    border-radius: 50px; padding: 0 20px; height: 42px;
    border: 1px solid transparent; transition: var(--transition);
}
.header-search:focus-within { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(74,108,247,0.1); }
.header-search i { color: var(--text-muted); margin-right: 10px; font-size: 14px; }
.header-search input { border: none; background: transparent; outline: none; font-size: 14px; width: 100%; color: var(--text); }
.header-right { display: flex; align-items: center; gap: 16px; }

/* 认证按钮 */
.auth-buttons { display: flex; gap: 10px; }
.btn-login, .btn-register {
    padding: 8px 24px; border-radius: 50px; font-size: 14px; font-weight: 500;
    cursor: pointer; transition: var(--transition); border: none;
}
.btn-login { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-login:hover { border-color: var(--primary); color: var(--primary); }
.btn-register { background: var(--primary); color: #fff; }
.btn-register:hover { background: var(--primary-dark); }

/* 用户菜单 */
.user-menu { position: relative; }
.user-menu-btn {
    display: flex; align-items: center; gap: 8px; padding: 8px 16px;
    border: 1px solid var(--border); border-radius: 50px; background: #fff;
    cursor: pointer; font-size: 14px; color: var(--text); transition: var(--transition);
}
.user-menu-btn:hover { border-color: var(--primary); }
.user-menu-btn i:first-child { font-size: 18px; color: var(--primary); }
.user-dropdown {
    position: absolute; top: calc(100% + 8px); right: 0;
    background: #fff; border-radius: var(--radius-sm);
    box-shadow: 0 10px 40px rgba(0,0,0,0.12); min-width: 180px;
    padding: 8px; display: none; z-index: 100;
}
.user-dropdown a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; border-radius: 6px; font-size: 14px;
    color: var(--text); transition: var(--transition);
}
.user-dropdown a:hover { background: var(--bg); color: var(--primary); }
.user-dropdown a i { width: 18px; text-align: center; color: var(--text-muted); }
.user-dropdown.show { display: block; }

/* ===== 主内容 ===== */
.main-content { padding: 32px; flex: 1; }

/* ===== 首页幻灯片区 - 两栏布局 ===== */
.hero-row {
    display: flex; gap: 20px; margin-bottom: 30px;
    min-height: 320px;
}
.hero-left { flex: 0 0 60%; min-width: 0; }
.hero-right { flex: 1; min-width: 0; }

/* 轮播容器（嵌入 hero-left） */
.carousel-container {
    border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow); background: #fff;
    height: 100%; min-height: 320px;
}
.carousel { position: relative; width: 100%; height: 100%; overflow: hidden; }
.carousel-item { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.6s ease; }
.carousel-item.active { opacity: 1; }
.carousel-item img { width: 100%; height: 100%; object-fit: cover; }
.carousel-caption {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 32px 24px 24px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7)); color: #fff;
}
.carousel-caption h3 { font-size: 20px; margin-bottom: 6px; }
.carousel-caption p { font-size: 13px; opacity: 0.9; }
.carousel-indicators {
    position: absolute; bottom: 14px; right: 24px; display: flex; gap: 6px; z-index: 10;
}
.carousel-indicators span {
    width: 8px; height: 8px; border-radius: 50%;
    background: rgba(255,255,255,0.5); cursor: pointer; transition: var(--transition);
}
.carousel-indicators span.active { background: #fff; width: 20px; border-radius: 4px; }

/* ===== 右栏 TAB 标签面板 ===== */
.hero-right {
    background: #fff; border-radius: var(--radius);
    box-shadow: var(--shadow); display: flex; flex-direction: column;
    overflow: hidden;
}
.hero-tabs {
    display: flex; border-bottom: 1px solid #f0f0f0; flex-shrink: 0;
}
.hero-tab {
    flex: 1; padding: 13px 10px; border: none; background: transparent;
    font-size: 13px; font-weight: 500; color: #888; cursor: pointer;
    transition: all 0.2s; position: relative; white-space: nowrap;
}
.hero-tab:hover { color: #555; background: #fafbfc; }
.hero-tab.active { color: var(--primary); font-weight: 600; }
.hero-tab.active::after {
    content: ''; position: absolute; bottom: 0; left: 20%; right: 20%;
    height: 2px; background: var(--primary); border-radius: 2px 2px 0 0;
}
.hero-panels { flex: 1; overflow-y: auto; }
.hero-panel {
    display: none; padding: 12px 0;
}
.hero-panel.active { display: block; }

/* 新闻列表 */
.hero-news-list { list-style: none; margin: 0; padding: 0; }
.hero-news-list li { padding: 0 16px; }
.hero-news-list li a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 0; border-bottom: 1px solid #f8f9fa;
    text-decoration: none; transition: all 0.2s;
}
.hero-news-list li a:hover { background: #f8f9ff; margin: 0 -16px; padding: 10px 16px; border-radius: 6px; }
.news-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--primary); flex-shrink: 0;
}
.news-dot-announce { background: #f5576c; }
.news-title {
    flex: 1; font-size: 13px; color: #444;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.news-time { font-size: 11px; color: #bbb; flex-shrink: 0; }

/* 联系我们 */
.hero-contact {
    display: flex; flex-direction: column; gap: 1px; padding: 4px 0;
}
.hero-contact-item {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 20px; text-decoration: none;
    transition: all 0.2s; border-bottom: 1px solid #f8f9fa;
}
.hero-contact-item:hover { background: #f8f9ff; }
.contact-icon {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: #fff; flex-shrink: 0;
}
.contact-qq  { background: linear-gradient(135deg, #12B7F5, #0d8fd9); }
.contact-tg  { background: linear-gradient(135deg, #2AABEE, #1d8ec9); }
.contact-email { background: linear-gradient(135deg, #f59e0b, #d97706); }
.contact-info { flex: 1; }
.contact-label { font-size: 12px; color: #999; margin-bottom: 2px; }
.contact-val { font-size: 14px; color: #333; font-weight: 500; }

/* 响应式 - 幻灯片区 */
@media (max-width: 992px) {
    .hero-row { flex-direction: column; }
    .hero-left { flex: none; width: 100%; }
    .carousel-container { min-height: 240px; }
    .hero-right { min-height: 260px; }
}
@media (max-width: 768px) {
    .carousel-container { min-height: 200px; }
    .carousel-caption h3 { font-size: 17px; }
    .hero-tab { font-size: 12px; padding: 10px 6px; }
}

/* ===== 内容区两栏布局 ===== */
.content-row { display: flex; gap: 24px; }
.content-left { flex: 1; min-width: 0; }
.content-right { width: 20%; min-width: 220px; flex-shrink: 0; }

/* ===== 右侧固定栏 ===== */
.sidebar-sticky { position: sticky; top: 90px; }
.sidebar-panel {
    background: #fff; border-radius: var(--radius); padding: 16px;
    margin-bottom: 16px; box-shadow: var(--shadow); border: 1px solid #eef0f4;
}
.sidebar-panel-title {
    font-size: 14px; font-weight: 600; color: #333;
    padding-bottom: 10px; margin-bottom: 10px; border-bottom: 2px solid #f0f0f0;
    display: flex; align-items: center; gap: 8px;
}
.sidebar-panel-title i { color: var(--primary); font-size: 14px; }

/* 排行榜列表 */
.rank-list { list-style: none; padding: 0; margin: 0; }
.rank-list li { margin-bottom: 2px; }
.rank-list li a {
    display: flex; align-items: center; gap: 8px; padding: 7px 8px;
    border-radius: 6px; text-decoration: none; font-size: 13px; color: #444;
    transition: all 0.2s;
}
.rank-list li a:hover { background: #f8f9ff; color: var(--primary); }
.rank-num {
    width: 20px; height: 20px; border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; flex-shrink: 0; color: #fff;
}
.rank-num.top1 { background: #e74c3c; }
.rank-num.top2 { background: #f59e0b; }
.rank-num.top3 { background: #3b82f6; }
.rank-num.normal { background: #a0aec0; }
.rank-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-views { font-size: 11px; color: #bbb; }

/* 文章列表 */
.article-list { list-style: none; padding: 0; margin: 0; }
.article-list li { margin-bottom: 2px; }
.article-list li a {
    display: block; padding: 7px 8px; border-radius: 6px;
    font-size: 13px; color: #444; text-decoration: none;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    transition: all 0.2s;
}
.article-list li a:hover { background: #f8f9ff; color: var(--primary); }

/* 友情链接 */
.link-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.link-list li a {
    display: inline-block; padding: 4px 10px; border-radius: 4px;
    font-size: 12px; color: #666; text-decoration: none; background: #f8f9fa;
    transition: all 0.2s;
}
.link-list li a:hover { background: #eef2ff; color: var(--primary); }

/* 响应式：右侧栏在小屏幕隐藏 */
@media (max-width: 992px) {
    .content-right { display: none; }
    .content-left { width: 100%; }
}

/* ===== 分类区块 ===== */
.category-section { margin-bottom: 36px; }
.category-header { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.category-icon {
    width: 42px; height: 42px; background: var(--primary);
    border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 18px; flex-shrink: 0;
}
.category-name { font-size: 20px; font-weight: 600; flex: 1; }
.section-more { font-size: 14px; color: var(--primary); display: flex; align-items: center; gap: 6px; transition: var(--transition); }
.section-more:hover { gap: 10px; }

/* ===== 工具卡片网格 ===== */
.tools-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.tool-card {
    background: var(--card); border-radius: var(--radius); padding: 24px 20px;
    text-align: center; transition: var(--transition); box-shadow: var(--shadow);
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    cursor: pointer; border: 1px solid transparent;
}
.tool-card:hover { transform: translateY(-6px); box-shadow: 0 8px 30px rgba(0,0,0,0.12); border-color: var(--primary); }
.tool-card-icon {
    width: 56px; height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 16px; display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 22px; transition: var(--transition);
}
.tool-card:hover .tool-card-icon { transform: scale(1.1); }
.tool-card-title { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.4; display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.card-badge {
    display: inline-block; padding: 2px 8px; border-radius: 4px;
    font-size: 11px; font-weight: 700; line-height: 1.6; flex-shrink: 0;
}
.card-badge-free { background: #dbeafe; color: #2563eb; }
.card-badge-vip  { background: #fee2e2; color: #dc2626; }
.tool-card-desc {
    font-size: 12px; color: var(--text-muted); line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}

/* ===== 页面头部 ===== */
.page-header { margin-bottom: 30px; }
.page-header h1 { font-size: 26px; font-weight: 700; display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.page-header p { font-size: 14px; color: var(--text-muted); }

/* ===== 工具详情页 ===== */
.tool-detail { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.tool-detail-header { display: flex; align-items: center; gap: 24px; padding: 32px; border-bottom: 1px solid var(--border); }
.tool-detail-icon {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 18px; display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 28px; flex-shrink: 0;
}
.tool-detail-info { flex: 1; }
.tool-detail-info h1 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.tool-detail-info > p { font-size: 14px; color: var(--text-muted); }
.tool-detail-content { padding: 32px; min-height: 400px; }

/* ===== 用户中心 ===== */
.user-center-sidebar {
    background: #fff; border-radius: var(--radius); padding: 40px 30px;
    text-align: center; box-shadow: var(--shadow);
    height: fit-content; position: sticky; top: 100px;
}
.user-avatar {
    width: 90px; height: 90px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 40px; margin: 0 auto 20px;
}
.user-name { font-size: 20px; font-weight: 600; margin-bottom: 6px; }
.user-email { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }
.user-stats { display: flex; justify-content: center; gap: 24px; padding-top: 24px; border-top: 1px solid var(--border); }
.stat-item { text-align: center; }
.stat-value { font-size: 20px; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ===== 表单样式 ===== */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 8px; }
.form-control {
    width: 100%; padding: 12px 16px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); font-size: 14px; color: var(--text);
    background: #fff; transition: var(--transition); outline: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(74,108,247,0.1); }
.btn-submit {
    width: 100%; padding: 14px; background: var(--primary); color: #fff;
    border: none; border-radius: var(--radius-sm); font-size: 15px; font-weight: 600;
    cursor: pointer; transition: var(--transition);
}
.btn-submit:hover { background: var(--primary-dark); }
.form-footer { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-muted); }
.form-footer a { color: var(--primary); font-weight: 500; }
.form-footer a:hover { text-decoration: underline; }

/* ===== 弹窗 ===== */
.modal-overlay {
    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: 1000; backdrop-filter: blur(4px);
}
.modal-overlay.active { display: flex; }
.modal {
    background: #fff; border-radius: 20px; padding: 40px; width: 420px; max-width: 90vw;
    position: relative; box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: modalIn 0.3s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-close {
    position: absolute; top: 16px; right: 16px; width: 36px; height: 36px;
    border: none; background: var(--bg); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--text-muted); font-size: 16px; transition: var(--transition);
}
.modal-close:hover { background: #fee; color: #e74c3c; }
.modal-title { font-size: 24px; font-weight: 700; margin-bottom: 28px; text-align: center; }

/* ===== 响应式设计 ===== */
@media (max-width: 1400px) { .tools-grid { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 1200px) { .tools-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 992px) {
    .sidebar { width: 70px; min-width: 70px; }
    .sidebar-logo span, .sidebar-nav a span, .sidebar-copyright { display: none; }
    .sidebar-logo { justify-content: center; }
    .sidebar-nav a { justify-content: center; padding: 14px; }
    .sidebar-nav a i { margin: 0; }
    .main-wrapper { margin-left: 70px; }
    .tools-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .sidebar { display: none; }
    .main-wrapper { margin-left: 0; }
    .header { padding: 0 16px; }
    .header-left { max-width: 200px; }
    .main-content { padding: 20px 16px; }
    .tools-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .carousel-container { min-height: 200px; }
    .tool-detail-header { flex-direction: column; text-align: center; padding: 20px; }
    .user-center-sidebar { position: static; }
}
@media (max-width: 480px) {
    .tools-grid { grid-template-columns: 1fr; }
    .modal { padding: 30px 20px; }
}

/* ===== 工具内容区域 ===== */
.tool-detail-content textarea,
.tool-detail-content input[type="text"],
.tool-detail-content input[type="number"],
.tool-detail-content select {
    width: 100%; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 14px; font-family: inherit; transition: var(--transition); outline: none;
}
.tool-detail-content textarea:focus,
.tool-detail-content input[type="text"]:focus,
.tool-detail-content input[type="number"]:focus,
.tool-detail-content select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(74,108,247,0.1); }
.tool-detail-content button {
    padding: 10px 24px; background: var(--primary); color: #fff; border: none;
    border-radius: var(--radius-sm); font-size: 14px; font-weight: 500;
    cursor: pointer; transition: var(--transition);
}
.tool-detail-content button:hover { background: var(--primary-dark); }
.tool-detail-content .result-box {
    margin-top: 20px; padding: 16px; background: var(--bg); border-radius: var(--radius-sm);
    border: 1px solid var(--border); font-family: 'Courier New', monospace;
    font-size: 13px; white-space: pre-wrap; word-break: break-all;
    max-height: 400px; overflow-y: auto;
}

/* ===== 滚动条美化 ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #a8a8a8; }

/* ===== 动画 ===== */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.tool-card { animation: fadeIn 0.4s ease backwards; }
.tools-grid .tool-card:nth-child(1) { animation-delay: 0.05s; }
.tools-grid .tool-card:nth-child(2) { animation-delay: 0.1s; }
.tools-grid .tool-card:nth-child(3) { animation-delay: 0.15s; }
.tools-grid .tool-card:nth-child(4) { animation-delay: 0.2s; }
.tools-grid .tool-card:nth-child(5) { animation-delay: 0.25s; }
.tools-grid .tool-card:nth-child(6) { animation-delay: 0.3s; }

/* ===== VIP相关样式 ===== */
.vip-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
}

.vip-expired {
    padding: 30px;
    text-align: center;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.vip-expired i {
    font-size: 50px;
    color: #ddd;
    margin-bottom: 20px;
}

.vip-expired h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text);
}

.vip-expired p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* VIP到期提醒 */
.vip-remind {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 20px 30px;
    border-radius: var(--radius);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.vip-remind-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.vip-remind-icon {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.vip-remind-text h4 {
    font-size: 18px;
    margin-bottom: 4px;
}

.vip-remind-text p {
    font-size: 14px;
    opacity: 0.9;
}

.vip-remind .btn-buy {
    padding: 10px 30px;
    background: #fff;
    color: #667eea;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.vip-remind .btn-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* 工具卡片VIP标识 */
.tool-card.vip-only::before {
    content: 'VIP';
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 2px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    z-index: 1;
}

.tool-card {
    position: relative;
}

/* 响应式VIP样式 */
@media (max-width: 768px) {
    .vip-remind {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .vip-remind-content {
        flex-direction: column;
    }
}

/* ========== 弹窗样式 ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    width: 90%;
    max-width: 420px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

/* 弹窗内的表单样式 */
.modal .form-group {
    margin-bottom: 20px;
}

.modal .form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-size: 14px;
    font-weight: 500;
}

.modal .form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.modal .form-control:focus {
    outline: none;
    border-color: #667eea;
}

.modal .btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 10px;
}

.modal .btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.modal .form-footer {
    text-align: center;
    margin-top: 20px;
    color: #777;
    font-size: 14px;
}

.modal .form-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.modal .form-footer a:hover {
    text-decoration: underline;
}

/* 移动端弹窗适配 */
@media (max-width: 480px) {
    .modal {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .modal-title {
        font-size: 20px;
    }
}

/* ================================================================
   常用工具快捷栏 (Pinned Quick Tools Bar)
   ================================================================ */
.quick-bar {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    margin-bottom: 28px;
    overflow: hidden;
    transition: all 0.35s ease;
}
.quick-bar.is-empty {
    display: none;
}
.quick-bar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 22px;
    border-bottom: 1px solid #f3f4f6;
    background: linear-gradient(135deg, #fafbff, #f8f9ff);
}
.quick-bar-icon {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 15px; flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(245,87,108,0.2);
}
.quick-bar-title {
    font-size: 15px; font-weight: 600; color: #333;
    flex: 1;
}
.quick-bar-count {
    font-size: 12px; color: #667eea; font-weight: 500;
    background: rgba(102,126,234,0.08);
    padding: 2px 10px; border-radius: 20px;
}
.quick-bar-hint {
    font-size: 12px; color: #b0b8c1;
}
.quick-bar-clear {
    background: none; border: 1px solid transparent; color: #b0b8c1;
    cursor: pointer; font-size: 12px; padding: 5px 10px; border-radius: 6px;
    transition: all 0.2s; white-space: nowrap;
    display: flex; align-items: center; gap: 4px;
}
.quick-bar-clear:hover {
    color: #e74c3c; background: #fff5f5; border-color: #fecaca;
}
.quick-bar-items {
    display: flex; flex-wrap: wrap; gap: 10px;
    padding: 16px 22px;
    min-height: 52px;
}
/* 空状态占位 */
.quick-bar-placeholder {
    display: flex; align-items: center; justify-content: center;
    gap: 10px; padding: 20px; color: #d0d5dd;
    font-size: 13px; width: 100%;
}
.quick-bar-placeholder i {
    font-size: 18px; color: #e0e5ec;
}

/* 每个已固定的工具标签 */
.quick-pin-item {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 10px 7px 10px;
    background: linear-gradient(135deg, #f8f9ff, #f0f2ff);
    border: 1px solid #e4e7f5;
    border-radius: 10px;
    font-size: 13px; color: #4a5568;
    cursor: pointer; text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.quick-pin-item::before {
    content: '';
    position: absolute;
    left: 0; top: 50%; transform: translateY(-50%);
    width: 3px; height: 0;
    background: linear-gradient(180deg, #667eea, #764ba2);
    border-radius: 0 3px 3px 0;
    transition: height 0.25s ease;
}
.quick-pin-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(102,126,234,0.18);
    border-color: #c4caf0;
    background: #fff;
}
.quick-pin-item:hover::before {
    height: 65%;
}
.quick-pin-item .pin-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    flex-shrink: 0;
    transition: transform 0.25s;
}
.quick-pin-item:hover .pin-dot {
    transform: scale(1.3);
}
.quick-pin-item .pin-label {
    max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-weight: 500;
}
.quick-pin-item .pin-remove {
    width: 20px; height: 20px; border-radius: 50%;
    background: transparent; border: none;
    color: #a0aec0; font-size: 10px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s; flex-shrink: 0;
}
.quick-pin-item .pin-remove:hover {
    background: #fee2e2; color: #e74c3c;
}
/* 入场动画 */
.quick-pin-item.pin-in {
    animation: quickPinIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes quickPinIn {
    from { opacity: 0; transform: translateY(-12px) scale(0.8); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ================================================================
   工具卡片右上角 + 号固定按钮
   ================================================================ */
.pin-btn {
    position: absolute;
    top: 6px; right: 6px;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    border: 1.5px solid #dde1e7;
    color: #8899aa;
    font-size: 13px; line-height: 1;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    z-index: 10;
    padding: 0;
    outline: none;
    transition: opacity 0.2s ease, transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.6);
    pointer-events: none;
}
/* hover 卡片时显示 + 号按钮 */
.tool-card:hover .pin-btn,
.tool-card:focus-within .pin-btn {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    pointer-events: auto;
}
/* hover 按钮本身（加深） */
.pin-btn:hover {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    border-color: #667eea !important;
    color: #fff !important;
    box-shadow: 0 4px 16px rgba(102,126,234,0.35) !important;
    transform: scale(1.12) !important;
}
/* 已固定状态 - 始终可见 */
.pin-btn.is-pinned {
    opacity: 1 !important;
    visibility: visible !important;
    transform: scale(1) !important;
    pointer-events: auto !important;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
    color: #fff;
    box-shadow: 0 2px 10px rgba(102,126,234,0.25);
}
.pin-btn.is-pinned:hover {
    background: linear-gradient(135deg, #e74c3c, #c0392b) !important;
    border-color: #e74c3c !important;
    box-shadow: 0 4px 16px rgba(231,76,60,0.4) !important;
    transform: scale(1.15) !important;
}

/* ================================================================
   Toast 弹出提示
   ================================================================ */
.pin-toast {
    position: fixed; bottom: 36px; left: 50%; transform: translateX(-50%);
    background: linear-gradient(135deg, #333, #1a1a2e);
    color: #f0f0f0;
    padding: 11px 26px; border-radius: 50px;
    font-size: 13px; font-weight: 500;
    z-index: 99999; pointer-events: none;
    box-shadow: 0 6px 30px rgba(0,0,0,0.25);
    animation: pinToastIn 0.4s cubic-bezier(0.34, 1.3, 0.64, 1);
    letter-spacing: 0.3px;
}
@keyframes pinToastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(18px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* 响应式 */
@media (max-width: 768px) {
    .quick-bar-items { padding: 12px 14px; gap: 8px; }
    .quick-pin-item { padding: 6px 14px; font-size: 12px; }
    .quick-bar-header { padding: 12px 14px; flex-wrap: wrap; gap: 8px; }
    .pin-btn { opacity: 1; transform: scale(0.9) rotate(0deg); width: 26px; height: 26px; font-size: 12px; top: 6px; right: 6px; }
}
