/* HTML标签去除工具样式 */

/* 快捷键提示 */
.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: 12px;
    padding: 20px;
    margin-bottom: 18px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.step-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #667eea 100%);
    background-size: 200% 100%;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-section:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.15);
    transform: translateY(-3px);
    border-color: rgba(102, 126, 234, 0.3);
}

.step-section:hover::before {
    opacity: 1;
    animation: shimmer 2s infinite linear;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 步骤标题 */
.step-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: pulse 2s ease-in-out infinite;
}

.step-section:hover .step-number {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(102, 126, 234, 0.6);
    }
}

.step-header h3 {
    margin: 0;
    font-size: 17px;
    color: #2d3748;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* 文本输入区域 */
.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);
    transform: scale(1.01);
}

.char-counter {
    margin-top: 8px;
    font-size: 12px;
    color: #718096;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.char-counter:hover {
    background: rgba(102, 126, 234, 0.1);
}

#charCount, #tagCount {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.tag-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(280px, 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: linear-gradient(135deg, #f7fafc 0%, #ffffff 100%);
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #667eea;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.checkbox-group input[type="checkbox"]:checked {
    transform: scale(1.1);
}

.option-label {
    font-size: 13px;
    color: #2d3748;
    font-weight: 500;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.checkbox-group label:hover .option-label {
    color: #667eea;
}

/* 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: 12px 24px;
    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: 14px;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
}

.ai-button:hover:not(:disabled) {
    transform: scale(1.02) translateY(-2px);
    box-shadow: 0 6px 16px rgba(251, 191, 36, 0.4);
}

.ai-button:active:not(:disabled) {
    transform: scale(0.98) translateY(0);
}

.ai-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.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: 24px;
}

.ai-loading-icon {
    font-size: 28px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@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;
}

/* 提交按钮区域 */
.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;
    box-shadow: none !important;
    filter: grayscale(0.3);
}

/* 处理中动画 */
.processing-icon {
    display: inline-block;
    animation: spin 1s linear infinite;
}

.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:not(:disabled) {
    transform: scale(1.02) translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.5);
}

.primary-button:active:not(:disabled) {
    transform: scale(0.98) translateY(0);
}

.secondary-button {
    background: linear-gradient(135deg, #cbd5e0 0%, #a0aec0 100%);
    color: #2d3748;
    box-shadow: 0 2px 8px rgba(160, 174, 192, 0.3);
}

.secondary-button:hover:not(:disabled) {
    transform: scale(1.02) translateY(-2px);
    box-shadow: 0 6px 16px rgba(160, 174, 192, 0.4);
}

.secondary-button:active:not(:disabled) {
    transform: scale(0.98) translateY(0);
}

.copy-button {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(72, 187, 120, 0.3);
}

.copy-button:hover:not(:disabled) {
    transform: scale(1.02) translateY(-2px);
    box-shadow: 0 6px 16px rgba(72, 187, 120, 0.4);
}

.copy-button:active:not(:disabled) {
    transform: scale(0.98) translateY(0);
}

.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: 12px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 4px 16px rgba(72, 187, 120, 0.15);
    border: 1px solid rgba(72, 187, 120, 0.2);
    animation: slideDown 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.result-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shine 2s ease-in-out;
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.stat-item {
    background: white;
    padding: 14px 16px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(72, 187, 120, 0.1);
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.15);
    border-color: rgba(72, 187, 120, 0.3);
}

.stat-label {
    font-size: 13px;
    color: #718096;
    font-weight: 500;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #2d3748;
    font-variant-numeric: tabular-nums;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-item:hover .stat-value {
    transform: scale(1.05);
}

.stat-value.highlight {
    color: #f56565;
    text-shadow: 0 0 10px rgba(245, 101, 101, 0.2);
}

.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) translateY(-1px);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.4);
}

.copy-icon-btn:active {
    transform: scale(0.95) translateY(0);
}

.result-text {
    max-height: 500px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #667eea #e2e8f0;
}

.result-text::-webkit-scrollbar {
    width: 8px;
}

.result-text::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 4px;
}

.result-text::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-text::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.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: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 420px;
    backdrop-filter: blur(10px);
}

.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;
    border: 1px solid rgba(245, 101, 101, 0.2);
}

.success-toast {
    background: linear-gradient(135deg, #c6f6d5 0%, #f0fff4 100%);
    border-left: 4px solid #48bb78;
    border: 1px solid rgba(72, 187, 120, 0.2);
}

.warning-toast {
    background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 100%);
    border-left: 4px solid #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.info-toast {
    background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
    border-left: 4px solid #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.toast-icon {
    font-size: 22px;
    animation: iconPop 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes iconPop {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.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(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes shine {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .step-section {
        padding: 16px;
        margin-bottom: 14px;
    }
    
    .step-number {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .step-header h3 {
        font-size: 15px;
    }

    .options-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .button-group {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .button {
        padding: 10px 16px;
        font-size: 13px;
    }

    .ai-input-group {
        flex-direction: column;
    }
    
    .ai-button {
        width: 100%;
    }

    .result-stats {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .toast {
        left: 10px;
        right: 10px;
        max-width: none;
    }
    
    .shortcut-tips {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 12px;
        gap: 6px;
    }
    
    .tips-text {
        font-size: 12px;
    }
    
    .shortcut-tips kbd {
        font-size: 10px;
        padding: 2px 5px;
    }
}

@media (max-width: 640px) {
    .step-section {
        padding: 14px;
        border-radius: 10px;
    }
    
    .step-header h3 {
        font-size: 14px;
    }
    
    .step-number {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }
    
    .query-textarea {
        font-size: 12px;
        padding: 12px;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .button-group {
        grid-template-columns: 1fr;
    }
    
    .result-stats {
        grid-template-columns: 1fr;
    }
    
    .result-text pre {
        font-size: 12px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    .stat-value {
        font-size: 16px;
    }
}
