/* 关键词提取工具样式 */
.keyword-extractor-section {
    min-height: 100vh;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    padding: 60px 20px;
}

.keyword-extractor-section .container {
    max-width: 1200px;
    margin: 0 auto;
}

/* 页面头部 */
.tool-header {
    text-align: center;
    margin-bottom: 40px;
}

.header-content {
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-title {
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.tool-title i {
    font-size: 32px;
}

.tool-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
}

.tool-badge {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.badge-item {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    color: #fff;
    backdrop-filter: blur(10px);
}

/* 工具主体 */
.tool-main {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 0;
}

@media (max-width: 992px) {
    .tool-main {
        grid-template-columns: 1fr;
    }
}

/* 主面板 */
.main-panel {
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    border-right: 1px solid #eee;
}

@media (max-width: 992px) {
    .main-panel {
        border-right: none;
        border-bottom: 1px solid #eee;
    }
}

/* 侧边面板 */
.side-panel {
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 输入区域 */
.input-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-actions {
    display: flex;
    gap: 8px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(17, 153, 142, 0.4);
}

.btn-outline {
    background: transparent;
    border: 1px solid #ddd;
    color: #666;
}

.btn-outline:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

textarea {
    width: 100%;
    min-height: 250px;
    padding: 16px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
}

textarea:focus {
    outline: none;
    border-color: #11998e;
    box-shadow: 0 0 0 3px rgba(17, 153, 142, 0.1);
}

textarea::placeholder {
    color: #999;
}

.input-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    font-size: 14px;
    color: #666;
}

.char-count, .word-count {
    font-weight: 500;
}

/* 结果区域 */
.result-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
}

.keywords-container {
    margin-top: 16px;
}

.keywords-header {
    margin-bottom: 16px;
}

.result-count {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* 关键词云 */
.keywords-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    min-height: 100px;
}

.keyword-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: #fff;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.keyword-tag:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(17, 153, 142, 0.4);
}

.keyword-tag::after {
    content: attr(data-weight);
    background: rgba(255, 255, 255, 0.3);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.keyword-tag.copied {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 关键词列表 */
.keywords-list {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}

.keyword-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.3s ease;
}

.keyword-item:last-child {
    border-bottom: none;
}

.keyword-item:hover {
    background: #f8f9fa;
}

.keyword-rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    margin-right: 12px;
    flex-shrink: 0;
}

.keyword-rank.top3 {
    background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
}

.keyword-rank.top2 {
    background: linear-gradient(135deg, #c0c0c0 0%, #a0a0a0 100%);
}

.keyword-rank.top1 {
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
}

.keyword-text {
    flex: 1;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.keyword-freq {
    font-size: 13px;
    color: #888;
    background: #f0f0f0;
    padding: 4px 10px;
    border-radius: 10px;
}

/* 设置卡片 */
.settings-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
}

.settings-card h4 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.setting-item {
    margin-bottom: 16px;
}

.setting-item:last-child {
    margin-bottom: 0;
}

.setting-item label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.setting-item input[type="number"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.setting-item input[type="number"]:focus {
    outline: none;
    border-color: #11998e;
    box-shadow: 0 0 0 3px rgba(17, 153, 142, 0.1);
}

.setting-item select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    background: #fff;
    cursor: pointer;
}

.setting-item select:focus {
    outline: none;
    border-color: #11998e;
    box-shadow: 0 0 0 3px rgba(17, 153, 142, 0.1);
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.filter-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* 提示卡片 */
.tips-card {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid #28a745;
}

.tips-card h4 {
    font-size: 16px;
    font-weight: 600;
    color: #155724;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tips-list {
    margin: 0;
    padding-left: 20px;
}

.tips-list li {
    font-size: 14px;
    color: #155724;
    margin-bottom: 8px;
    line-height: 1.5;
}

.tips-list li:last-child {
    margin-bottom: 0;
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: #fff;
}

.toast-error {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: #fff;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .keyword-extractor-section {
        padding: 40px 15px;
    }

    .tool-title {
        font-size: 28px;
    }

    .tool-subtitle {
        font-size: 16px;
    }

    .main-panel,
    .side-panel {
        padding: 20px;
    }

    textarea {
        min-height: 200px;
    }

    .section-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .header-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .keywords-cloud {
        padding: 15px;
    }

    .keyword-tag {
        padding: 6px 12px;
        font-size: 13px;
    }
}