/* 移动端深度优化样式 */

/* 1. 功能卡片滑动指示器 */
@media (max-width: 767px) {
    .func-cards-wrapper {
        position: relative;
    }

    .func-cards-indicators {
        display: flex;
        justify-content: center;
        gap: 6px;
        margin-top: 12px;
        margin-bottom: 8px;
    }

    .func-indicator {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: #ddd;
        transition: all .3s;
    }

    .func-indicator.active {
        width: 20px;
        border-radius: 3px;
        background: var(--primary);
    }

    /* 2. 触摸区域优化 - 最小 44x44px */
    .mobile-menu-btn {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Pills 按钮触摸区域 */
    .sel-pill,
    .pill {
        min-height: 32px;
        padding: 6px 14px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* 3. 底部安全区适配（iPhone X+） */
    body {
        padding-bottom: env(safe-area-inset-bottom);
    }

    .main {
        padding-bottom: calc(20px + env(safe-area-inset-bottom));
    }

    .balance-float {
        bottom: calc(12px + env(safe-area-inset-bottom));
    }

    /* 4. 输入框优化 */
    .editor-textarea-wrapper {
        position: relative;
    }

    .char-count {
        position: absolute;
        bottom: 8px;
        right: 8px;
        font-size: 11px;
        color: #999;
        background: rgba(255, 255, 255, 0.9);
        padding: 2px 6px;
        border-radius: 4px;
    }

    .clear-btn {
        position: absolute;
        top: 8px;
        right: 8px;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        background: #ddd;
        border: none;
        color: #666;
        font-size: 14px;
        display: none;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }

    .editor-textarea:not(:placeholder-shown) ~ .clear-btn {
        display: flex;
    }

    /* 平滑滚动 */
    html {
        scroll-behavior: smooth;
    }

    /* 防止双击缩放 */
    * {
        touch-action: manipulation;
    }

    /* 优化点击反馈 */
    button, .btn, .pill, .nav-item {
        -webkit-tap-highlight-color: rgba(108, 92, 231, 0.1);
    }
}
