/* 营销文案工具包样式 - 统一风格 */
.marketing-section {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* 工具导航 - 优化尺寸 */
.tool-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.nav-tab {
    padding: 12px 10px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #64748b;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.nav-tab:hover {
    border-color: #667eea;
    background: #f0f9ff;
    color: #1e40af;
    transform: translateY(-2px);
}

.nav-tab.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.nav-tab i {
    font-size: 18px;
}

.nav-tab-name {
    font-size: 13px;
    font-weight: 600;
}

.nav-tab-desc {
    font-size: 11px;
    opacity: 0.8;
}

/* 工具面板 */
.tool-panel {
    display: none;
}

.tool-panel.active {
    display: block;
}

/* 输入区域 - 优化设计 */
.input-section {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #f1f5f9;
}

.input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f1f5f9;
    position: relative;
}

.input-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.input-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a202c;
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-title i {
    color: #667eea;
    font-size: 20px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group.inline {
    display: flex;
    align-items: center;
    gap: 15px;
}

.input-group.inline .input-label {
    margin-bottom: 0;
    white-space: nowrap;
    min-width: auto;
}

.input-group.inline .text-input,
.input-group.inline .select-input {
    flex: 1;
}

.input-label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: #2d3748;
    font-size: 14px;
    position: relative;
    padding-left: 12px;
}

.input-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.text-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    transition: all 0.3s ease;
    resize: vertical;
    min-height: 100px;
    background: #f8fafc;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.text-input:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.text-input::placeholder {
    color: #a0aec0;
    font-style: italic;
}

.select-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.select-input:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

/* 选项卡片 - 优化设计 */
.option-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.option-cards .option-card {
    flex: 1;
    min-width: 140px;
}

.option-card {
    position: relative;
    padding: 10px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    background: #fff;
    overflow: hidden;
    min-height: auto;
}

.option-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.option-card:hover {
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.option-card:hover::before {
    transform: scaleX(1);
}

.option-card.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.option-card.active::before {
    transform: scaleX(1);
    background: rgba(255, 255, 255, 0.3);
}

.option-card-icon {
    display: none;
}

.option-card h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    transition: color 0.3s ease;
}

.option-card.active h4 {
    color: #fff;
}

.option-card p {
    display: none;
}

/* 操作按钮 - 优化设计 */
.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.btn-action {
    flex: 1;
    min-width: 120px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.btn-action::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-action:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    border: 2px solid transparent;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #fff;
    color: #6b7280;
    border: 2px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e0;
    color: #4b5563;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.btn-action i {
    font-size: 14px;
}

/* 结果区域 - 优化设计 */
.result-section {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #f1f5f9;
    display: none;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f1f5f9;
    position: relative;
}

.result-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 80px;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.result-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a202c;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-title::before {
    content: '✨';
    font-size: 20px;
}

.result-count {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    min-width: 50px;
    text-align: center;
}

.result-list {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 5px;
}

.result-list::-webkit-scrollbar {
    width: 6px;
}

.result-list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.result-list::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
}

.result-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.result-item:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.result-item:hover::before {
    transform: scaleY(1);
}

.result-text {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
    color: #2d3748;
    font-weight: 500;
    padding-right: 45px;
}

.result-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #718096;
    font-weight: 500;
}

.result-score {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    padding: 4px 12px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 12px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 11px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.copy-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.result-item:hover .copy-btn {
    opacity: 1;
}

/* 评分显示 - 优化设计 */
.score-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.score-item {
    background: #fff;
    border: 2px solid #f1f5f9;
    border-radius: 16px;
    padding: 25px 20px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.score-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.score-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    border-color: #e2e8f0;
}

.score-value {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.score-label {
    font-size: 13px;
    color: #718096;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 词云容器 - 优化设计 */
.wordcloud-container {
    width: 100%;
    height: 350px;
    border: 2px solid #f1f5f9;
    border-radius: 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #fff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.wordcloud-container:hover {
    border-color: #e2e8f0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.wordcloud-placeholder {
    color: #a0aec0;
    font-size: 16px;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.wordcloud-placeholder::before {
    content: '☁️';
    font-size: 48px;
    opacity: 0.5;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .col-lg-12 {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    .input-section, .result-section {
        padding: 20px;
        margin-bottom: 15px;
    }

    .tool-nav {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .nav-tab {
        padding: 10px 8px;
    }

    .nav-tab i {
        font-size: 16px;
    }

    .nav-tab-name {
        font-size: 12px;
    }

    .nav-tab-desc {
        font-size: 10px;
    }

    .input-group.inline {
        flex-direction: column;
        align-items: flex-start;
    }

    .input-group.inline .input-label {
        margin-bottom: 8px;
    }

    .option-cards {
        flex-direction: column;
    }

    .option-card {
        min-width: auto;
    }

    .action-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .btn-action {
        min-width: auto;
        padding: 10px 16px;
    }

    .score-display {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .col-lg-12 {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    .tool-nav {
        grid-template-columns: 1fr;
    }

    .score-display {
        grid-template-columns: 1fr;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

