/* --- style.css --- */

/* 1. カラー変数定義 */
:root {
    --primary: #6366f1;   /* インディゴ */
    --like: #10b981;      /* エメラルド */
    --dislike: #f43f5e;   /* ローズ */
    --comment: #f59e0b;   /* アンバー */
    --bg: #f8fafc;        /* 薄いグレー */
    --text-main: #1e293b;
    --text-sub: #64748b;
    --text-mute: #94a3b8;
}

/* 2. ベーススタイル */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
    background: var(--bg);
    margin: 0;
    padding: 10px;
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* 3. ヘッダー */
.header {
    text-align: center;
    padding: 20px 0 10px;
}

.header h1 {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 900;
    background: linear-gradient(to right, #6366f1, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header .update-info {
    font-size: 0.8rem;
    color: var(--text-mute);
    margin-top: 5px;
}

/* 4. ナビゲーション (タブ) */
.nav-pills {
    display: flex;
    background: #e2e8f0;
    padding: 4px;
    border-radius: 12px;
    margin: 15px 0;
}

.nav-pills a {
    flex: 1;
    text-align: center;
    padding: 10px;
    text-decoration: none;
    color: var(--text-sub);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.nav-pills a.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* 5. カードUI */
.card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    margin-bottom: 12px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255,255,255,0.7);
}

.card-body {
    padding: 15px;
    display: flex;
    align-items: center;
}

/* 6. ランキング・名前 */
.rank-badge {
    width: 35px;
    font-weight: 900;
    font-style: italic;
    color: #cbd5e1;
    font-size: 1.2rem;
    margin-right: 10px;
}

.rank-1 { color: #fbbf24; }
.rank-2 { color: #94a3b8; }
.rank-3 { color: #b45309; }

.info { flex: 1; }

.name {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 4px;
    display: block;
    text-decoration: none;
    transition: color 0.2s;
}

.name:hover {
    color: var(--primary);
}

/* 7. 比率・プログレスバー */
.ratio-container {
    width: 100px;
    text-align: right;
}

.ratio-val {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--dislike); /* 好き嫌いの熱量として赤系 */
}

.ratio-badge {
    background: #fef2f2;
    color: var(--dislike);
    padding: 4px 8px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.8rem;
    margin-top: 5px;
    display: inline-block;
}

.progress-bar-bg {
    background: #f1f5f9;
    height: 6px;
    border-radius: 3px;
    margin-top: 5px;
    overflow: hidden;
    width: 100%;
}

.progress-bar-fill {
    background: var(--dislike);
    height: 100%;
    border-radius: 3px;
}

/* 8. 統計グリッド (増加数など) */
.stats-grid {
    display: flex;
    background: #f8fafc;
    padding: 10px 15px;
    gap: 15px;
    border-top: 1px solid #f1f5f9;
}

.stat-item {
    font-size: 0.75rem;
    color: var(--text-sub);
}

.gain {
    font-weight: bold;
    margin-left: 3px;
}

.gain-like { color: var(--like); }
.gain-dis { color: var(--dislike); }
.gain-num { font-size: 1.2rem; font-weight: 900; color: var(--like); }