/* ========================================
   統計画面専用スタイル
   ======================================== */

/* サマリーカードセクション */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 24px 16px 0;
}

.summary-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5dcc5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.summary-number {
    color: #D4AF37;
    font-weight: 700;
    font-size: 1.25rem;
    line-height: 1;
}

.summary-rating {
    display: flex;
    align-items: center;
    gap: 2px;
}

.star-small {
    color: #D4AF37;
    font-size: 0.75rem;
    font-variation-settings: 'FILL' 1;
}

.summary-label {
    font-size: 10px;
    color: #8b735b;
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 4px;
}

/* メインコンテンツエリア */
.stats-main {
    flex: 1;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 統計カード */
.stats-card {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5dcc5;
}

.stats-card-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: #2c1e1a;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stats-card-title .material-symbols-outlined {
    color: #D4AF37;
    font-size: 1.125rem;
}

/* 棒グラフ（月別） */
.chart-container {
    margin-top: 16px;
}

.bar-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 128px;
    gap: 8px;
}

.bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    gap: 4px;
}

.bar-wrapper {
    width: 100%;
    height: 100px;
    display: flex;
    align-items: flex-end;
}

.bar {
    width: 100%;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    transition: height 0.3s ease;
    background: linear-gradient(to top, #D4AF37, #c4a070);
}

.bar-count {
    font-size: 11px;
    font-weight: 700;
    color: #5d4037;
}

.bar-label {
    font-size: 10px;
    color: #8b735b;
    font-weight: 700;
}

/* ジャンル別円グラフ */
.genre-chart-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.donut-chart-wrapper {
    position: relative;
    width: 128px;
    height: 128px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.donut-chart {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.donut-center {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.donut-number {
    font-size: 0.75rem;
    font-weight: 700;
    color: #5d4037;
    line-height: 1;
}

.donut-label {
    font-size: 8px;
    color: #8b735b;
    text-transform: uppercase;
    font-weight: 700;
}

/* ジャンル凡例 */
.genre-legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color-box {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.color-classic {
    background-color: #5d4037;
}

.color-mystery {
    background-color: #D4AF37;
}

.color-scifi {
    background-color: #8b735b;
}

.color-others {
    background-color: #c4a484;
}

.legend-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
}

.legend-name {
    font-size: 11px;
    font-weight: 500;
    color: #2c1e1a;
}

.legend-percent {
    font-size: 11px;
    font-weight: 700;
    color: #2c1e1a;
}

/* 評価別分布 */
.rating-chart {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rating-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rating-label {
    font-size: 10px;
    font-weight: 700;
    color: #8b735b;
    width: 16px;
    flex-shrink: 0;
}

.rating-bar-bg {
    flex: 1;
    height: 8px;
    background-color: #f3f4f6;
    border-radius: 9999px;
    overflow: hidden;
}

.rating-bar {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.3s ease;
    background-color: #D4AF37;
}

.rating-bar-60 {
    width: 60%;
    background-color: #D4AF37;
}

.rating-bar-45 {
    width: 45%;
    background-color: #D4AF37;
}

.rating-bar-20 {
    width: 20%;
    background-color: rgba(212, 175, 55, 0.4);
}

.rating-bar-8 {
    width: 8%;
    background-color: rgba(212, 175, 55, 0.2);
}

.rating-count {
    font-size: 10px;
    font-weight: 700;
    color: #5d4037;
    width: 24px;
    text-align: right;
    flex-shrink: 0;
}

/* ========================================
   レスポンシブデザイン（統計画面）
   ======================================== */

/* タブレット（768px以上） */
@media (min-width: 768px) {
    .summary-cards {
        max-width: 600px;
        margin: 0 auto;
        padding-top: 32px;
    }
    
    .stats-main {
        max-width: 800px;
        margin: 0 auto;
        padding: 32px 24px;
    }
    
    .bar-chart {
        gap: 12px;
    }
}

/* PC（1024px以上） */
@media (min-width: 1024px) {
    .summary-cards {
        max-width: 800px;
        gap: 16px;
    }

    .stats-main {
        max-width: 600px;
        display: flex;
        flex-direction: column;
        gap: 24px;
    }
}

/* 大画面PC（1280px以上） */
@media (min-width: 1280px) {
    .summary-cards {
        max-width: 900px;
    }
    
    .stats-main {
        max-width: 1200px;
    }
}