/* ============ 字数统计 - 工具特有样式 ============ */
/* 通用样式（卡片、按钮、分隔线、info-box、form-textarea 等）已由 common.css 统一提供 */

/* ---- 容器 ---- */
#count-container {
    margin-bottom: 15px;
}

/* ---- 左右两栏 flex 布局 ---- */
#count-container > .section-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

#count-container > .section-row > .settings-card,
#count-container > .section-row > .preview-card {
    flex: 1;
    margin-top: 0;
    margin-bottom: 0;
}

/* ---- 统计网格 ---- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.stat-item {
    background: #f9fafb;
    border-radius: 8px;
    padding: 14px 8px;
    text-align: center;
    transition: all 0.2s ease;
}

.stat-item:hover {
    background: #f3e8ff;
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 22px;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 22px;
    font-weight: 700;
    color: #8b5cf6;
    margin-bottom: 2px;
    font-family: 'Consolas', 'Monaco', monospace;
}

.stat-label {
    font-size: 12px;
    color: #6b7280;
}

/* ---- 详细统计 ---- */
.detail-section {
    border-top: 1px solid #e5e7eb;
    padding-top: 14px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 7px 0;
    border-bottom: 1px dashed #e5e7eb;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 13px;
    color: #6b7280;
}

.detail-value {
    font-size: 13px;
    color: #1f2937;
    font-weight: 500;
    font-family: 'Consolas', 'Monaco', monospace;
}

/* ---- 字符分布图表 ---- */
#count-container > .settings-card {
    margin-top: 15px;
}

.frequency-chart {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.frequency-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.frequency-char {
    width: 30px;
    text-align: center;
    font-size: 14px;
    font-family: 'Consolas', 'Monaco', monospace;
    color: #374151;
    flex-shrink: 0;
}

.frequency-bar-container {
    flex: 1;
    height: 20px;
    background: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
}

.frequency-bar {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #7c3aed);
    border-radius: 4px;
    transition: width 0.3s ease;
    min-width: 2px;
}

.frequency-count {
    width: 45px;
    text-align: right;
    font-size: 13px;
    color: #6b7280;
    font-family: 'Consolas', 'Monaco', monospace;
    flex-shrink: 0;
}

/* ---- 功能说明信息区 ---- */
#app > .info-section {
    margin-top: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ---- 响应式 ---- */
@media (max-width: 768px) {
    #count-container > .section-row {
        flex-direction: column;
        gap: 12px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    #app > .info-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .stat-value {
        font-size: 18px;
    }

    .stat-icon {
        font-size: 18px;
    }
}
