/* ============================================
   中英文排版纠正器 - 专用样式
   ============================================ */

/* 规则选项面板 */
.tool-page .rules-panel {
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f2f5 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    justify-content: center;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.tool-page .rules-panel .rule-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    padding: 8px 16px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
}

.tool-page .rules-panel .rule-item:hover {
    background: #f8f9fa;
    border-color: #4285f4;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.15);
}

.tool-page .rules-panel .rule-item input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.tool-page .rules-panel .rule-item span {
    font-weight: 500;
    color: #333;
    user-select: none;
}

/* 操作按钮区 */
.tool-page .action-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.tool-page .action-buttons .btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tool-page .action-buttons .btn-primary {
    background: linear-gradient(135deg, #4285f4 0%, #3367d6 100%);
    color: #fff;
}

.tool-page .action-buttons .btn-primary:hover {
    background: linear-gradient(135deg, #3367d6 0%, #2952a3 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(66, 133, 244, 0.3);
}

.tool-page .action-buttons .btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #dee2e6;
}

.tool-page .action-buttons .btn-secondary:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 输入输出区域 */
.tool-page .converter-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.tool-page .text-box {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.tool-page .text-box:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tool-page .text-box-header {
    background: linear-gradient(135deg, #f5f7fa 0%, #eef1f5 100%);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
}

.tool-page .text-box-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.tool-page .text-box-actions {
    display: flex;
    gap: 8px;
}

.tool-page .btn-icon-small {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
    font-size: 14px;
}

.tool-page .btn-icon-small:hover {
    background: #f8f9fa;
    border-color: #4285f4;
    color: #4285f4;
    transform: scale(1.05);
}

.tool-page .text-area {
    width: 100%;
    min-height: 250px;
    max-height: 500px;
    padding: 16px;
    border: none;
    resize: vertical;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background: #fff;
    outline: none;
}

.tool-page .text-area::placeholder {
    color: #999;
    font-style: italic;
}

.tool-page .text-area:focus {
    background: #fafbfc;
}

.tool-page .char-count {
    padding: 8px 16px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    font-size: 12px;
    color: #666;
    text-align: right;
}

/* 选项面板 */
.tool-page .options-panel {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
}

.tool-page .options-panel .option-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.tool-page .options-panel .option-item input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.tool-page .options-panel .option-item span {
    color: #333;
    user-select: none;
}

/* 消息提示（Toast） */
.toast-message {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    padding: 12px 24px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.toast-message.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-message.success {
    background: #4caf50;
    color: #fff;
}

.toast-message.warning {
    background: #ff9800;
    color: #fff;
}

.toast-message.error {
    background: #f44336;
    color: #fff;
}

/* ============================================
   响应式设计
   ============================================ */

/* 平板端（768px - 1024px） */
@media (max-width: 1024px) {
    .tool-page .converter-area {
        gap: 15px;
    }

    .tool-page .text-area {
        min-height: 200px;
    }
}

/* 手机端（< 768px） */
@media (max-width: 768px) {
    .tool-page .converter-area {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .tool-page .rules-panel {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }

    .tool-page .rules-panel .rule-item {
        width: 100%;
        justify-content: center;
    }

    .tool-page .action-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .tool-page .action-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .tool-page .text-area {
        min-height: 180px;
        font-size: 13px;
    }

    .tool-page .text-box-header h3 {
        font-size: 14px;
    }
}

/* 超小屏幕（< 480px） */
@media (max-width: 480px) {
    .tool-page .rules-panel {
        padding: 12px;
    }

    .tool-page .rules-panel .rule-item {
        font-size: 13px;
        padding: 6px 12px;
    }

    .tool-page .action-buttons .btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .tool-page .text-area {
        padding: 12px;
        min-height: 150px;
    }

    .tool-page .char-count {
        font-size: 11px;
        padding: 6px 12px;
    }

    .toast-message {
        font-size: 13px;
        padding: 10px 20px;
        max-width: 90%;
    }
}
