/* 去除Emoji工具样式 */

/* 快捷键提示 */
.shortcut-tips {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 10px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    border-left: 4px solid #2196f3;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.15);
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tips-icon {
    font-size: 16px;
}

.tips-text {
    color: #1976d2;
    font-weight: 600;
    font-size: 13px;
}

.shortcut-tips kbd {
    background: #fff;
    padding: 3px 7px;
    border-radius: 4px;
    margin: 0 3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 11px;
    font-weight: 600;
    color: #333;
    border: 1px solid #e1e8ed;
    font-family: 'Courier New', monospace;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 步骤区块 */
/* 步骤区块 */
.step-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-section:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* 步骤标题 */
.step-header {
    display: flex;
    align-items: center;
    margin-bottom: 14px;
    gap: 10px;
}

.example-button {
    margin-left: auto;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.example-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* 示例选择器 */
.example-selector {
    display: none;
    background: white;
    border: 2px solid #3b82f6;
    border-radius: 8px;
    margin-bottom: 14px;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15);
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.example-selector.show {
    display: block;
}

.example-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
    border-bottom: 2px solid #3b82f6;
    border-radius: 6px 6px 0 0;
}

.example-header span {
    font-weight: 600;
    color: #1e40af;
    font-size: 14px;
}

.close-example {
    background: none;
    border: none;
    font-size: 24px;
    color: #1e40af;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.close-example:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: scale(1.1);
}

.example-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 10px;
    padding: 14px;
}

.example-item {
    padding: 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.example-item:hover {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.example-title {
    font-weight: 600;
    color: #2d3748;
    font-size: 13px;
    margin-bottom: 6px;
}

.example-preview {
    font-size: 12px;
    color: #718096;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    font-weight: bold;
    font-size: 15px;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.step-header h3 {
    margin: 0;
    font-size: 16px;
    color: #2d3748;
    font-weight: 600;
}

/* 文本输入区域 */
.textarea-wrapper {
    position: relative;
}

.query-textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.query-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.char-counter {
    margin-top: 6px;
    font-size: 12px;
    color: #718096;
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

.emoji-count {
    color: #f56565;
    font-weight: 600;
}

/* 选项区块 */
.options-section {
    background: linear-gradient(135deg, #e0f2fe 0%, #ffffff 100%);
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 8px;
    padding: 10px 14px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.checkbox-group label:hover {
    border-color: #667eea;
    background: #f7fafc;
    transform: translateX(4px);
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.option-label {
    font-size: 13px;
    color: #2d3748;
    font-weight: 500;
}

/* AI辅助区块 */
.ai-assist {
    background: linear-gradient(135deg, #fef3c7 0%, #ffffff 100%);
}

.ai-desc {
    color: #78716c;
    font-size: 13px;
    margin-bottom: 12px;
    padding: 10px;
    background: rgba(251, 191, 36, 0.1);
    border-left: 4px solid #fbbf24;
    border-radius: 4px;
}

.ai-input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.ai-prompt-input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-prompt-input:focus {
    outline: none;
    border-color: #fbbf24;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.1);
}

.ai-button {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 13px;
}

.ai-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

.ai-result {
    display: none;
    padding: 14px;
    background: white;
    border: 2px solid #fbbf24;
    border-radius: 8px;
    margin-top: 12px;
}

.ai-result.show {
    display: block;
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-suggestions {
    margin-top: 10px;
    padding: 10px;
    background: #fffbeb;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.6;
    color: #78716c;
}

/* AI加载状态 */
.ai-loading {
    text-align: center;
    padding: 20px;
}

.ai-loading-icon {
    font-size: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* AI错误状态 */
.ai-error {
    color: #f56565;
    padding: 12px;
    background: #fff5f5;
    border-radius: 6px;
    border-left: 4px solid #f56565;
}

/* AI建议内容 */
.ai-suggestions-content {
    line-height: 1.8;
}

/* emoji计数颜色 */
.emoji-count-highlight {
    color: #f56565;
}

.emoji-count-normal {
    color: #718096;
}

/* 提交按钮区域 */
.submit-section {
    background: linear-gradient(135deg, #e0e7ff 0%, #ffffff 100%);
}

.button-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.primary-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.secondary-button {
    background: linear-gradient(135deg, #cbd5e0 0%, #a0aec0 100%);
    color: #2d3748;
}

.secondary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(160, 174, 192, 0.3);
}

.copy-button {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.copy-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
}

.submit-hint {
    margin-top: 10px;
    font-size: 12px;
    color: #718096;
    padding: 6px 10px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 6px;
    display: inline-block;
}

/* 结果展示区域 */
.result-section {
    background: linear-gradient(135deg, #d1fae5 0%, #ffffff 100%);
    border-radius: 10px;
    padding: 18px;
    margin-top: 16px;
    box-shadow: 0 4px 16px rgba(72, 187, 120, 0.1);
    animation: slideDown 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.stat-item {
    background: white;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-label {
    font-size: 13px;
    color: #718096;
    font-weight: 500;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
}

.stat-value.highlight {
    color: #f56565;
}

.result-content {
    background: white;
    border-radius: 8px;
    padding: 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.result-header span {
    font-weight: 600;
    color: #2d3748;
    font-size: 14px;
}

.copy-icon-btn {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.copy-icon-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(72, 187, 120, 0.3);
}

.result-text {
    max-height: 400px;
    overflow-y: auto;
}

.result-text pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 13px;
    line-height: 1.6;
    color: #2d3748;
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 400px;
}

.toast.hidden {
    display: none;
}

.toast.fade-out {
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.error-toast {
    background: linear-gradient(135deg, #fed7d7 0%, #fff5f5 100%);
    border-left: 4px solid #f56565;
}

.success-toast {
    background: linear-gradient(135deg, #c6f6d5 0%, #f0fff4 100%);
    border-left: 4px solid #48bb78;
}

.warning-toast {
    background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 100%);
    border-left: 4px solid #fbbf24;
}

.info-toast {
    background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
    border-left: 4px solid #3b82f6;
}

.toast-icon {
    font-size: 20px;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    color: #2d3748;
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #718096;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast-close:hover {
    color: #2d3748;
    transform: scale(1.2);
}

/* 动画 */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .step-section {
        padding: 14px;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }

    .button-group {
        flex-direction: column;
    }

    .button {
        width: 100%;
    }

    .ai-input-group {
        flex-direction: column;
    }

    .result-stats {
        grid-template-columns: 1fr;
    }

    .toast {
        left: 20px;
        right: 20px;
        max-width: none;
    }
    
    .shortcut-tips {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 12px;
    }
    
    .tips-text {
        font-size: 12px;
    }
    
    .shortcut-tips kbd {
        font-size: 10px;
        padding: 2px 5px;
    }

    .example-list {
        grid-template-columns: 1fr;
    }

    .example-button {
        padding: 6px 12px;
        font-size: 11px;
    }
}

@media (max-width: 640px) {
    .step-header h3 {
        font-size: 14px;
    }
    
    .step-number {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }
    
    .query-textarea {
        font-size: 12px;
        padding: 12px;
    }
    
    .result-text pre {
        font-size: 12px;
    }
}
