/* ===== 数学教学工具大师 - 全局样式 ===== */

/* 重置与基础 */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --accent: #f59e0b;
    --text: #1e293b;
    --text-secondary: #64748b;
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.2s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== 公告栏 ===== */
.announce-bar {
    background: linear-gradient(90deg, var(--primary) 0%, #7c3aed 100%);
    color: white;
    font-size: 14px;
    padding: 8px 0;
    position: relative;
    z-index: 200;
}

.announce-bar.hidden {
    display: none;
}

.announce-inner {
    display: flex;
    align-items: center;
    gap: 8px;
}

.announce-icon {
    flex-shrink: 0;
}

.announce-text {
    flex: 1;
}

.announce-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.7;
    padding: 0 4px;
    flex-shrink: 0;
    line-height: 1;
}

.announce-close:hover {
    opacity: 1;
}

/* ===== 顶部导航 ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    height: 64px;
}

.header-inner {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 32px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 18px;
    white-space: nowrap;
}

.logo-icon {
    font-size: 24px;
}

.nav {
    display: flex;
    gap: 4px;
    flex: 1;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.nav-link.active {
    color: var(--primary);
    background: var(--primary-light);
}

.header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-name {
    font-weight: 600;
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
}

/* ===== 按钮 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 16px;
    border-radius: var(--radius);
}

.btn-sm {
    padding: 4px 12px;
    font-size: 13px;
}

.btn-block {
    width: 100%;
}

/* ===== Hero区域 ===== */
.hero {
    padding: 80px 0 60px;
    text-align: center;
    background: linear-gradient(180deg, var(--primary-light) 0%, var(--bg) 100%);
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
}

.highlight {
    color: var(--primary);
    position: relative;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 48px;
}

.hero-stats {
    display: flex;
    gap: 48px;
    justify-content: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ===== 通用区块 ===== */
.section {
    padding: 64px 0;
}

.section-alt {
    background: var(--bg-alt);
}

.section-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.section-desc {
    text-align: center;
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 40px;
}

/* ===== 工具卡片网格（首页） ===== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.tool-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.tool-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.tool-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.tool-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.tool-desc {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.tool-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    background: var(--bg-alt);
    color: var(--text-secondary);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.tool-arrow {
    position: absolute;
    top: 28px;
    right: 28px;
    font-size: 20px;
    color: var(--border);
    transition: var(--transition);
}

.tool-card:hover .tool-arrow {
    color: var(--primary);
    transform: translateX(4px);
}

/* ===== 工具列表（工具页） ===== */
.tools-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tool-list-item {
    display: flex;
    align-items: center;
    gap: 24px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 28px;
    cursor: pointer;
    transition: var(--transition);
}

.tool-list-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.tool-list-icon {
    font-size: 48px;
    flex-shrink: 0;
}

.tool-list-info {
    flex: 1;
}

.tool-list-info h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
}

.tool-list-info p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
}

.tool-list-item .tool-arrow {
    position: static;
    font-size: 24px;
    color: var(--border);
    flex-shrink: 0;
}

.tool-list-item:hover .tool-arrow {
    color: var(--primary);
    transform: translateX(4px);
}

/* ===== 特色功能 ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.feature-item {
    text-align: center;
    padding: 24px;
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.feature-item h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-item p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ===== 教学场景 ===== */
.scenarios-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.scenario-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    text-align: center;
    transition: var(--transition);
}

.scenario-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.scenario-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.scenario-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--primary);
}

.scenario-card p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
}

/* ===== CTA区域 ===== */
.cta-section {
    text-align: center;
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    color: white;
}

.cta-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
}

.cta-desc {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 24px;
}

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

/* ===== 工具查看器 ===== */
.tool-view-header {
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}

.tool-view-header .container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.tool-view-title {
    font-size: 18px;
    font-weight: 600;
}

.tool-view-container {
    flex: 1;
    position: relative;
    height: calc(100vh - 64px - 52px - 80px);
    min-height: 600px;
}

.tool-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* 工具加载动画 */
.tool-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--text-secondary);
    z-index: 1;
}

.tool-loading.hidden {
    display: none;
}

.tool-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto 12px;
    animation: spin 0.8s linear infinite;
}

.tool-loading p {
    font-size: 14px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== 认证页面（登录/注册） ===== */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 64px - 80px);
    padding: 40px 24px;
    background: var(--bg-alt);
}

.auth-card {
    background: var(--bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 40px;
    width: 100%;
    max-width: 420px;
}

.auth-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 28px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    transition: var(--transition);
    outline: none;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-actions {
    margin-top: 24px;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ===== 页面头部 ===== */
.page-header {
    background: linear-gradient(180deg, var(--primary-light) 0%, var(--bg) 100%);
    padding: 48px 0 32px;
    text-align: center;
}

.page-header h1 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 8px;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 16px;
}

/* ===== FAQ ===== */
.faq-content {
    max-width: 760px;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    border-color: var(--primary);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    background: var(--bg);
    transition: var(--transition);
    user-select: none;
}

.faq-question:hover {
    background: var(--bg-alt);
}

.faq-toggle {
    font-size: 22px;
    color: var(--primary);
    transition: transform 0.2s;
    flex-shrink: 0;
    margin-left: 16px;
}

.faq-item.open .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.open .faq-answer {
    max-height: 300px;
}

.faq-answer p {
    padding: 0 24px 18px;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.8;
}

.faq-cta {
    text-align: center;
    margin-top: 48px;
    padding: 32px;
    background: var(--bg-alt);
    border-radius: var(--radius);
}

.faq-cta p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 15px;
}

/* ===== 关于我们 ===== */
.about-content {
    max-width: 700px;
    margin: 0 auto;
}

.about-block {
    margin-bottom: 36px;
}

.about-block h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.about-block p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.8;
}

.about-roadmap {
    list-style: none;
    margin-top: 12px;
}

.about-roadmap li {
    padding: 8px 0;
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    border-bottom: 1px dashed var(--border);
}

.about-roadmap li:last-child {
    border-bottom: none;
}

.about-contact {
    list-style: none;
    margin-top: 12px;
}

.about-contact li {
    padding: 6px 0;
    font-size: 15px;
    color: var(--text-secondary);
}

.about-contact a {
    color: var(--primary);
    text-decoration: none;
}

.about-contact a:hover {
    text-decoration: underline;
}

/* ===== 底部 ===== */
.footer {
    background: var(--text);
    color: rgba(255,255,255,0.7);
    padding: 32px 0;
    margin-top: auto;
}

.footer-inner {
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    color: white;
    margin-bottom: 12px;
}

.footer-links {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 14px;
}

.footer-links a:hover {
    color: white;
}

.footer-contact {
    font-size: 13px;
    color: rgba(255,255,255,0.4);
    margin-bottom: 8px;
}

.footer-copy {
    font-size: 13px;
    color: rgba(255,255,255,0.4);
}

.footer-copy a {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
}

.footer-copy a:hover {
    color: white;
    text-decoration: underline;
}

/* 广告位 */
.ad-slot {
    margin-top: 24px;
    border: 1px dashed rgba(255,255,255,0.2);
    border-radius: var(--radius-sm);
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: rgba(255,255,255,0.2);
}

/* ===== Toast通知 ===== */
.toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 20px;
    box-shadow: var(--shadow-lg);
    font-size: 14px;
    animation: toastIn 0.3s ease;
    max-width: 320px;
}

.toast.success {
    border-left: 4px solid #22c55e;
}

.toast.error {
    border-left: 4px solid #ef4444;
}

.toast.info {
    border-left: 4px solid var(--primary);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 12px;
        box-shadow: var(--shadow-md);
    }

    .nav.open {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .header-actions {
        display: none;
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 15px;
    }

    .hero-stats {
        gap: 24px;
    }

    .stat-number {
        font-size: 28px;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .scenarios-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tool-list-item {
        flex-direction: column;
        text-align: center;
    }

    .tool-list-item .tool-arrow {
        display: none;
    }

    .faq-question {
        font-size: 14px;
        padding: 14px 16px;
    }

    .cta-actions {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 48px 0 36px;
    }

    .hero-title {
        font-size: 28px;
    }

    .section {
        padding: 40px 0;
    }

    .section-title {
        font-size: 24px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .scenarios-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== 用户数展示 ===== */
.user-counter-section {
    padding: 16px 0;
    background: var(--primary-light);
    border-bottom: 1px solid var(--border);
}

.user-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 16px;
    color: var(--text);
}

.counter-icon {
    font-size: 24px;
}

.counter-text strong {
    color: var(--primary);
    font-size: 22px;
    font-weight: 800;
    margin: 0 4px;
}

/* ===== 浮动反馈按钮 ===== */
.floating-feedback {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 24px;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    z-index: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-feedback:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.3);
}

/* ===== 反馈弹窗 ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-overlay.show {
    display: flex;
}

.modal-card {
    background: var(--bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 520px;
    max-height: 80vh;
    overflow-y: auto;
    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-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text);
}

.modal-body {
    padding: 24px;
}

.modal-desc {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
    line-height: 1.6;
}

/* ===== 响应式补充 ===== */
@media (max-width: 768px) {
    .floating-feedback {
        bottom: 20px;
        right: 20px;
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .modal-overlay {
        padding: 16px;
        align-items: flex-end;
    }

    .modal-card {
        max-height: 85vh;
        border-radius: var(--radius) var(--radius) 0 0;
    }
}

/* ===== 工具卡片 - 眼睛计数和收藏按钮 ===== */
.tool-card { position: relative; overflow: hidden; }

.tool-fav-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    border: none;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 5;
    color: #ccc;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.tool-fav-btn:hover { transform: scale(1.15); }
.tool-fav-btn.favorited { color: #ff6b35; }

.tool-visit-count {
    position: absolute;
    bottom: 10px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #aaa;
    z-index: 5;
}
.tool-visit-count .eye-icon { font-size: 14px; }


/* ===== 首页工具搜索框（高级版） ===== */
.tools-search-box {
    max-width: 640px;
    margin: 0 auto 40px;
    position: relative;
}

.tools-search-input {
    width: 100%;
    padding: 16px 24px 16px 52px;
    border: 2px solid var(--border);
    border-radius: 16px;
    font-size: 17px;
    outline: none;
    transition: all 0.3s ease;
    background: var(--bg);
    box-shadow: 0 2px 12px rgba(37, 99, 235, 0.06);
}

.tools-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 4px 24px rgba(37, 99, 235, 0.12);
    transform: translateY(-1px);
}

.tools-search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--text-secondary);
    pointer-events: none;
    transition: color 0.3s;
}

.tools-search-input:focus ~ .tools-search-icon {
    color: var(--primary);
}

.tools-search-clear {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: var(--bg-alt);
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.tools-search-clear:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.tools-search-clear.visible {
    display: flex;
}

.tools-no-result {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-secondary);
    font-size: 16px;
}

.tools-no-result p {
    margin: 0;
}

/* ===== 用户下拉菜单 ===== */
.user-dropdown-wrapper {
    position: relative;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 200;
    overflow: hidden;
}

.user-dropdown-wrapper:hover .user-dropdown,
.user-dropdown-wrapper:focus-within .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: none;
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s;
    text-align: left;
    white-space: nowrap;
}

.user-dropdown-item:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.user-dropdown-item .dropdown-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.user-dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

/* ===== 标语横幅 ===== */
.cta-banner {
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 50%, var(--primary) 100%);
    background-size: 200% 200%;
    animation: gradientShift 6s ease infinite;
    padding: 36px 24px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.cta-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    animation: rotateBg 20s linear infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes rotateBg {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.cta-banner-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.cta-banner-text {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.6;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.cta-banner-cursor {
    display: inline-block;
    width: 3px;
    height: 24px;
    background: rgba(255,255,255,0.8);
    margin-left: 4px;
    vertical-align: middle;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.cta-banner-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 50px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.cta-banner-btn:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.7);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

@media (max-width: 768px) {
    .tools-search-input {
        font-size: 15px;
        padding: 12px 16px 12px 44px;
    }

    .tools-search-icon {
        left: 16px;
        font-size: 18px;
    }

    .cta-banner-text {
        font-size: 18px;
    }

    .cta-banner {
        padding: 28px 16px;
    }
}