/* static/style.css */
/* ===== CSS Variables ===== */
:root {
    --primary: #4a6cf7;
    --primary-dark: #3b5de7;
    --primary-light: #e8edff;
    --gradient-start: #667eea;
    --gradient-end: #764ba2;
    --text-primary: #1a1a2e;
    --text-secondary: #4a5568;
    --text-muted: #6b7a8f;
    --bg-light: #f5f7fa;
    --bg-white: #ffffff;
    --border-color: #e8ecf1;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 40px rgba(0,0,0,0.15);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
}
a:hover {
    color: var(--primary-dark);
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(232,236,241,0.5);
    padding: 0 40px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
}

.header.scrolled {
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.header .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
}

.header .logo span {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header .logo .icon {
    font-size: 28px;
    -webkit-text-fill-color: initial;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-nav a {
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.header-nav a:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.header-nav .btn-login {
    background: var(--primary);
    color: white;
    padding: 8px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.header-nav .btn-login:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74,108,247,0.3);
    color: white;
}

.header-nav .btn-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 16px 6px 12px;
    border-radius: 30px;
    background: var(--primary-light);
    border: 1px solid rgba(74,108,247,0.2);
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.header-nav .btn-user:hover {
    background: #dde4ff;
    border-color: var(--primary);
}

.header-nav .btn-user .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}

.header-nav .user-menu {
    display: none;
    position: absolute;
    top: 60px;
    right: 0;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    border: 1px solid var(--border-color);
    min-width: 220px;
    padding: 8px 0;
    overflow: hidden;
}

.header-nav .user-menu.show {
    display: block;
}

.header-nav .user-menu .menu-item {
    padding: 10px 20px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.header-nav .user-menu .menu-item:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.header-nav .user-menu .menu-item.danger {
    color: #ef4444;
}
.header-nav .user-menu .menu-item.danger:hover {
    background: #fef2f2;
}

.header-nav .user-menu .divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 12px;
}

/* ===== Hero Section ===== */
.hero {
    padding: 120px 40px 80px;
    background: linear-gradient(135deg, #f0f4ff 0%, #faf5ff 100%);
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.hero h1 {
    font-size: 52px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 20px;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 30px;
}

.hero .badge-group {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.hero .badge {
    padding: 6px 20px;
    border-radius: 30px;
    background: white;
    border: 1px solid var(--border-color);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    box-shadow: var(--shadow);
}

.hero .badge .highlight {
    color: var(--primary);
    font-weight: 700;
}

.hero .cta-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.hero .cta-buttons .btn {
    padding: 14px 40px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.hero .cta-buttons .btn-primary {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    box-shadow: 0 4px 20px rgba(102,126,234,0.3);
}

.hero .cta-buttons .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(102,126,234,0.4);
}

.hero .cta-buttons .btn-secondary {
    background: white;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.hero .cta-buttons .btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

/* ===== Section Common ===== */
.section {
    padding: 70px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
}

.section-header p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Tools Grid ===== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.tool-card {
    background: white;
    border-radius: var(--radius);
    padding: 28px 24px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    box-shadow: var(--shadow);
     display: flex;
    flex-direction: column; 
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.tool-card .icon {
    font-size: 36px;
    margin-bottom: 12px;
    display: block;
}

.tool-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.tool-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    flex: 1;  /* 新增：让描述文字占据剩余空间，把按钮推向底部 */
    margin-bottom: 12px;
}

.tool-card .tag {
    display: inline-block;
    margin-top: 12px;
    padding: 3px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    background: var(--primary-light);
    color: var(--primary);
    align-self: flex-start;
    margin-bottom: 14px;
}

/* ===== MCP Guide ===== */
.mcp-guide {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 40px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.mcp-guide h3 {
    font-size: 22px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mcp-guide .code-block {
    background: #1a1a2e;
    color: #e0e0e0;
    padding: 20px 24px;
    border-radius: 10px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 14px;
    overflow-x: auto;
    margin: 12px 0 20px;
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.8;
}

.mcp-guide .code-block .comment {
    color: #6b7a8f;
}
.mcp-guide .code-block .keyword {
    color: #4a6cf7;
}
.mcp-guide .code-block .string {
    color: #22c55e;
}
.mcp-guide .code-block .function {
    color: #f59e0b;
}

.mcp-guide .step {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: var(--bg-light);
    border-radius: 10px;
    align-items: flex-start;
}

.mcp-guide .step .num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    font-size: 14px;
}

.mcp-guide .step .content {
    flex: 1;
}

.mcp-guide .step .content strong {
    display: block;
    font-size: 16px;
    margin-bottom: 4px;
}

.mcp-guide .step .content p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ===== Pricing ===== */
.pricing-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    text-align: center;
    max-width: 400px;
    margin: 0 auto;
}

.pricing-card .price {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary);
}

.pricing-card .price span {
    font-size: 20px;
    font-weight: 400;
    color: var(--text-muted);
}

.pricing-card ul {
    list-style: none;
    padding: 0;
    margin: 24px 0;
    text-align: left;
}

.pricing-card ul li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 15px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.pricing-card ul li:last-child {
    border-bottom: none;
}

.pricing-card .btn-primary {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    font-weight: 600;
    transition: var(--transition);
}

.pricing-card .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102,126,234,0.35);
}

/* ===== Modal ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: white;
    border-radius: var(--radius-lg);
    padding: 36px 40px;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal .close-btn {
    float: right;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
    line-height: 1;
}

.modal .close-btn:hover {
    color: var(--text-primary);
    transform: rotate(90deg);
}

.modal h2 {
    font-size: 24px;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.modal .form-group {
    margin-bottom: 18px;
}

.modal .form-group label {
    display: block;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.modal .form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 15px;
    transition: var(--transition);
    background: white;
}

.modal .form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(74,108,247,0.1);
}

.modal .captcha-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.modal .captcha-row img {
    height: 44px;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.modal .captcha-row .refresh-link {
    color: var(--primary);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.modal .captcha-row .refresh-link:hover {
    text-decoration: underline;
}

.modal .btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 8px;
}

.modal .btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102,126,234,0.35);
}

.modal .btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.modal .form-footer {
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-secondary);
}

.modal .form-footer .link {
    color: var(--primary);
    cursor: pointer;
    font-weight: 500;
}

.modal .form-footer .link:hover {
    text-decoration: underline;
}

.modal .result-msg {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    display: none;
}

.modal .result-msg.success {
    display: block;
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.modal .result-msg.error {
    display: block;
    background: #fbe9e7;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.modal .result-msg.info {
    display: block;
    background: #e3f2fd;
    color: #0d47a1;
    border: 1px solid #90caf9;
}

/* ===== Dashboard Modal ===== */
.dashboard-content .info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 15px;
}

.dashboard-content .info-row:last-child {
    border-bottom: none;
}

.dashboard-content .info-row .label {
    color: var(--text-muted);
}

.dashboard-content .info-row .value {
    font-weight: 600;
}

.dashboard-content .info-row .value.balance {
    color: var(--primary);
    font-size: 20px;
}

.dashboard-content .section-title {
    font-size: 16px;
    font-weight: 600;
    margin: 20px 0 12px;
    color: var(--text-primary);
}

.dashboard-content .key-item {
    background: var(--bg-light);
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
}

.dashboard-content .key-item .key-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.dashboard-content .key-item .key-name {
    font-weight: 600;
    font-size: 14px;
}

.dashboard-content .key-item .key-value {
    font-family: monospace;
    font-size: 13px;
    color: var(--text-muted);
    word-break: break-all;
    background: white;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    margin-top: 4px;
}

.dashboard-content .key-item .key-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

.dashboard-content .key-item .btn-sm {
    margin-top: 8px;
    padding: 4px 16px;
    font-size: 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: #ef4444;
    color: white;
    transition: var(--transition);
}

.dashboard-content .key-item .btn-sm:hover {
    background: #dc2626;
}

.dashboard-content .btn-secondary {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    color: var(--text-secondary);
}

.dashboard-content .btn-secondary:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

.dashboard-content .btn-primary-sm {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.dashboard-content .btn-primary-sm:hover {
    background: var(--primary-dark);
}

/* ===== Toast ===== */
#toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 14px 24px;
    border-radius: 12px;
    color: white;
    z-index: 3000;
    background: #1a1a2e;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s ease;
    max-width: 400px;
    font-size: 14px;
    pointer-events: none;
}

/* ===== Footer ===== */
.footer {
    background: #1a1a2e;
    color: #a8b5d9;
    padding: 40px;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer .links {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.footer .links a {
    color: #a8b5d9;
    font-size: 14px;
    transition: var(--transition);
}

.footer .links a:hover {
    color: white;
}

.footer p {
    font-size: 14px;
    opacity: 0.7;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .header {
        padding: 0 16px;
        height: 60px;
    }
    .header .logo {
        font-size: 18px;
    }
    .header .logo .icon {
        font-size: 22px;
    }
    .header-nav a:not(.btn-login):not(.btn-user) {
        display: none;
    }
    .hero {
        padding: 100px 20px 60px;
    }
    .hero h1 {
        font-size: 32px;
    }
    .hero p {
        font-size: 17px;
    }
    .section {
        padding: 40px 16px;
    }
    .section-header h2 {
        font-size: 28px;
    }
    .tools-grid {
        grid-template-columns: 1fr;
    }
    .mcp-guide {
        padding: 24px;
    }
    .mcp-guide .code-block {
        font-size: 12px;
        padding: 14px 16px;
    }
    .modal {
        padding: 28px 20px;
    }
    .pricing-card {
        padding: 28px 20px;
    }
    .header-nav .btn-login {
        padding: 6px 16px;
        font-size: 13px;
    }
    .header-nav .btn-user {
        padding: 4px 12px 4px 8px;
        font-size: 13px;
    }
    .header-nav .btn-user .avatar {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 26px;
    }
    .hero .cta-buttons .btn {
        padding: 12px 28px;
        font-size: 14px;
    }
    .modal .captcha-row {
        flex-wrap: wrap;
    }
    .modal .captcha-row img {
        height: 38px;
    }
}


/* ===== Tool Detail Modal ===== */
.tool-detail-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    justify-content: center;
    align-items: center;
    z-index: 2500;
    padding: 20px;
}

.tool-detail-overlay.show {
    display: flex;
}

.tool-detail-modal {
    background: white;
    border-radius: var(--radius-lg);
    padding: 36px 40px;
    max-width: 720px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0,0,0,0.35);
    animation: modalIn 0.3s ease;
    position: relative;
}

.tool-detail-modal .close-btn {
    position: sticky;
    top: 0;
    float: right;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
    line-height: 1;
    z-index: 10;
}

.tool-detail-modal .close-btn:hover {
    color: var(--text-primary);
    transform: rotate(90deg);
}

.tool-detail-modal .tool-icon {
    font-size: 48px;
    margin-bottom: 8px;
}

.tool-detail-modal .tool-name {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.tool-detail-modal .tool-tag {
    display: inline-block;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    background: var(--primary-light);
    color: var(--primary);
    margin-bottom: 20px;
}

.tool-detail-modal .section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 20px 0 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--primary-light);
}

.tool-detail-modal .section-title .badge {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 8px;
}

.tool-detail-modal .section-content {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.8;
    padding: 4px 0;
}

.tool-detail-modal .section-content code {
    background: #1a1a2e;
    color: #e0e0e0;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.tool-detail-modal .section-content .param {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    margin: 2px 0;
}

.tool-detail-modal .sample-data {
    background: #1a1a2e;
    color: #e0e0e0;
    padding: 16px 20px;
    border-radius: 10px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 13px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.6;
    margin: 8px 0 4px;
    max-height: 300px;
    overflow-y: auto;
}

.tool-detail-modal .sample-data .json-key {
    color: #4a6cf7;
}
.tool-detail-modal .sample-data .json-string {
    color: #22c55e;
}
.tool-detail-modal .sample-data .json-number {
    color: #f59e0b;
}
.tool-detail-modal .sample-data .json-boolean {
    color: #ef4444;
}
.tool-detail-modal .sample-data .json-null {
    color: #6b7a8f;
}

.tool-detail-modal .sample-data-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
}

.tool-detail-modal .sample-data-label .copy-btn {
    background: rgba(255,255,255,0.1);
    color: #a8b5d9;
    border: 1px solid rgba(255,255,255,0.15);
    padding: 4px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: var(--transition);
}

.tool-detail-modal .sample-data-label .copy-btn:hover {
    background: rgba(255,255,255,0.2);
    color: white;
}

.tool-detail-modal .call-rule {
    background: var(--bg-light);
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 3px solid var(--primary);
    margin: 6px 0;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 14px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.tool-detail-modal .call-rule .hl {
    color: var(--primary);
    font-weight: 600;
}

.tool-detail-modal .call-rule .hl-string {
    color: #22c55e;
}

@media (max-width: 768px) {
    .tool-detail-modal {
        padding: 24px 20px;
        max-width: 100%;
        margin: 10px;
    }
    .tool-detail-modal .tool-name {
        font-size: 22px;
    }
    .tool-detail-modal .sample-data {
        font-size: 12px;
        padding: 12px 14px;
        max-height: 200px;
    }
}

/* 工具卡片上的详细介绍按钮 */
.tool-card .btn-detail {
    display: inline-block;
    margin-top: 14px;
    padding: 6px 18px;
    background: transparent;
    border: 1.5px solid var(--primary);
    color: var(--primary);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    align-self: flex-end;  /* 新增：按钮靠右 */
    margin-top: auto;      /* 新增：自动推到底部 */
}

.tool-card .btn-detail:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(74,108,247,0.3);
}

.tool-card .btn-detail:active {
    transform: scale(0.96);
}
/* 管理员按钮样式 */
.btn-admin {
    padding: 8px 20px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
    border: none;
    cursor: pointer;
    display: none; /* 默认隐藏 */
}

.btn-admin:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

/* 管理员菜单项 */
.menu-item.admin-only {
    color: #d97706;
}

.menu-item.admin-only:hover {
    background: #fef3c7;
}

/* 二维码容器 */
#qrcode {
    display: inline-block;
    background: white;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

#qrcode img {
    display: block;
    margin: 0 auto;
}

/* 支付状态区域增强 */
#paymentStatusArea {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 16px;
    text-align: center;
    border: 2px dashed var(--border-color);
}

#paymentStatusText {
    font-size: 16px;
    font-weight: 500;
}


/* ===== 应用实例样式 ===== */
.examples-container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 20px;
}

.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 20px;
}

.screenshot-card {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.screenshot-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.screenshot-image {
    width: 100%;
    aspect-ratio: 16/10;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.screenshot-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.screenshot-fallback {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.screenshot-fallback span {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
}

.screenshot-fallback p {
    font-size: 14px;
    margin: 0;
}

.screenshot-caption {
    padding: 16px 20px 20px;
}

.screenshot-caption strong {
    display: block;
    font-size: 15px;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.screenshot-caption p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* 响应式适配 */
@media (max-width: 1024px) {
    .screenshot-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .screenshot-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .screenshot-image {
        aspect-ratio: 16/9;
    }
}

/* ===== 图片悬停效果 ===== */
.screenshot-image {
    width: 100%;
    aspect-ratio: 16/10;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.screenshot-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.screenshot-image:hover img {
    transform: scale(1.03);
}

.zoom-hint {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.screenshot-image:hover .zoom-hint {
    opacity: 1;
}

/* ===== 图片查看器（放大弹窗） ===== */
.image-viewer-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 40px;
    animation: fadeIn 0.3s ease;
}

.image-viewer-overlay.active {
    display: flex;
}

.image-viewer-content {
    max-width: 95vw;
    max-height: 90vh;
    text-align: center;
}

.image-viewer-content img {
    max-width: 100%;
    max-height: 82vh;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
    object-fit: contain;
    background: #1a1a2e;
}

.image-viewer-caption {
    color: #fff;
    font-size: 16px;
    margin-top: 16px;
    opacity: 0.9;
}

.image-viewer-close {
    position: fixed;
    top: 24px;
    right: 32px;
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 28px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s ease;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-viewer-close:hover {
    background: rgba(255,255,255,0.3);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== 截图卡片响应式 ===== */
.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 20px;
}

.screenshot-card {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.screenshot-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.screenshot-fallback {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.screenshot-fallback span {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
}

.screenshot-fallback p {
    font-size: 14px;
    margin: 0;
}

.screenshot-caption {
    padding: 16px 20px 20px;
}

.screenshot-caption strong {
    display: block;
    font-size: 15px;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.screenshot-caption p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .screenshot-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .screenshot-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .screenshot-image {
        aspect-ratio: 16/9;
    }
    
    .image-viewer-overlay {
        padding: 16px;
    }
    
    .image-viewer-close {
        top: 12px;
        right: 16px;
        width: 40px;
        height: 40px;
        font-size: 22px;
    }
}

/* ============================================ */
/* ===== 联系我们 板块样式 ===== */
/* ============================================ */

.contact-container {
    display: flex;
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 40px 50px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.08);
    align-items: stretch;
}

.contact-info {
    flex: 1;
    padding-right: 20px;
    border-right: 2px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
}

.contact-phone {
    display: flex;
    align-items: center;
    gap: 14px;
}

.contact-phone .phone-icon {
    font-size: 36px;
}

.contact-phone .phone-label {
    font-size: 14px;
    color: var(--text-muted);
    display: block;
}

.contact-phone .phone-number {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-hours, .contact-email {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 15px;
}

.contact-desc {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.contact-desc p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 6px 0;
}

.contact-desc strong {
    color: #f59e0b;
}

/* ===== 二维码轮播 ===== */

.contact-qrcode {
    flex: 0 0 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.contact-qrcode h3 {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.qrcode-carousel {
    position: relative;
    width: 160px;
    height: 210px;
    overflow: hidden;
    border-radius: 16px;
    background: #fafafa;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.qrcode-track {
    display: flex;
    transition: transform 0.5s ease;
    height: 100%;
}

.qrcode-item {
    flex: 0 0 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.qrcode-item img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 8px;
    background: white;
    padding: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.qrcode-item p {
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-muted);
}

.qrcode-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.qrcode-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: background 0.3s;
}

.qrcode-dots .dot.active {
    background: #f59e0b;
    width: 20px;
    border-radius: 4px;
}

/* ===== 联系我们响应式 ===== */

@media (max-width: 768px) {
    .contact-container {
        flex-direction: column;
        padding: 30px 24px;
        gap: 30px;
    }

    .contact-info {
        border-right: none;
        padding-right: 0;
        border-bottom: 2px solid #f0f0f0;
        padding-bottom: 24px;
    }

    .contact-qrcode {
        flex: 1;
        width: 100%;
    }

    .contact-phone .phone-number {
        font-size: 22px;
    }
}