/* ============================================================
   malinav v2.0 - 现代简洁风格
   彩虹工具网 前台模板样式
   ============================================================ */

/* ========== CSS 变量 ========== */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: rgba(99, 102, 241, 0.1);
    --secondary: #8b5cf6;
    --accent: #f59e0b;
    --success: #10b981;
    --gradient-main: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --gradient-hero: linear-gradient(135deg, #312e81 0%, #4338ca 50%, #6d28d9 100%);

    --bg-body: #f1f5f9;
    --bg-card: #ffffff;
    --bg-nav: rgba(255, 255, 255, 0.95);

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-white: #ffffff;

    --border-color: #e2e8f0;
    --border-light: #f1f5f9;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
    --transition: 0.2s ease;
}

/* ========== 全局 ========== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--text-primary);
    background: var(--bg-body);
    min-height: 100vh;
    line-height: 1.6;
    padding-top: 64px;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: var(--primary-dark);
}

/* ========== 导航栏 ========== */
.malinav-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 64px;
    background: var(--bg-nav);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(12px);
}

.malinav-header .header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.malinav-header .header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}
.malinav-header .header-brand:hover {
    color: var(--primary);
}
.malinav-header .header-brand img {
    height: 32px;
    width: auto;
}

.malinav-header .header-nav {
    display: flex;
    align-items: center;
    gap: 2px;
}
.malinav-header .header-nav a {
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition);
}
.malinav-header .header-nav a:hover {
    background: var(--primary-light);
    color: var(--primary);
}
.malinav-header .header-nav a.active {
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-md);
}

.malinav-header .header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dark-switch-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 16px;
    transition: all var(--transition);
}
.dark-switch-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}
.dark-switch-btn.active .fa-moon { display: none; }
.dark-switch-btn.active .fa-sun { display: inline; }
.dark-switch-btn .fa-sun { display: none; }

.user-dropdown {
    position: relative;
    cursor: pointer;
}
.user-dropdown .user-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition);
}
.user-dropdown .user-trigger:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.user-dropdown .user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}
.user-dropdown .dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    display: none;
    z-index: 100;
}
.user-dropdown .dropdown-menu.show { display: block; }
.user-dropdown .dropdown-menu .user-card {
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 4px;
}
.user-dropdown .dropdown-menu .user-card img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.user-dropdown .dropdown-menu .user-card .user-name {
    font-weight: 600;
    font-size: 14px;
}
.user-dropdown .dropdown-menu .user-card .user-vip {
    font-size: 12px;
    color: var(--text-muted);
}
.user-dropdown .dropdown-menu a {
    display: block;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-secondary);
    transition: all var(--transition);
}
.user-dropdown .dropdown-menu a:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.nav-toggle {
    display: none;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-secondary);
    transition: all var(--transition);
}
.nav-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 998;
}
.mobile-nav-overlay.show { display: block; }

.mobile-nav {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    z-index: 999;
    padding: 20px;
    transition: left 0.3s ease;
    overflow-y: auto;
}
.mobile-nav.show { left: 0; }
.mobile-nav .mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}
.mobile-nav .mobile-nav-header .brand {
    font-size: 18px;
    font-weight: 700;
}
.mobile-nav .mobile-nav-close {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--bg-body);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}
.mobile-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition);
    margin-bottom: 2px;
}
.mobile-nav a:hover,
.mobile-nav a.active {
    background: var(--primary-light);
    color: var(--primary);
}

/* ========== 英雄区 ========== */
.hero-section {
    padding: 60px 20px 50px;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 50%, #f0e6ff 100%);
    position: relative;
    overflow: hidden;
}
.hero-section .hero-inner {
    max-width: 680px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.hero-section .hero-title {
    font-size: 36px;
    font-weight: 800;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}
.hero-section .hero-title span {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-section .hero-subtitle {
    font-size: 16px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 28px;
}

.hero-search {
    position: relative;
    max-width: 540px;
    margin: 0 auto;
}
.hero-search .search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 18px;
    z-index: 2;
}
.hero-search input {
    width: 100%;
    height: 54px;
    padding: 0 60px 0 48px;
    border-radius: var(--radius-xl);
    border: 2px solid #e2e8f0;
    background: #fff;
    font-size: 16px;
    color: var(--text-primary);
    outline: none;
    box-shadow: 0 4px 20px rgba(99,102,241,0.08);
    transition: all 0.3s ease;
}
.hero-search input:focus {
    border-color: #6366f1;
    box-shadow: 0 8px 30px rgba(99,102,241,0.15), 0 0 0 4px rgba(99,102,241,0.1);
}
.hero-search .search-hint {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    padding: 3px 10px;
    border-radius: 6px;
    background: #f1f5f9;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    pointer-events: none;
    border: 1px solid #e2e8f0;
}

.hero-section .hero-title {
    font-size: 36px;
    font-weight: 800;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}
.hero-section .hero-subtitle {
    font-size: 16px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 28px;
}

.hero-search {
    position: relative;
    max-width: 540px;
    margin: 0 auto;
}
.hero-search .search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 18px;
    z-index: 2;
}
.hero-search input {
    width: 100%;
    height: 54px;
    padding: 0 60px 0 48px;
    border-radius: var(--radius-xl);
    border: none;
    background: #fff;
    font-size: 16px;
    color: var(--text-primary);
    outline: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08), 0 0 0 1px rgba(255,255,255,0.3);
    transition: all 0.3s ease;
}
.hero-search input:focus {
    box-shadow: 0 8px 30px rgba(0,0,0,0.12), 0 0 0 3px rgba(255,255,255,0.4);
    transform: scale(1.01);
}
.hero-search .search-hint {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--border-light);
    font-size: 11px;
    color: var(--text-muted);
    pointer-events: none;
}

/* ========== 分类胶囊 ========== */
.category-bar {
    padding: 0 20px;
    margin-top: -18px;
    position: relative;
    z-index: 2;
}
.category-bar .category-inner {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 12px 16px;
}
.category-bar .category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.category-bar .category-list .cat-btn {
    padding: 6px 18px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-body);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}
.category-bar .category-list .cat-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
}
.category-bar .category-list .cat-btn.active {
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-md);
}

/* ========== 工具卡片区域 ========== */
.tools-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px 40px;
}
.tools-section .category-group {
    margin-bottom: 28px;
}
.tools-section .category-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.tools-section .category-header .cat-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 15px;
}
.tools-section .category-header .cat-title {
    font-size: 16px;
    font-weight: 600;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.tool-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    color: var(--text-primary);
    cursor: pointer;
}
.tool-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    color: var(--text-primary);
}
.tool-card .tool-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: var(--radius-sm);
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 16px;
}
.tool-card .tool-icon.accent { background: rgba(245, 158, 11, 0.1); color: #d97706; }
.tool-card .tool-icon.green { background: rgba(16, 185, 129, 0.1); color: #059669; }
.tool-card .tool-icon.orange { background: rgba(239, 68, 68, 0.1); color: #dc2626; }
.tool-card .tool-icon.cyan { background: rgba(6, 182, 212, 0.1); color: #0891b2; }
.tool-card .tool-name {
    font-size: 14px;
    font-weight: 500;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tool-card .tool-arrow {
    color: var(--text-muted);
    font-size: 12px;
    opacity: 0;
    transform: translateX(-5px);
    transition: all var(--transition);
}
.tool-card:hover .tool-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ========== 友情链接 ========== */
.link-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
}
.link-section .link-card {
    padding: 20px 24px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}
.link-section .link-card .link-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
}
.link-section .link-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.link-section .link-list a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    transition: all var(--transition);
}
.link-section .link-list a:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ========== 页脚 ========== */
.malinav-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 20px;
    text-align: center;
}
.malinav-footer .footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    font-size: 13px;
    color: var(--text-muted);
}

/* ========== 空状态 ========== */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.4;
}
.empty-state .empty-text {
    font-size: 16px;
}

/* ========== 标题栏带操作按钮 ========== */
.section-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    margin-bottom: 16px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}
.section-bar .section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
}
.section-bar .section-title .title-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 14px;
}
.section-bar .btn-clear {
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
    cursor: pointer;
    transition: all var(--transition);
}
.section-bar .btn-clear:hover {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
}

/* ========== 按钮 ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-family);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}
.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-md);
}
.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
    color: #fff;
}
.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}
.btn-outline:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}
.btn-sm { padding: 6px 16px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-danger {
    background: #ef4444;
    color: #fff;
}
.btn-danger:hover {
    background: #dc2626;
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
    color: #fff;
}
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ========== 表单 ========== */
.form-group { margin-bottom: 16px; }
.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.form-input, .form-textarea {
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    font-size: 14px;
    font-family: var(--font-family);
    color: var(--text-primary);
    transition: all var(--transition);
    outline: none;
}
.form-input:focus, .form-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}
.form-textarea { resize: vertical; min-height: 100px; }

/* ========== 登录页 ========== */
.login-section {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}
.login-section .login-card {
    width: 100%;
    max-width: 400px;
    padding: 40px;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    text-align: center;
}
.login-section .login-card .login-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}
.login-section .login-card .login-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 30px;
}
.login-section .login-card .login-providers {
    display: flex;
    gap: 16px;
    justify-content: center;
}
.login-section .login-card .login-providers .provider-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 32px;
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
    background: var(--bg-body);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}
.login-section .login-card .login-providers .provider-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.login-section .login-card .login-providers .provider-btn.qq:hover {
    border-color: #12b7f5;
}
.login-section .login-card .login-providers .provider-btn.wechat:hover {
    border-color: #07c160;
}
.login-section .login-card .login-providers .provider-btn img {
    width: 48px;
    height: 48px;
}

/* ========== QQ登录扫码页 ========== */
.qqlogin-section {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}
.qqlogin-section .qqlogin-card {
    width: 100%;
    max-width: 400px;
    padding: 32px;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    text-align: center;
}
.qqlogin-section .qqlogin-card .qr-placeholder {
    width: 200px;
    height: 200px;
    margin: 20px auto;
    background: var(--bg-body);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--text-muted);
}
.qqlogin-section .qqlogin-card .login-status {
    padding: 12px;
    border-radius: var(--radius-sm);
    background: var(--primary-light);
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
}

/* ========== 留言页 ========== */
.comment-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px 40px;
}
.comment-section .comment-card {
    padding: 24px;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}
.comment-section .comment-card .comment-user {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.comment-section .comment-card .comment-user img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.comment-section .comment-card .comment-user .username {
    font-weight: 600;
    font-size: 15px;
}
.comment-section .comment-card .comment-user .time {
    font-size: 12px;
    color: var(--text-muted);
}
.comment-section .comment-card .comment-body {
    font-size: 15px;
    line-height: 1.7;
}
.comment-section .comment-card .comment-reply {
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: var(--primary-light);
    border-left: 3px solid var(--primary);
    font-size: 14px;
    color: var(--text-secondary);
}
.comment-section .comment-card .comment-reply .reply-label {
    font-weight: 600;
    color: var(--primary);
}

/* ========== 分页 ========== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 24px;
}
.pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: all var(--transition);
    cursor: pointer;
}
.pagination .page-link:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}
.pagination .page-item.active .page-link {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}
.pagination .page-item.disabled .page-link {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* ========== 插件页 ========== */
.plugin-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 20px 40px;
}
.plugin-content .plugin-toolbar {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}
.banner-text {
    text-align: center;
    padding: 10px 0;
    font-size: 14px;
    color: var(--text-muted);
}

/* ========== 插件页覆盖 Bootstrap 样式 ========== */
.plugin-content .card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}
.plugin-content .card-inner { padding: 24px; }
.plugin-content .card-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    background: transparent !important;
}
.plugin-content .card-header h6 {
    font-size: 15px; font-weight: 600; margin: 0;
}
.plugin-content .nya-title {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 16px; padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}
.plugin-content .nya-title .icon { color: var(--primary); }
.plugin-content .text-soft { color: var(--text-muted); font-size: 14px; }

/* Bootstrap 容器、居中备用 */
.plugin-content .container-xl,
.plugin-content .container-lg,
.plugin-content .container,
.plugin-content .container-md,
.plugin-content .container-sm {
    width: 100%;
    max-width: 1140px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}
.center-block {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* ========== 动画 ========== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in-up { animation: fadeInUp 0.4s ease forwards; }
.fade-in { animation: fadeIn 0.3s ease forwards; }

.category-group { animation: fadeInUp 0.4s ease forwards; }
.category-group:nth-child(1) { animation-delay: 0.04s; }
.category-group:nth-child(2) { animation-delay: 0.08s; }
.category-group:nth-child(3) { animation-delay: 0.12s; }
.category-group:nth-child(4) { animation-delay: 0.16s; }
.category-group:nth-child(5) { animation-delay: 0.2s; }

/* ========== 工具提示 ========== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 800px; margin: 0 auto; padding: 0 20px; }

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
    .tools-grid { grid-template-columns: repeat(3, 1fr); }
    .hero-section .hero-title { font-size: 28px; }
}

@media (max-width: 768px) {
    .malinav-header .header-nav { display: none; }
    .nav-toggle { display: flex; }
    .tools-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .tool-card { padding: 12px; }
    .tool-card .tool-icon { width: 34px; height: 34px; min-width: 34px; font-size: 14px; }
    .tool-card .tool-name { font-size: 13px; }
    .tool-card .tool-arrow { display: none; }
    .hero-section { padding: 40px 16px 36px; }
    .hero-section .hero-title { font-size: 24px; }
    .hero-section .hero-subtitle { font-size: 14px; }
    .hero-search input { height: 48px; font-size: 15px; padding: 0 48px 0 42px; }
    .hero-search .search-hint { display: none; }
    .category-bar .category-inner { padding: 10px 12px; }
    .category-bar .category-list .cat-btn { padding: 5px 14px; font-size: 12px; }
    .section-bar { padding: 12px 16px; }
    .login-section { padding: 40px 16px; }
    .login-section .login-card { padding: 28px 20px; }
    .comment-section { padding: 24px 12px 30px; }
    .comment-section .comment-card { padding: 18px; }
}

@media (max-width: 480px) {
    .tools-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .tool-card { padding: 10px; }
    .tool-card .tool-icon { width: 30px; height: 30px; min-width: 30px; font-size: 12px; }
    .tool-card .tool-name { font-size: 12px; }
    .hero-section .hero-title { font-size: 20px; }
    .hero-section { padding: 32px 12px 28px; }
}

/* ========== 辅助类 ========== */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.d-none { display: none; }
.w-100 { width: 100%; }

/* ========== 插件页面按钮实心背景 ========== */
.plugin-content .btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}
.plugin-content .btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99,102,241,0.4);
}
.plugin-content .btn-outline-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}
.plugin-content .btn-outline-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
}
.plugin-content .btn-outline-secondary {
    background: #64748b;
    border-color: #64748b;
    color: #fff;
}
.plugin-content .btn-outline-secondary:hover {
    background: #475569;
    border-color: #475569;
    color: #fff;
}
.plugin-content .btn-dim {
    opacity: 1;
}
.plugin-content .btn-danger {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
}
.plugin-content .btn-danger:hover {
    background: #dc2626;
}
.plugin-content .btn-success {
    background: #10b981;
    border-color: #10b981;
    color: #fff;
}
.plugin-content .btn-success:hover {
    background: #059669;
}
.plugin-content .btn-warning {
    background: #f59e0b;
    border-color: #f59e0b;
    color: #fff;
}
.plugin-content .btn-warning:hover {
    background: #d97706;
}
.plugin-content .btn-info {
    background: #06b6d4;
    border-color: #06b6d4;
    color: #fff;
}
.plugin-content .btn-info:hover {
    background: #0891b2;
}
.plugin-content .btn:active {
    transform: translateY(1px);
    box-shadow: none !important;
}

/* 深色模式按钮 */
body.dark-mode .plugin-content .btn-outline-primary {
    box-shadow: 0 2px 8px rgba(99,102,241,0.2);
}
