:root {
    --bg-body: #f7f9fa;
    --bg-glass: rgba(255, 255, 255, 0.95);
    --bg-card: #ffffff;
    --border-color: rgba(0, 0, 0, 0.06);
    --primary: #00b96b;
    --primary-glow: rgba(0, 185, 107, 0.25);
    --secondary: #25c77f;
    --text-main: #262626;
    --text-muted: #8a8f8d;
    --danger: #f5222d;
    --success: #00b96b;
    --warning: #faad14;
    --sidebar-width: 240px;
    --shadow-light: 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-medium: 0 6px 16px rgba(0, 0, 0, 0.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; outline: none; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 顶部栏 */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 56px;
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.05); }
::-webkit-scrollbar-thumb { background: rgba(0, 185, 107, 0.35); border-radius: 3px; }

.sidebar {
    display: none;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-main);
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: white;
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* 放大并裁切，去掉图片边缘的留白 */
    transform: scale(1.25);
    transform-origin: center center;
}

/* 给图片加一个裁切容器，保证放大后不溢出 */
.logo-img-wrap {
    width: 32px;
    height: 32px;
    overflow: hidden;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 0;
}

.nav-menu { display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }

.nav-tab {
    padding: 10px 14px;
    border-radius: 6px;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 400;
    border: none;
    background: transparent;
    font-size: 0.9rem;
    width: 100%;
    text-align: left;
    transition: all 0.2s;
}

.nav-tab:hover { background: rgba(0, 185, 107, 0.08); color: var(--primary); }
.nav-tab.active {
    background: rgba(0, 185, 107, 0.1);
    color: var(--primary);
    font-weight: 500;
}

.main-content { flex: 1; overflow-y: auto; padding: 1.5rem 2rem; position: relative; }

.content-section { display: none; max-width: 1200px; margin: 0 auto; }
.content-section.active { display: block; animation: fadeIn 0.4s; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-header { margin-bottom: 2rem; }
.page-title { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.5rem; }
.page-subtitle { color: var(--text-muted); font-size: 0.95rem; }

.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-light);
}

.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }

.stat-card { position: relative; overflow: hidden; }
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.stat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: rgba(255, 107, 53, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.stat-value { font-size: 3rem; font-weight: 800; color: var(--primary); line-height: 1; margin-bottom: 0.5rem; }
.stat-label { color: var(--text-muted); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; }

.control-group {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.input-wrapper label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.form-input {
    width: 100%;
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 185, 107, 0.15);
}

textarea.form-input {
    min-height: 120px;
    resize: vertical;
    font-family: 'Consolas', monospace;
    line-height: 1.5;
}

.drag-area {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.3s;
    cursor: pointer;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.drag-area:hover, .drag-area.dragover {
    border-color: var(--primary);
    background: rgba(0, 185, 107, 0.05);
    color: var(--primary);
}

.drag-area i { font-size: 2rem; margin-bottom: 0.5rem; }

.action-bar { display: flex; flex-wrap: wrap; gap: 10px; }

.btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    color: white;
    height: 42px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.btn:hover { transform: translateY(-2px); filter: brightness(1.05); }

.btn-primary { background: var(--primary); }
.btn-primary:hover { background: #00a35f; }
.btn-danger { background: var(--danger); }
.btn-warning { background: var(--warning); }

.file-label {
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
}

.file-label:hover { background: rgba(0, 185, 107, 0.05); color: var(--primary); border-color: var(--primary); }
.file-label.has-file { border-color: var(--success); color: var(--success); background: rgba(56, 161, 105, 0.05); }
input[type="file"] { display: none; }

.table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    -webkit-overflow-scrolling: touch;
}

#email-table {
    min-width: 900px;
}

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }

th {
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-muted);
    font-weight: 600;
    text-align: left;
    padding: 1rem;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    background: white;
}

/* 操作列固定到右侧 */
#email-table th:last-child,
#email-table td:last-child {
    position: sticky;
    right: 0;
    background: white;
    z-index: 2;
    white-space: nowrap;
    min-width: 240px;
    box-shadow: -6px 0 10px -6px rgba(0, 0, 0, 0.1);
}

#email-table th:last-child {
    background: #fafafa;
}

#email-table tr:hover td:last-child {
    background: #f7fbf9;
}

#email-table td:last-child > div {
    flex-wrap: nowrap;
}

tr:hover td { background: rgba(0, 185, 107, 0.03); }

.copy-group { display: flex; align-items: center; gap: 8px; max-width: 200px; }

.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: 'Consolas', monospace;
    background: rgba(0,0,0,0.03);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
}

.copy-btn {
    background: transparent;
    border: none;
    color: var(--primary);
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.2s;
}

.copy-btn:hover { opacity: 1; transform: scale(1.1); }

.btn-xs { padding: 4px 10px; font-size: 0.75rem; height: 28px; border-radius: 6px; white-space: nowrap; }

.pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 1rem;
    background: white;
}

.pagination-controls { display: flex; gap: 4px; align-items: center; }

.page-btn {
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    cursor: pointer;
    padding: 0 8px;
    transition: all 0.2s;
}

.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: white; }

.page-select {
    background: white;
    border: 1px solid var(--border-color);
    padding: 4px 8px;
    border-radius: 6px;
}

.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-box {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    animation: zoomIn 0.3s;
}

.modal-large { max-width: 800px; }

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mail-content-box {
    background: rgba(0,0,0,0.03);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    border-left: 3px solid var(--primary);
    max-height: 400px;
    overflow-y: auto;
}

.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: white;
    border: 1px solid var(--border-color);
    padding: 16px 20px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 320px;
    transform: translateX(120%);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-left: 4px solid var(--primary);
}

.toast.show { transform: translateX(0); }
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }

.toast-content h4 { font-size: 0.95rem; margin-bottom: 4px; }
.toast-content p { font-size: 0.85rem; color: var(--text-muted); }

.loading-screen {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(248, 249, 250, 0.9);
    backdrop-filter: blur(5px);
    z-index: 3000;
    display: none;
    justify-content: center;
    align-items: center;
}

.spinner {
    width: 50px; height: 50px;
    border: 3px solid rgba(255, 107, 53, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.empty-state { padding: 3rem; text-align: center; color: var(--text-muted); }
.empty-state i { font-size: 3rem; margin-bottom: 1rem; opacity: 0.3; }

.help-text { color: var(--text-muted); line-height: 1.6; }
.help-text strong { color: var(--secondary); }

.email-status-bar {
    background: rgba(0, 185, 107, 0.08);
    border-left: 4px solid var(--primary);
    padding: 1rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 15px;
}


/* ===================== 移动端适配 ===================== */
@media (max-width: 768px) {
    /* 移动端取消表格最小宽度和 sticky */
    .table-wrapper {
        overflow-x: visible;
    }

    #email-table,
    #mail-table {
        min-width: 0 !important;
        width: 100% !important;
    }

    #email-table th:last-child,
    #email-table td:last-child {
        position: static;
        box-shadow: none;
        min-width: 0;
    }

    .topbar {
        height: 50px;
        padding: 0 1rem;
    }

    .logo {
        font-size: 1rem;
    }

    .logo-icon {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }

    body {
        height: auto;
        overflow-y: auto;
    }

    .sidebar {
        display: none;
    }

    .main-content {
        padding: 1rem;
    }

    .page-title {
        font-size: 1.25rem;
    }

    .page-subtitle {
        font-size: 0.85rem;
    }

    .glass-card {
        padding: 1rem;
        border-radius: 12px;
    }

    .control-group {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    textarea.form-input {
        min-height: 100px;
        font-size: 0.85rem;
    }

    .drag-area {
        padding: 0.75rem;
    }

    .drag-area i {
        font-size: 1.5rem;
    }

    /* 响应式文字切换 */
    .btn-text-short { display: inline; }
    .btn-text-full { display: none; }

    /* 操作按钮：3 列网格 */
    .action-bar {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .action-bar .btn {
        width: 100%;
        justify-content: center;
        padding: 10px 4px;
        font-size: 0.78rem;
        height: 38px;
        gap: 4px;
    }

    .action-bar .btn i {
        font-size: 0.85rem;
    }

    /* 表格区：卡片化呈现 */
    #email-table thead {
        display: none;
    }

    #email-table,
    #email-table tbody,
    #email-table tr,
    #email-table td {
        display: block;
        width: 100%;
    }

    #email-table tr {
        background: white;
        border: 1px solid var(--border-color);
        border-radius: 10px;
        margin-bottom: 10px;
        padding: 10px 12px;
        position: relative;
    }

    #email-table td {
        border: none;
        padding: 4px 0;
        background: transparent !important;
    }

    /* 复选框与序号单独一行 */
    #email-table td:nth-child(1) {
        position: absolute;
        top: 10px;
        right: 10px;
        width: auto;
    }

    #email-table td:nth-child(2) {
        display: inline-block;
        width: auto;
        color: var(--text-muted);
        font-size: 0.75rem;
        margin-bottom: 4px;
    }

    #email-table td:nth-child(2)::before {
        content: '# ';
    }

    /* 为每个字段添加标签 */
    #email-table td:nth-child(n+3):nth-child(-n+6) {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 3px 0;
    }

    #email-table td:nth-child(3)::before { content: '邮箱:'; }
    #email-table td:nth-child(4)::before { content: '密码:'; }
    #email-table td:nth-child(5)::before { content: 'Client:'; }
    #email-table td:nth-child(6)::before { content: 'Token:'; }

    #email-table td:nth-child(n+3):nth-child(-n+6)::before {
        width: 56px;
        flex-shrink: 0;
        color: var(--text-muted);
        font-size: 0.75rem;
    }

    #email-table td .copy-group {
        flex: 1;
        max-width: none;
        min-width: 0;
    }

    #email-table td .text-truncate {
        flex: 1;
        min-width: 0;
    }

    /* 操作按钮行 */
    #email-table td:last-child {
        padding-top: 10px;
        margin-top: 8px;
        border-top: 1px dashed var(--border-color);
        width: 100%;
    }

    #email-table td:last-child > div {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        width: 100%;
    }

    #email-table td:last-child .btn-xs {
        padding: 8px 2px;
        font-size: 0.8rem;
        height: 36px;
        justify-content: center;
        gap: 4px;
        width: 100%;
        min-width: 0;
    }

    .btn-xs {
        padding: 6px 8px;
        font-size: 0.75rem;
        height: 32px;
        justify-content: center;
    }

    /* 分页栏 */
    .pagination-bar {
        flex-direction: column;
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .pagination-controls {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* 邮件列表表格 */
    #mail-table thead {
        display: none;
    }

    #mail-table,
    #mail-table tbody,
    #mail-table tr,
    #mail-table td {
        display: block;
        width: 100%;
    }

    #mail-table tr {
        padding: 12px;
        border-bottom: 1px solid var(--border-color);
    }

    #mail-table td {
        padding: 3px 0;
        border: none;
    }

    #mail-table td:nth-child(1)::before { content: '发件人: '; color: var(--text-muted); }
    #mail-table td:nth-child(3)::before { content: '日期: '; color: var(--text-muted); }

    #mail-table td:nth-child(4) {
        margin-top: 6px;
    }

    /* Toast 居中 */
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }

    .toast {
        min-width: 0;
        width: 100%;
    }

    /* 模态框 */
    .modal-box {
        width: calc(100% - 1.5rem);
        margin: 0.75rem;
        padding: 1rem;
    }

    .modal-large {
        max-width: none;
        max-height: 90vh;
        overflow-y: auto;
    }

    .mail-content-box {
        max-height: 300px;
    }

    .email-status-bar {
        padding: 0.75rem;
        font-size: 0.85rem;
    }
}


/* 响应式文字切换 */
.btn-text-short { display: none; }
.btn-text-full { display: inline; }

/* 取消按钮 */
.btn-cancel {
    background: white;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    box-shadow: none;
}
.btn-cancel:hover {
    background: #f5f5f5;
    border-color: var(--primary);
    color: var(--primary);
}

/* 危险操作时的确认按钮 */
.btn-primary.btn-danger-confirm {
    background: var(--danger);
}
.btn-primary.btn-danger-confirm:hover {
    background: #d4151f;
}


/* ===================== 中等屏幕适配（平板 / 小笔记本） ===================== */
@media (min-width: 769px) and (max-width: 1200px) {
    .main-content {
        padding: 1rem 1.25rem;
    }

    .action-bar .btn {
        padding: 8px 12px;
        font-size: 0.8rem;
        height: 38px;
    }

    /* 允许表格横向滚动而不压缩按钮 */
    .table-wrapper {
        overflow-x: auto;
    }

    #email-table {
        min-width: 1000px;
    }

    th, td {
        padding: 0.75rem 0.6rem;
        font-size: 0.85rem;
    }

    .copy-group {
        max-width: 160px;
    }
}


/* ===================== 移动端文字切换 ===================== */
@media (max-width: 768px) {
    .btn-text-short { display: inline; }
    .btn-text-full { display: none; }
}

/* ===================== 超小屏幕（< 480px）优化 ===================== */
@media (max-width: 480px) {
    .main-content {
        padding: 0.75rem;
    }

    .action-bar {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .action-bar .btn {
        font-size: 0.75rem;
        padding: 10px 2px;
    }

    /* 卡片字段标签更窄 */
    #email-table td:nth-child(n+3):nth-child(-n+6)::before {
        width: 44px;
        font-size: 0.7rem;
    }

    #email-table td .text-truncate {
        font-size: 0.75rem;
    }

    .page-title {
        font-size: 1.1rem;
    }
}


/* ========== 输入框标题（行内快捷按钮） ========== */
.input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.input-header label {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
}

.btn-link {
    background: transparent;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

.btn-link:hover {
    background: rgba(0, 185, 107, 0.08);
}

/* ========== 新 action bar 布局：主操作 + 危险操作分组 ========== */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.action-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* 主按钮轻量版 */
.btn-outline {
    background: white;
    color: var(--primary);
    border: 1px solid var(--primary);
    box-shadow: none;
}
.btn-outline:hover {
    background: rgba(0, 185, 107, 0.06);
    filter: none;
}

/* 危险操作 - 幽灵按钮风格（文字红色，悬停时变红底） */
.btn-ghost-danger {
    background: transparent;
    color: var(--danger);
    border: 1px solid transparent;
    box-shadow: none;
}
.btn-ghost-danger:hover {
    background: rgba(245, 34, 45, 0.08);
    border-color: rgba(245, 34, 45, 0.2);
    filter: none;
}

/* ===== 移动端 action bar ===== */
@media (max-width: 768px) {
    .action-bar {
        display: flex !important;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .action-group-primary {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        width: 100%;
    }

    .action-group-danger {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 100%;
        border-top: 1px dashed var(--border-color);
        padding-top: 10px;
    }

    .action-group .btn {
        width: 100%;
        padding: 10px 4px;
        font-size: 0.78rem;
        height: 40px;
    }
}


/* ========== 粘贴后提示气泡 ========== */
.input-hint {
    position: absolute;
    left: 8px;
    bottom: -34px;
    background: var(--primary);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    display: none;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(0, 185, 107, 0.25);
    white-space: nowrap;
    z-index: 5;
    animation: hintPop 0.35s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.input-hint.show {
    display: inline-flex;
}

.input-hint i {
    animation: bounce 1.2s infinite;
}

@keyframes hintPop {
    from { transform: translateY(-8px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px); }
}

@media (max-width: 768px) {
    .input-hint {
        font-size: 0.72rem;
        padding: 4px 8px;
        left: 4px;
    }
}


/* textarea placeholder 多行显示优化 */
#manual-input {
    min-height: 110px;
}

#manual-input::placeholder {
    white-space: pre-line;
    color: #a0a7aa;
    line-height: 1.6;
}


/* ========== 空状态聚光灯引导 ========== */
.empty-guide-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 900;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.empty-guide-overlay.show {
    opacity: 1;
    pointer-events: auto;
    cursor: pointer;
}

/* 粘贴框容器被激活时的效果 */
#paste-wrapper.guide-active {
    position: relative;
    z-index: 901;
}

#paste-wrapper.guide-active #manual-input {
    box-shadow: 0 0 0 4px rgba(0, 185, 107, 0.4), 0 0 40px rgba(0, 185, 107, 0.5);
    border-color: var(--primary) !important;
    background: white;
    animation: pulseGlow 1.6s ease-in-out infinite;
}

#paste-wrapper.guide-active .empty-guide-bubble {
    display: flex;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(0, 185, 107, 0.4), 0 0 30px rgba(0, 185, 107, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(0, 185, 107, 0.3), 0 0 55px rgba(0, 185, 107, 0.65);
    }
}

/* 引导气泡默认隐藏 */
.empty-guide-bubble {
    display: none;
    position: absolute;
    top: -78px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 14px 22px;
    border-radius: 12px;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    box-shadow: 0 10px 30px rgba(0, 185, 107, 0.45);
    z-index: 902;
    white-space: nowrap;
    animation: guideFloat 2s ease-in-out infinite;
}

.empty-guide-bubble::after {
    content: '';
    position: absolute;
    bottom: -7px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 16px;
    height: 16px;
    background: var(--primary);
}

.empty-guide-bubble i {
    font-size: 1.6rem;
    animation: pointBounce 1s ease-in-out infinite;
}

.guide-title {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.3;
}

.guide-desc {
    font-size: 0.8rem;
    opacity: 0.9;
    margin-top: 2px;
}

@keyframes guideFloat {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-6px); }
}

@keyframes pointBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}

@media (max-width: 768px) {
    .empty-guide-bubble {
        font-size: 0.8rem;
        padding: 10px 14px;
        top: -72px;
        gap: 8px;
        white-space: normal;
        max-width: 90%;
    }

    .empty-guide-bubble i {
        font-size: 1.2rem;
    }

    .guide-title { font-size: 0.85rem; }
    .guide-desc { font-size: 0.7rem; }
}
