/* 关键词监控页面特有样式 - 紧凑型布局 */
.monitor-container {
    padding: 15px;
    background: white;
}

.monitor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

.monitor-header h2 {
    color: var(--dark-color);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.monitor-header .action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.monitor-header .action-buttons .btn {
    padding: 6px 12px;
    font-size: 0.75rem;
}

.monitor-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 16px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.stat-card.warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-card.success {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stat-card.info {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.stat-card h4 {
    font-size: 0.8rem;
    opacity: 0.9;
    margin-bottom: 6px;
}

.stat-card .stat-value {
    font-size: 1.6rem;
    font-weight: 700;
}

.monitor-table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    margin-bottom: 12px;
}

.monitor-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.monitor-table th,
.monitor-table td {
    padding: 5px 8px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    line-height: 1.3;
    white-space: nowrap;
}

.monitor-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.75rem;
}

.monitor-table tbody tr:hover {
    background: #f8f9fa;
}

.keyword-link {
    color: #667eea;
    cursor: pointer;
    transition: all 0.2s ease;
}

.keyword-link:hover {
    color: #4facfe;
    text-decoration: underline;
}

.monitor-table tbody tr:last-child td {
    border-bottom: none;
}

.intent-cell {
    white-space: normal !important;
    overflow: visible;
    vertical-align: middle;
    position: relative;
}

.intent-badge-main {
    transition: transform 0.15s ease;
}

.intent-badge-main:hover {
    transform: scale(1.05);
}

.intent-more:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 2px 6px rgba(108,117,125,0.4);
}

.intent-badge-container .intent-secondary-tag {
    display: inline-flex;
}

.intent-secondary-wrapper {
    position: absolute;
    left: 0;
    top: 100%;
    display: none;
    z-index: 100;
    background: rgba(255,255,255,0.98);
    padding: 4px 8px;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12), 0 1px 3px rgba(0,0,0,0.08);
    white-space: nowrap;
}

.intent-badge-container.secondary-expanded .intent-secondary-wrapper {
    display: block;
}

.intent-more .more-collapse { display: none; }
.intent-badge-container.secondary-expanded .intent-more .more-expand { display: none; }
.intent-badge-container.secondary-expanded .intent-more .more-collapse { display: inline; }

.category-cell .category-tag.category-hidden {
    display: inline-flex;
}

.category-hidden-wrapper {
    position: absolute;
    left: 0;
    top: 100%;
    display: none;
    z-index: 100;
    background: rgba(255,255,255,0.98);
    padding: 2px 8px 4px 8px;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12), 0 1px 3px rgba(0,0,0,0.08);
    white-space: nowrap;
}

.category-cell.category-expanded .category-hidden-wrapper {
    display: block;
}

.category-more .more-collapse { display: none; }
.category-cell.category-expanded .category-more .more-expand { display: none; }
.category-cell.category-expanded .category-more .more-collapse { display: inline; }

@keyframes tagFadeIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.monitor-status {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
}

.status-monitoring {
    background: #d4edda;
    color: #155724;
}

.status-found {
    background: #c3e6cb;
    color: #155724;
}

.status-paused {
    background: #fff3cd;
    color: #856404;
}

.status-error {
    background: #f8d7da;
    color: #721c24;
}

.status-notfound {
    background: #e2e3e5;
    color: #383d41;
}

.trend {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-weight: 600;
    font-size: 0.75rem;
}

.trend-up { color: #28a745; }
.trend-down { color: #dc3545; }
.trend-stable { color: #6c757d; }

.action-btns {
    display: flex;
    gap: 3px;
}

.btn-icon {
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 0.7rem;
}

.btn-icon:hover {
    transform: translateY(-1px);
}

.btn-view { background: #e3f2fd; color: #1976d2; }
.btn-edit { background: #fff3e0; color: #f57c00; }
.btn-pause { background: #fce4ec; color: #c2185b; }
.btn-delete { background: #ffebee; color: #c62828; }

.creative-actions {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 4px;
}
.creative-btn {
    padding: 4px 10px;
    font-size: 0.75rem;
    font-family: inherit;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transition: all 0.2s ease;
    line-height: 1.4;
    border: 1px solid transparent;
}
.creative-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.creative-btn:active {
    transform: translateY(0);
}
.btn-creative-generate {
    background: #e8f5e9;
    color: #2e7d32;
    border-color: #c8e6c9;
}
.btn-creative-generate:hover {
    background: #c8e6c9;
    border-color: #a5d6a7;
}
.btn-creative-edit {
    background: #f0f4ff;
    color: #4a6cf7;
    border-color: #d0d9ff;
}
.btn-creative-edit:hover {
    background: #d0d9ff;
    border-color: #b0c4ff;
}
.btn-creative-lock-all {
    background: #fff3e0;
    color: #e65100;
    border-color: #ffcc80;
}
.btn-creative-lock-all:hover {
    background: #ffe0b2;
    border-color: #ffb74d;
}

.creative-loading {
    position: relative;
    overflow: hidden;
    background: #f0f0f0;
    border-radius: 4px;
    min-height: 60px;
}
.creative-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    animation: creativeShimmer 1.5s infinite;
}
@keyframes creativeShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
.creative-loading-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #bbb;
    border-radius: 50%;
    margin: 0 2px;
    animation: creativeDotBounce 1.4s infinite ease-in-out both;
}
.creative-loading-dot:nth-child(1) { animation-delay: -0.32s; }
.creative-loading-dot:nth-child(2) { animation-delay: -0.16s; }
.creative-loading-dot:nth-child(3) { animation-delay: 0s; }
@keyframes creativeDotBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.creative-highlight {
    animation: creativePulse 0.6s ease-out;
}
@keyframes creativePulse {
    0% { box-shadow: 0 0 0 0 rgba(46, 125, 50, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(46, 125, 50, 0); }
    100% { box-shadow: 0 0 0 0 rgba(46, 125, 50, 0); }
}

.creative-fade-in {
    animation: creativeFadeIn 0.4s ease-out;
}
@keyframes creativeFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.btn-generate-success {
    background: #2e7d32 !important;
    color: white !important;
    border-color: #1b5e20 !important;
    transition: all 0.3s ease !important;
}

.add-task-section {
    background: #f8f9fa;
    padding: 10px 12px;
    border-radius: var(--radius);
    margin-bottom: 12px;
}

.add-task-section h3 {
    margin-bottom: 8px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 8px;
    margin-bottom: 8px;
}

.form-group { margin-bottom: 0; }

.form-group label {
    display: block;
    margin-bottom: 3px;
    font-weight: 500;
    color: var(--dark-color);
    font-size: 0.75rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 5px 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.8rem;
    transition: var(--transition);
    height: 32px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group small {
    display: block;
    margin-top: 4px;
    color: var(--secondary-color);
    font-size: 0.75rem;
}

.form-group textarea {
    font-family: 'Courier New', monospace;
    resize: vertical;
}

input[type="radio"][name="monitor-mode"] {
    cursor: pointer;
}

.history-section {
    margin-top: 12px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: var(--radius);
}

.history-section h3 {
    margin-bottom: 8px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
}

.chart-placeholder {
    min-height: 200px;
    background: white;
    border-radius: var(--radius);
    color: var(--secondary-color);
    border: 1px dashed var(--border-color);
    padding: 10px;
}

.trend-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.trend-summary .stat-card { padding: 8px 10px; }
.trend-summary .stat-card h4 { font-size: 0.7rem; margin-bottom: 3px; }
.trend-summary .stat-card .stat-value { font-size: 1.1rem; }

.trend-item {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
    padding: 8px 10px;
    border-radius: 6px;
    border-left: 3px solid #667eea;
    transition: all 0.2s ease;
}

.trend-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.trend-item.up { border-left-color: #28a745; }
.trend-item.down { border-left-color: #dc3545; }
.trend-item.stable { border-left-color: #6c757d; }

.trend-item .keyword-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 3px;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trend-item .rank-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
}

.trend-item .current-rank {
    font-size: 1rem;
    font-weight: 700;
    color: #667eea;
}

.trend-item .rank-change {
    padding: 1px 6px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.7rem;
}

.trend-item .rank-change.up { background: #d4edda; color: #155724; }
.trend-item .rank-change.down { background: #f8d7da; color: #721c24; }
.trend-item .rank-change.stable { background: #e2e3e5; color: #383d41; }

.trend-list { max-height: 220px; overflow-y: auto; }

.trend-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #eee;
}

.trend-list-header h4 { margin: 0; font-size: 0.85rem; color: #333; }

.auto-refresh-info { font-size: 0.7rem; color: #888; }
.auto-refresh-info .refreshing { animation: spin 1s linear infinite; }

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.category-stats-section {
    background: linear-gradient(135deg, #e8ecff 0%, #dce4ff 100%);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 1px solid #e8ecf4;
}

.category-stats-header {
    font-size: 0.75rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.category-stats-header i { color: #667eea; font-size: 0.8rem; }

.category-stats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 4px;
}

.category-stat-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    white-space: nowrap;
    line-height: 1.2;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    color: #667eea;
    background: rgba(255, 255, 255, 0.95);
    vertical-align: middle;
    width: auto;
    height: auto;
    font-weight: 500;
    text-decoration: none;
}

.category-stat-item .category-stat-name,
.category-stat-item .category-stat-count { padding: 0; }

.category-stat-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    background: rgba(255, 255, 255, 1);
}

.category-stat-item.active {
    background: linear-gradient(135deg, #667eea 0%, #526ad6 100%) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4) !important;
}

.category-stat-name { font-weight: 500; }

.category-stat-count {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border-radius: 8px;
    padding: 0 4px;
    font-size: 0.65rem;
    font-weight: 600;
    min-width: 14px;
    text-align: center;
}

.category-stat-item.active .category-stat-count {
    background: rgba(255,255,255,0.25);
    color: #fff;
}

.category-stat-item[data-category*="竞品词"] { color: #ee5a5a; }
.category-stat-item[data-category*="竞品词"] .category-stat-count { background: rgba(238, 90, 90, 0.1); color: #ee5a5a; }
.category-stat-item[data-category*="竞品词"].active { background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%) !important; color: #fff !important; }

.category-stat-item[data-category*="通俗词"] { color: #339af0; }
.category-stat-item[data-category*="通俗词"] .category-stat-count { background: rgba(51, 154, 240, 0.1); color: #339af0; }
.category-stat-item[data-category*="通俗词"].active { background: linear-gradient(135deg, #4dabf7 0%, #339af0 100%) !important; color: #fff !important; }

.category-stat-item[data-category*="产品词"] { color: #40c057; }
.category-stat-item[data-category*="产品词"] .category-stat-count { background: rgba(64, 192, 87, 0.1); color: #40c057; }
.category-stat-item[data-category*="产品词"].active { background: linear-gradient(135deg, #51cf66 0%, #40c057 100%) !important; color: #fff !important; }

.category-stat-item[data-category*="品牌词"] { color: #be4bdb; }
.category-stat-item[data-category*="品牌词"] .category-stat-count { background: rgba(190, 75, 219, 0.1); color: #be4bdb; }
.category-stat-item[data-category*="品牌词"].active { background: linear-gradient(135deg, #cc5de8 0%, #be4bdb 100%) !important; color: #fff !important; }

.category-stat-item[data-category*="人群词"] { color: #fd7e14; }
.category-stat-item[data-category*="人群词"] .category-stat-count { background: rgba(253, 126, 20, 0.1); color: #fd7e14; }
.category-stat-item[data-category*="人群词"].active { background: linear-gradient(135deg, #ff922b 0%, #fd7e14 100%) !important; color: #fff !important; }

.category-stat-item[data-category*="市"],
.category-stat-item[data-category*="省"],
.category-stat-item[data-category*="县"],
.category-stat-item[data-category*="自治区"],
.category-stat-item[data-category*="行政区"],
.category-stat-item[data-category*="省会"] { color: #3b82f6; }

.category-stat-item[data-category*="市"] .category-stat-count,
.category-stat-item[data-category*="省"] .category-stat-count,
.category-stat-item[data-category*="县"] .category-stat-count,
.category-stat-item[data-category*="自治区"] .category-stat-count,
.category-stat-item[data-category*="行政区"] .category-stat-count,
.category-stat-item[data-category*="省会"] .category-stat-count { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }

.category-stat-item[data-category*="市"].active,
.category-stat-item[data-category*="省"].active,
.category-stat-item[data-category*="县"].active,
.category-stat-item[data-category*="自治区"].active,
.category-stat-item[data-category*="行政区"].active,
.category-stat-item[data-category*="省会"].active { background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%) !important; color: #fff !important; }

.category-stat-item[onclick*="clearCategoryFilter"] {
    background: #fff0f0;
    border: 1px dashed #ff9999;
    color: #e74c3c;
}

.category-stat-item[onclick*="clearCategoryFilter"]:hover {
    background: #ffe0e0;
    border-color: #ff6666;
}

.category-stat-item[onclick*="clearCategoryFilter"] .category-stat-count {
    background: transparent;
    color: inherit;
}

.category-cell {
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: normal !important;
    line-height: 1.8;
    min-width: 150px;
    max-width: 300px;
    position: relative;
    overflow: visible;
}

.category-cell:hover { background: #f0f4ff; }
.category-visible { display: inline; white-space: nowrap; }

.category-cell .category-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    color: #fff;
    margin: 2px 4px 2px 0;
    white-space: nowrap;
    vertical-align: middle;
}

.category-badge {
    background: linear-gradient(135deg, #667eea 0%, #4facfe 100%);
    color: white;
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 0.75rem;
    display: inline-block;
}

.rank-stats-section {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
    border: 1px solid rgba(222, 226, 230, 0.6);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.rank-stats-header {
    font-size: 0.9rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f3f4;
}

.rank-stats-header i {
    color: #f39c12;
    font-size: 1rem;
    filter: drop-shadow(0 2px 4px rgba(243, 156, 18, 0.3));
}

.rank-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

@media (max-width: 768px) {
    .rank-stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .rank-stats-grid { grid-template-columns: 1fr; }
}

.rank-stat-item {
    background: white;
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.rank-stat-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    transition: width 0.3s ease;
}

.rank-stat-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
}

.rank-stat-item.top3::before { background: linear-gradient(180deg, #ffd700, #ffb700); }
.rank-stat-item.top10::before { background: linear-gradient(180deg, #28a745, #20c997); }
.rank-stat-item.top20::before { background: linear-gradient(180deg, #17a2b8, #0dcaf0); }
.rank-stat-item.top50::before { background: linear-gradient(180deg, #6c757d, #adb5bd); }
.rank-stat-item.no-rank::before { background: linear-gradient(180deg, #dc3545, #f86a7e); }
.rank-stat-item.avg-rank::before { background: linear-gradient(180deg, #6610f2, #8b5cf6); }

.rank-stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.rank-stat-item:hover .rank-stat-icon { transform: scale(1.1); }

.rank-stat-item.top3 .rank-stat-icon { background: linear-gradient(135deg, #fff9e6, #ffefc2); color: #d4a500; }
.rank-stat-item.top10 .rank-stat-icon { background: linear-gradient(135deg, #e8f5e9, #c8e6c9); color: #2e7d32; }
.rank-stat-item.top20 .rank-stat-icon { background: linear-gradient(135deg, #e3f2fd, #bbdefb); color: #1976d2; }
.rank-stat-item.top50 .rank-stat-icon { background: linear-gradient(135deg, #f5f5f5, #e0e0e0); color: #616161; }
.rank-stat-item.no-rank .rank-stat-icon { background: linear-gradient(135deg, #ffebee, #ffcdd2); color: #c62828; }
.rank-stat-item.avg-rank .rank-stat-icon { background: linear-gradient(135deg, #f3e5f5, #e1bee7); color: #7b1fa2; }

.rank-stat-info { flex: 1; min-width: 0; }

.rank-stat-value {
    font-size: 1.2rem;
    font-weight: 800;
    color: #1a1a2e;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.rank-stat-label {
    font-size: 0.7rem;
    color: #6c757d;
    margin-top: 1px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.rank-progress-bar {
    position: relative;
    height: 18px;
    background: linear-gradient(180deg, #f1f3f4, #e8eaed);
    border-radius: 9px;
    overflow: hidden;
    margin-top: 10px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
}

.rank-progress-fill {
    height: 100%;
    border-radius: 9px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 0;
    position: relative;
    overflow: hidden;
}

.rank-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.rank-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.7rem;
    font-weight: 700;
    color: #374151;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(255,255,255,0.9);
    z-index: 1;
}

.no-data-tip { text-align: center; padding: 40px 20px; color: #999; }
.no-data-tip i { font-size: 2.5rem; margin-bottom: 10px; opacity: 0.5; }

.rank-distribution-chart {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    margin-bottom: 12px;
}

.rank-ring-chart {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.rank-ring-chart svg { transform: rotate(-90deg); }

.rank-ring-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.rank-ring-value { font-size: 1.5rem; font-weight: 800; color: #1a1a2e; }
.rank-ring-label { font-size: 0.65rem; color: #6c757d; }

.rank-legend {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.rank-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    padding: 4px 8px;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rank-legend-item:hover { transform: scale(1.02); box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.rank-legend-color { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.rank-legend-text { color: #495057; }
.rank-legend-count { margin-left: auto; font-weight: 700; color: #1a1a2e; }

.change-rate-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}

.change-rate-item {
    background: white;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}

.change-rate-item:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.change-rate-item.up { border-left: 4px solid #28a745; }
.change-rate-item.down { border-left: 4px solid #dc3545; }
.change-rate-item.stable { border-left: 4px solid #6c757d; }

.change-rate-value { font-size: 1.4rem; font-weight: 800; margin-bottom: 2px; }
.change-rate-item.up .change-rate-value { color: #28a745; }
.change-rate-item.down .change-rate-value { color: #dc3545; }
.change-rate-item.stable .change-rate-value { color: #6c757d; }
.change-rate-label { font-size: 0.7rem; color: #6c757d; }

.change-rate-bar { height: 4px; background: #e9ecef; border-radius: 2px; margin-top: 8px; overflow: hidden; }
.change-rate-bar-fill { height: 100%; border-radius: 2px; transition: width 0.6s ease; }

.rank-extremes-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.rank-extreme-card {
    background: white;
    border-radius: 10px;
    padding: 12px;
    border: 1px solid rgba(0,0,0,0.05);
}

.rank-extreme-card.best { border-left: 4px solid #28a745; }
.rank-extreme-card.worst { border-left: 4px solid #dc3545; }

.rank-extreme-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #495057;
}

.rank-extreme-card.best .rank-extreme-header { color: #28a745; }
.rank-extreme-card.worst .rank-extreme-header { color: #dc3545; }

.rank-extreme-list { display: flex; flex-direction: column; gap: 6px; }

.rank-extreme-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 0.75rem;
}

.rank-extreme-keyword {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #333;
}

.rank-extreme-keyword:hover { color: #007bff; text-decoration: underline; }
.rank-extreme-rank { font-weight: 700; margin-left: 8px; }
.rank-extreme-card.best .rank-extreme-rank { color: #28a745; }
.rank-extreme-card.worst .rank-extreme-rank { color: #dc3545; }

.rank-volatility-section {
    background: white;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid rgba(0,0,0,0.05);
}

.rank-volatility-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #495057;
}

.rank-volatility-header i { color: #fd7e14; }
.rank-volatility-list { display: flex; flex-direction: column; gap: 6px; }

.rank-volatility-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 6px;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.rank-volatility-item:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.volatility-rank {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: 700;
    flex-shrink: 0;
}

.volatility-keyword {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #333;
    font-weight: 500;
}

.volatility-keyword:hover { color: #007bff; text-decoration: underline; }

.volatility-change { display: flex; align-items: center; gap: 4px; font-weight: 700; }
.volatility-change.up { color: #28a745; }
.volatility-change.down { color: #dc3545; }

.multi-progress-bar {
    height: 24px;
    background: #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    position: relative;
    margin-top: 10px;
}

.multi-progress-segment {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: white;
    transition: all 0.3s ease;
    position: relative;
}

.multi-progress-segment:hover { filter: brightness(1.1); }
.multi-progress-segment.top3 { background: linear-gradient(90deg, #ffd700, #ffb700); }
.multi-progress-segment.top4-10 { background: linear-gradient(90deg, #28a745, #20c997); }
.multi-progress-segment.top11-20 { background: linear-gradient(90deg, #17a2b8, #0dcaf0); }
.multi-progress-segment.top21-50 { background: linear-gradient(90deg, #6c757d, #adb5bd); }
.multi-progress-segment.beyond { background: linear-gradient(90deg, #dc3545, #f86a7e); }

.multi-progress-legend {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 0.65rem;
    color: #6c757d;
}

.stat-card.clickable {
    cursor: pointer;
    transition: all 0.3s ease;
}

.stat-card.clickable:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.stats-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.stats-detail-modal.show { opacity: 1; visibility: visible; }

.stats-detail-content {
    background: white;
    border-radius: 16px;
    padding: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.stats-detail-modal.show .stats-detail-content { transform: scale(1); }

.stats-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f3f4;
}

.stats-detail-title { font-size: 1.1rem; font-weight: 700; color: #1a1a2e; }

.stats-detail-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #f1f3f4;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.stats-detail-close:hover { background: #dc3545; color: white; }

.stats-detail-list { display: flex; flex-direction: column; gap: 8px; }

.stats-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.stats-detail-item:hover { background: #e9ecef; }
.stats-detail-keyword { flex: 1; font-size: 0.85rem; color: #333; }
.stats-detail-rank { font-weight: 700; font-size: 0.9rem; }

.rank-stat-item.median::before { background: linear-gradient(180deg, #17a2b8, #20c997); }
.rank-stat-item.median .rank-stat-icon { background: linear-gradient(135deg, #e3f2fd, #b2ebf2); color: #00838f; }

.health-score-section {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 14px;
    margin-bottom: 12px;
    color: white;
    position: relative;
    overflow: hidden;
}

.health-score-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.health-score-ring {
    position: relative;
    width: 90px;
    height: 90px;
    flex-shrink: 0;
}

.health-score-ring svg { transform: rotate(-90deg); }

.health-score-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.health-score-value { font-size: 1.6rem; font-weight: 800; line-height: 1; }
.health-score-label { font-size: 0.6rem; opacity: 0.9; margin-top: 2px; }
.health-score-info { flex: 1; z-index: 1; }
.health-score-title { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.health-score-desc { font-size: 0.75rem; opacity: 0.9; line-height: 1.5; }
.health-score-level {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-top: 6px;
    background: rgba(255,255,255,0.25);
}

.health-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}

.health-metric-item {
    background: white;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.health-metric-item:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }

.health-metric-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-size: 0.9rem;
}

.health-metric-icon.excellent { background: linear-gradient(135deg, #d4edda, #c3e6cb); color: #155724; }
.health-metric-icon.good { background: linear-gradient(135deg, #d1ecf1, #bee5eb); color: #0c5460; }
.health-metric-icon.warning { background: linear-gradient(135deg, #fff3cd, #ffe69c); color: #856404; }
.health-metric-icon.danger { background: linear-gradient(135deg, #f8d7da, #f5c6cb); color: #721c24; }

.health-metric-value { font-size: 1.1rem; font-weight: 800; color: #1a1a2e; margin-bottom: 2px; }
.health-metric-label { font-size: 0.65rem; color: #6c757d; }

.seo-opportunity-section {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    border: 1px solid rgba(222, 226, 230, 0.6);
}

.seo-opportunity-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 12px;
}

.seo-opportunity-header i { color: #17a2b8; }
.opportunity-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }

.opportunity-card {
    background: white;
    border-radius: 10px;
    padding: 14px;
    border-left: 4px solid;
    transition: all 0.3s ease;
    cursor: pointer;
}

.opportunity-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.1); }
.opportunity-card.high-priority { border-left-color: #dc3545; }
.opportunity-card.medium-priority { border-left-color: #ffc107; }
.opportunity-card.low-priority { border-left-color: #28a745; }

.opportunity-card-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.opportunity-card.high-priority .opportunity-card-icon { background: linear-gradient(135deg, #ffebee, #ffcdd2); color: #dc3545; }
.opportunity-card.medium-priority .opportunity-card-icon { background: linear-gradient(135deg, #fff8e1, #ffecb3); color: #f57c00; }
.opportunity-card.low-priority .opportunity-card-icon { background: linear-gradient(135deg, #e8f5e9, #c8e6c9); color: #388e3c; }

.opportunity-card-title { font-size: 0.8rem; font-weight: 700; color: #333; margin-bottom: 4px; }
.opportunity-card-desc { font-size: 0.7rem; color: #6c757d; line-height: 1.4; margin-bottom: 6px; }
.opportunity-card-count { font-size: 0.85rem; font-weight: 800; }
.opportunity-card.high-priority .opportunity-card-count { color: #dc3545; }
.opportunity-card.medium-priority .opportunity-card-count { color: #f57c00; }
.opportunity-card.low-priority .opportunity-card-count { color: #28a745; }

.histogram-chart {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    border: 1px solid rgba(0,0,0,0.05);
}

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

.histogram-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 6px;
}

.histogram-title i { color: #17a2b8; }
.histogram-bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding: 0 5px; }

.histogram-bar-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    cursor: pointer;
}

.histogram-bar-container { flex: 1; width: 100%; display: flex; align-items: end; justify-content: center; }

.histogram-bar {
    width: 70%;
    max-width: 35px;
    border-radius: 4px 4px 0 0;
    transition: all 0.3s ease;
    position: relative;
    min-height: 4px;
}

.histogram-bar:hover { filter: brightness(1.1); transform: scaleY(1.02); transform-origin: bottom; }
.histogram-bar-value { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 0.65rem; font-weight: 700; color: #333; white-space: nowrap; }
.histogram-bar-label { font-size: 0.6rem; color: #6c757d; margin-top: 5px; text-align: center; }

.competitiveness-section { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 12px; }

.competitiveness-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    border: 1px solid rgba(0,0,0,0.05);
}

.competitiveness-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #495057;
    margin-bottom: 12px;
}

.competitiveness-header i { font-size: 1rem; }

.competitiveness-value-row { display: flex; align-items: baseline; gap: 6px; margin-bottom: 8px; }
.competitiveness-value { font-size: 1.8rem; font-weight: 800; }
.competitiveness-unit { font-size: 0.8rem; color: #6c757d; }
.competitiveness-bar { height: 8px; background: #e9ecef; border-radius: 4px; overflow: hidden; }
.competitiveness-bar-fill { height: 100%; border-radius: 4px; transition: width 0.8s ease; }
.competitiveness-desc { font-size: 0.7rem; color: #6c757d; margin-top: 6px; }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--primary-color);
    text-decoration: none;
    margin-bottom: 12px;
    font-weight: 500;
    font-size: 0.9rem;
}

.back-link:hover { text-decoration: underline; }

.empty-monitor { text-align: center; padding: 40px 15px; color: var(--secondary-color); }
.empty-monitor i { font-size: 3rem; margin-bottom: 12px; opacity: 0.5; }

@media (max-width: 768px) {
    .monitor-container { padding: 10px; }
    .monitor-header { flex-direction: column; align-items: flex-start; }
    .form-row { grid-template-columns: 1fr; }
    .action-btns { flex-wrap: wrap; }
}

.query-log-section {
    margin-top: 20px;
    padding: 15px;
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.query-log-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.query-log-section .section-header h3 { color: var(--dark-color); font-size: 1rem; display: flex; align-items: center; gap: 6px; margin: 0; }
.query-log-section .action-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.query-log-section .action-buttons .btn { padding: 6px 12px; font-size: 0.75rem; }

.engine-tabs { display: flex; gap: 8px; margin-bottom: 12px; }

.engine-tab {
    padding: 6px 14px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.engine-tab.baidu { background: #e3f2fd; color: #1976d2; }
.engine-tab.baidu:hover, .engine-tab.baidu.active { background: #1976d2; color: white; }
.engine-tab.bing { background: #fff3e0; color: #f57c00; }
.engine-tab.bing:hover, .engine-tab.bing.active { background: #f57c00; color: white; }
.engine-tab .count { background: rgba(255,255,255,0.3); padding: 2px 6px; border-radius: 10px; font-size: 0.7rem; }
.engine-tab.active .count { background: rgba(255,255,255,0.3); }

.query-log-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 15px; }
.query-log-stats .stat-card { padding: 10px 14px; }
.query-log-stats .stat-card h4 { font-size: 0.75rem; margin-bottom: 4px; }
.query-log-stats .stat-card .stat-value { font-size: 1.3rem; }

.status-querying { background: #cce5ff; color: #004085; }

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.75rem;
}

.rank-badge.top3 { background: linear-gradient(135deg, #ffd700, #ffec8b); color: #8b6914; }
.rank-badge.top10 { background: linear-gradient(135deg, #c0c0c0, #e8e8e8); color: #555; }
.rank-badge.top20 { background: linear-gradient(135deg, #cd7f32, #daa06d); color: #fff; }
.rank-badge.normal { background: #e9ecef; color: #495057; }

.auto-refresh-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: #28a745;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.auto-refresh-indicator:hover { background: rgba(40, 167, 69, 0.1); }
.auto-refresh-indicator i { font-size: 0.8rem; }

.pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: var(--radius);
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.pagination-info { font-size: 0.85rem; color: #666; }

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    color: #333;
    transition: all 0.2s ease;
    min-width: 32px;
    text-align: center;
}

.pagination-btn:hover:not(:disabled) { background: #667eea; color: white; border-color: #667eea; }
.pagination-btn.active { background: #667eea; color: white; border-color: #667eea; }
.pagination-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.pagination-btn.prev, .pagination-btn.next { padding: 6px 14px; }
.pagination-ellipsis { padding: 6px 8px; color: #999; font-size: 0.8rem; }

@media (max-width: 768px) {
    .pagination-wrapper { flex-direction: column; align-items: center; }
    .pagination-controls { justify-content: center; }
}

.pagination-size-selector { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: #666; }
.pagination-size-selector label { white-space: nowrap; }

.pagination-size-selector select {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: white;
    font-size: 0.85rem;
    color: #333;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s ease;
}

.pagination-size-selector select:hover,
.pagination-size-selector select:focus { border-color: #667eea; }

.filter-toolbar {
    background: #f8f9fa;
    border-radius: var(--radius);
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
}

.filter-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.filter-group {
    display: flex;
    align-items: center;
    gap: 5px;
    background: white;
    padding: 5px 8px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    flex: 1;
    min-width: 120px;
    height: 32px;
}

.filter-group i { color: #667eea; font-size: 0.75rem; }

.filter-group input,
.filter-group select {
    border: none;
    background: transparent;
    flex: 1;
    font-size: 0.75rem;
    outline: none;
    color: #333;
    padding: 0;
    height: 100%;
}

.filter-group input::placeholder { color: #999; }
.filter-info { margin-top: 6px; font-size: 0.75rem; color: #666; padding-top: 6px; border-top: 1px dashed #ddd; }

.batch-toolbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--radius);
    padding: 12px 15px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    color: white;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.batch-info { display: flex; align-items: center; gap: 12px; }
.batch-info input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; accent-color: white; }
.batch-info label { cursor: pointer; font-weight: 500; }
.batch-count { font-size: 0.85rem; opacity: 0.9; }
.batch-count strong { font-size: 1.1rem; margin: 0 3px; }
.batch-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.batch-actions .btn { border: none; color: white; transition: all 0.2s ease; }
.batch-actions .btn-warning { background: #ffc107; color: #333; }
.batch-actions .btn-success { background: #28a745; }
.batch-actions .btn-danger { background: #dc3545; }
.batch-actions .btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }

.monitor-table td:first-child,
.monitor-table th:first-child { text-align: center; width: 40px; }
.monitor-table input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; accent-color: #667eea; }
.monitor-table tbody tr.selected { background: #e3f2fd !important; }

.btn-outline { background: transparent; border: 1px solid #667eea; color: #667eea; transition: all 0.2s ease; }
.btn-outline:hover { background: #667eea; color: white; }

.tag-filter-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: var(--radius);
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #dee2e6;
}

.tag-filter-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 12px;
}

.tag-filter-header i { color: #667eea; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }

.tag-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tag-item:hover { border-color: #667eea; color: #667eea; }
.tag-item.active { background: #667eea; color: white; border-color: #667eea; }
.tag-item .tag-count { background: rgba(102, 126, 234, 0.1); color: #667eea; padding: 2px 6px; border-radius: 10px; font-size: 0.7rem; }
.tag-item.active .tag-count { background: rgba(255,255,255,0.2); color: white; }

.tag-colors { display: flex; gap: 8px; flex-wrap: wrap; }

.tag-color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.2s;
}

.tag-color-option:hover, .tag-color-option.selected { border-color: #333; transform: scale(1.1); }

.task-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.task-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 12px; font-size: 0.7rem; font-weight: 500; }

.chart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; flex-wrap: wrap; gap: 10px; }
.chart-header h3 { margin: 0; }
.chart-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.chart-container { display: none; background: white; border-radius: var(--radius); padding: 20px; min-height: 350px; }
.chart-container.active { display: block; }
#rank-chart-canvas { max-height: 350px; }

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.modal-overlay.active { display: flex; }

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 900px;
    max-height: 80vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header { padding: 20px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.modal-header h4 { margin: 0; color: #333; }

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
}

.modal-close:hover { color: #333; }
.modal-body { padding: 20px; overflow-y: auto; max-height: 60vh; }

.comparison-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-bottom: 20px; }
.comparison-item { display: flex; align-items: center; gap: 8px; padding: 10px; background: #f8f9fa; border-radius: 6px; cursor: pointer; transition: all 0.2s; }
.comparison-item:hover { background: #e9ecef; }
.comparison-item input[type="checkbox"] { width: 16px; height: 16px; }
.comparison-chart-container { min-height: 300px; margin-top: 20px; }

.alert-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    z-index: 10001;
    animation: slideInRight 0.4s ease;
    max-width: 400px;
    border-left: 4px solid #dc3545;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100px); }
}

.alert-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.alert-content { flex: 1; }
.alert-title { font-weight: 600; color: #333; margin-bottom: 4px; font-size: 0.95rem; }
.alert-message { color: #666; font-size: 0.85rem; line-height: 1.4; }
.alert-close { background: none; border: none; color: #999; cursor: pointer; font-size: 1.1rem; padding: 5px; transition: color 0.2s; }
.alert-close:hover { color: #333; }

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s;
}

.loading-overlay.hidden { opacity: 0; pointer-events: none; }

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text { margin-top: 15px; color: #666; font-size: 0.9rem; }

.quick-actions {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 100;
}

.quick-action-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
}

.quick-action-btn:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5); }
.quick-action-btn.secondary { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); box-shadow: 0 4px 15px rgba(240, 147, 251, 0.4); }
.quick-action-btn.secondary:hover { box-shadow: 0 6px 20px rgba(240, 147, 251, 0.5); }
.quick-action-btn.screenshot { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4); }
.quick-action-btn.screenshot:hover { box-shadow: 0 6px 20px rgba(79, 172, 254, 0.5); }

.update-time { font-size: 0.75rem; color: #999; text-align: right; padding: 5px 10px; }

.seo-suggestions-section {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    border-radius: 8px;
    padding: 10px;
    margin-top: 10px;
    margin-bottom: 16px;
    border: 1px solid #ffeaa7;
}

.seo-suggestions-header {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    color: #856404;
    margin-bottom: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    user-select: none;
}

.seo-suggestions-header i { color: #f39c12; }

.seo-suggestions-toggle {
    margin-left: auto;
    background: none;
    border: none;
    color: #856404;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.seo-suggestions-toggle:hover { color: #f39c12; }
.seo-suggestions-toggle.collapsed { transform: rotate(-90deg); }

.seo-suggestions-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    max-height: 1000px;
    opacity: 1;
    overflow: hidden;
}

.seo-suggestions-list.collapsed { max-height: 0; opacity: 0; margin: 0; }

.seo-suggestion-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 10px;
    background: white;
    border-radius: 6px;
    border-left: 3px solid;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.seo-suggestion-item.high { border-left-color: #dc3545; }
.seo-suggestion-item.medium { border-left-color: #ffc107; }
.seo-suggestion-item.low { border-left-color: #28a745; }

.seo-suggestion-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.seo-suggestion-item.high .seo-suggestion-icon { background: #ffebee; color: #dc3545; }
.seo-suggestion-item.medium .seo-suggestion-icon { background: #fff8e1; color: #ffc107; }
.seo-suggestion-item.low .seo-suggestion-icon { background: #e8f5e9; color: #28a745; }

.seo-suggestion-content { flex: 1; }
.seo-suggestion-title { font-weight: 600; color: #333; margin-bottom: 2px; font-size: 0.8rem; }
.seo-suggestion-desc { color: #666; font-size: 0.75rem; line-height: 1.3; }
.seo-suggestion-keyword { display: inline-block; background: #f0f0f0; padding: 1px 6px; border-radius: 3px; font-size: 0.7rem; color: #666; margin-top: 4px; }

.keyboard-shortcuts {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.75rem;
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s;
}

.keyboard-shortcuts.visible { opacity: 1; }
.keyboard-shortcuts kbd { background: rgba(255,255,255,0.2); padding: 2px 6px; border-radius: 4px; margin: 0 2px; }

.login-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.login-modal-overlay.active { opacity: 1; visibility: visible; }

.login-modal {
    background: white;
    border-radius: 16px;
    padding: 40px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
    position: relative;
}

.login-modal-overlay.active .login-modal { transform: scale(1) translateY(0); }

.login-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    color: #666;
}

.login-modal-close:hover { background: #e0e0e0; color: #333; }

.login-modal-header { text-align: center; margin-bottom: 30px; }
.login-modal-header .logo { width: 60px; height: 60px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 15px; }
.login-modal-header .logo i { font-size: 28px; color: white; }
.login-modal-header h2 { font-size: 20px; color: #333; margin-bottom: 5px; }
.login-modal-header p { color: #888; font-size: 13px; }

.login-form-group { margin-bottom: 18px; }
.login-form-group label { display: block; margin-bottom: 6px; font-weight: 500; color: #555; font-size: 13px; }

.login-input-wrapper { position: relative; }
.login-input-wrapper i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #999; font-size: 14px; }

.login-form-group input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.login-form-group input:focus { outline: none; border-color: #667eea; }
.login-form-group input::placeholder { color: #bbb; }

.btn-login-submit {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 8px;
}

.btn-login-submit:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4); }
.btn-login-submit:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

.toast-container { position: fixed; top: 20px; right: 20px; z-index: 10001; }

.toast {
    background: white;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
    min-width: 220px;
    font-size: 14px;
}

.toast.success { border-left: 4px solid #28a745; }
.toast.error { border-left: 4px solid #dc3545; }
.toast i { font-size: 18px; }
.toast.success i { color: #28a745; }
.toast.error i { color: #dc3545; }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-end;
}

.nav-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.95);
    color: #667eea;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.2);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    height: 36px;
    box-sizing: border-box;
}

.nav-item:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
    border-color: transparent;
}

.nav-item i { font-size: 0.85rem; }

.nav-dropdown { position: relative; }
.nav-dropdown > .nav-item { position: relative; padding-right: 30px; }

.nav-dropdown > .nav-item::after {
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.nav-dropdown:hover > .nav-item::after { transform: translateY(-50%) rotate(180deg); }

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 160px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 4px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    overflow: hidden;
}

.nav-dropdown:hover .nav-dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }

.nav-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: #667eea;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.nav-dropdown-menu a:last-child { border-bottom: none; }
.nav-dropdown-menu a:hover { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; }
.nav-dropdown-menu a i { font-size: 0.9rem; width: 16px; text-align: center; }

.company-switcher-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 6px;
    border: 1px solid rgba(102, 126, 234, 0.3);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    height: 36px;
    box-sizing: border-box;
}

.company-switcher-wrapper i { color: #667eea; font-size: 0.85rem; }

.company-switcher-wrapper select {
    background: transparent;
    border: none;
    color: #667eea;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    padding: 0;
}

.company-switcher-wrapper select option { background: white; color: #333; }

.engine-selector {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 6px;
    border: 1px solid rgba(102, 126, 234, 0.3);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    height: 36px;
    box-sizing: border-box;
}

.engine-selector label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
    color: #667eea;
}

.engine-selector label:hover { background: rgba(102, 126, 234, 0.1); }
.engine-selector label.active { background: #667eea; color: white; }
.engine-selector label.baidu.active { background: #1976d2; }
.engine-selector label.bing.active { background: #f57c00; }
.engine-selector input[type="radio"] { display: none; }

.header { display: flex; flex-direction: column; align-items: stretch; gap: 15px; }
.header .logo { margin-bottom: 0; }

@media (max-width: 992px) {
    .header { align-items: stretch; }
    .header .logo { margin-bottom: 5px; }
    .header-nav { flex-wrap: wrap; justify-content: flex-end; }
}

@media (max-width: 576px) {
    .nav-item { padding: 6px 12px; font-size: 0.8rem; }
    .company-switcher-wrapper { padding: 6px 12px; }
}

/* ====== 竞价物料页面新功能样式 ====== */

/* 质量度评分 */
.quality-score {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.quality-score:hover {
    transform: scale(1.05);
}
.quality-score.excellent {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
}
.quality-score.good {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    color: #0c5460;
}
.quality-score.fair {
    background: linear-gradient(135deg, #fff3cd, #ffe69c);
    color: #856404;
}
.quality-score.poor {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
}
.quality-score .score-bar {
    display: inline-flex;
    gap: 2px;
    margin-left: 3px;
}
.quality-score .score-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.3;
}
.quality-score .score-dot.filled {
    opacity: 1;
}

/* 质量度建议浮窗 */
.quality-tip {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.7rem;
    line-height: 1.5;
    white-space: nowrap;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    margin-top: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.quality-score:hover .quality-tip {
    opacity: 1;
    visibility: visible;
}
.quality-tip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: #333;
}

/* 匹配模式标签 */
.match-type {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}
.match-type:hover {
    filter: brightness(1.1);
}
.match-type.exact {
    background: #e8f5e9;
    color: #2e7d32;
    border-color: #c8e6c9;
}
.match-type.phrase {
    background: #e3f2fd;
    color: #1565c0;
    border-color: #bbdefb;
}
.match-type.broad {
    background: #fff3e0;
    color: #e65100;
    border-color: #ffe0b2;
}

/* 创意预览按钮 */
.btn-preview {
    background: #f3e5f5;
    color: #7b1fa2;
    border: 1px solid #e1bee7;
}
.btn-preview:hover {
    background: #e1bee7;
    border-color: #ce93d8;
}

/* 落地页检测 */
.landing-status {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}
.landing-status.healthy {
    background: #d4edda;
    color: #155724;
}
.landing-status.warning {
    background: #fff3cd;
    color: #856404;
}
.landing-status.error {
    background: #f8d7da;
    color: #721c24;
}
.landing-status.checking {
    background: #cce5ff;
    color: #004085;
}

/* 百度搜索结果预览 */
.baidu-preview {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 16px 20px;
    max-width: 600px;
    font-family: arial, sans-serif;
}
.baidu-preview .preview-url {
    font-size: 12px;
    color: #006621;
    line-height: 1.5;
    margin-bottom: 2px;
    word-break: break-all;
}
.baidu-preview .preview-title {
    font-size: 16px;
    color: #1a0dab;
    font-weight: 400;
    line-height: 1.4;
    cursor: pointer;
    margin-bottom: 2px;
    text-decoration: none;
}
.baidu-preview .preview-title:hover {
    text-decoration: underline;
}
.baidu-preview .preview-title em {
    font-style: normal;
    color: #1a0dab;
    font-weight: 700;
}
.baidu-preview .preview-desc {
    font-size: 13px;
    color: #545454;
    line-height: 1.58;
    word-break: break-all;
}
.baidu-preview .preview-desc em {
    font-style: normal;
    color: #545454;
    font-weight: 700;
}
.baidu-preview .preview-tools {
    margin-top: 8px;
    display: flex;
    gap: 12px;
    font-size: 12px;
}
.baidu-preview .preview-tools a {
    color: #666;
    text-decoration: none;
}
.baidu-preview .preview-tools a:hover {
    color: #333;
}
.baidu-preview .preview-ad-badge {
    display: inline-block;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 2px;
    padding: 0 3px;
    font-size: 10px;
    color: #70757a;
    margin-right: 2px;
    vertical-align: middle;
    line-height: 16px;
}

/* 否定关键词管理 */
.negative-keywords-section {
    background: #f8f9fa;
    border-radius: var(--radius);
    padding: 12px 15px;
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
}
.negative-keywords-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.negative-keywords-header h3 {
    font-size: 0.9rem;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}
.negative-keywords-header h3 i {
    color: #dc3545;
}
.negative-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.negative-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: #fff;
    border: 1px solid #f5c6cb;
    border-radius: 14px;
    font-size: 0.75rem;
    color: #721c24;
    transition: all 0.2s ease;
}
.negative-tag:hover {
    background: #f8d7da;
}
.negative-tag .remove-neg {
    cursor: pointer;
    font-size: 0.7rem;
    color: #dc3545;
    opacity: 0.6;
    transition: opacity 0.2s;
}
.negative-tag .remove-neg:hover {
    opacity: 1;
}
.negative-input-group {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}
.negative-input-group input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.8rem;
    outline: none;
}
.negative-input-group input:focus {
    border-color: #667eea;
}

/* 搭配建议 */
.suggestion-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 600;
    cursor: help;
}
.suggestion-badge.match-high {
    background: #d4edda;
    color: #155724;
}
.suggestion-badge.match-good {
    background: #d1ecf1;
    color: #0c5460;
}
.suggestion-badge.match-low {
    background: #fff3cd;
    color: #856404;
}

/* 小屏适配 */
@media (max-width: 768px) {
    .quality-tip {
        left: 0;
        transform: none;
    }
}
