/* ============================================
   文本反转工具专用样式
   依赖: tools-common.css（info-card等公共样式）
   ============================================ */

/* 文本处理器区域 */
.text-processor-area {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    color: white;
    text-align: center;
}

.processor-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.processor-subtitle {
    font-size: 0.95rem;
    margin: 0 0 20px 0;
    opacity: 0.9;
}

/* 处理选项 */
.processing-options {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.option-group {
    background: rgba(255, 255, 255, 0.15);
    padding: 10px 20px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.option-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    margin: 0;
}

.option-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.option-text {
    font-size: 0.95rem;
    font-weight: 500;
}

/* 文本处理容器 */
.text-processing-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: start;
    margin-bottom: 25px;
}

/* 文本面板 */
.text-panel {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.panel-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.panel-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-actions {
    display: flex;
    gap: 8px;
}

.text-area {
    width: 100%;
    min-height: 300px;
    padding: 20px;
    border: none;
    resize: vertical;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background: white;
    outline: none;
    box-sizing: border-box;
}

.text-area:focus {
    background: #fafbfc;
}

.panel-footer {
    background: #f8f9fa;
    padding: 12px 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #666;
}

.text-stats {
    font-weight: 600;
    color: #4285f4;
}

/* 处理操作区域 */
.processing-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px 0;
    justify-content: center;
}

.btn-large {
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
}

/* 按钮样式 */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.btn-primary {
    background: #4285f4;
    color: white;
}

.btn-primary:hover {
    background: #3367d6;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(66, 133, 244, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn:active {
    transform: translateY(0);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* 历史记录区域 */
.history-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 20px;
    margin-top: 25px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.history-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.history-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.history-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-input,
.history-output {
    font-size: 0.9rem;
    word-break: break-all;
}

.history-input strong,
.history-output strong {
    color: #4285f4;
}

.history-time {
    font-size: 0.8rem;
    color: #999;
}

.history-actions {
    flex-shrink: 0;
}

/* Toast消息动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* ============================================
   响应式设计
   ============================================ */

/* 平板设备 */
@media (max-width: 1024px) {
    .text-processing-container {
        grid-template-columns: 1fr;
    }

    .processing-actions {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* 移动设备 */
@media (max-width: 768px) {
    .text-processor-area {
        padding: 20px 15px;
    }

    .processor-title {
        font-size: 1.2rem;
    }

    .processor-subtitle {
        font-size: 0.85rem;
    }

    .processing-options {
        flex-direction: column;
        gap: 10px;
    }

    .option-group {
        width: 100%;
        text-align: center;
    }

    .panel-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .panel-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .text-area {
        min-height: 200px;
        font-size: 13px;
        padding: 15px;
    }

    .processing-actions {
        flex-direction: column;
        gap: 10px;
    }

    .btn-large {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
        font-size: 1rem;
    }

    .btn {
        font-size: 0.85rem;
    }

    .history-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .history-actions {
        width: 100%;
    }

    .history-use-btn {
        width: 100%;
        justify-content: center;
    }
}

/* 超小屏幕 */
@media (max-width: 480px) {
    .processor-title {
        font-size: 1.1rem;
    }

    .processor-subtitle {
        font-size: 0.8rem;
    }

    .text-area {
        font-size: 12px;
        min-height: 180px;
    }

    .btn-large {
        font-size: 0.95rem;
        padding: 10px 18px;
    }
}
