@charset "UTF-8";

/* =========================================
   ベース設定
   ========================================= */
body {
    margin: 0;
    font-family: "Noto Sans JP", "Helvetica Neue", Meiryo, sans-serif;
    background-color: #f5f0eb; /* オレンジ系に合わせた温かみのある背景 */
    color: #333;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* =========================================
   ヘッダー（ヒーローセクション）
   ========================================= */
header {
    background: linear-gradient(135deg, #b34700 0%, #ff8c00 100%); /* 濃オレンジ → 明オレンジ */
    color: #fff;
    padding: 25px 20px;
    box-shadow: 0 4px 15px rgba(179, 71, 0, 0.4);
    margin-bottom: 40px;
    border-bottom: 5px solid #1a1a2e; /* ダークネイビーでシアターっぽさを演出 */
}

/* レイアウト用コンテナ */
.header-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70px;
}

/* --- 左側：ロゴエリア --- */
.header-left {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.brand-logo {
    font-family: "Kanit", sans-serif;
    font-weight: 800;
    font-style: italic;
    font-size: 3.5rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    text-shadow: 4px 4px 0px rgba(0, 0, 0, 0.25);
    line-height: 1;
    white-space: nowrap;
}

/* --- 中央：テキストエリア --- */
.header-center {
    text-align: center;
}

.header-center h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.header-center p {
    margin: 5px 0 0;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
}

/* --- スマホ・タブレット対応（1024px以下） --- */
@media (max-width: 1024px) {
    .header-content {
        flex-direction: column;
        padding: 15px 0;
        min-height: auto;
    }

    .header-left {
        position: static;
        transform: none;
        margin-bottom: 15px;
        text-align: center;
    }

    .brand-logo {
        font-size: 3rem;
    }

    .header-center {
        text-align: center;
    }

    .header-center h1 {
        font-size: 1.2rem;
    }

    .header-center p {
        font-size: 0.85rem;
    }
}


/* =========================================
   メインコンテンツエリア
   ========================================= */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

h2 {
    font-size: 1.5rem;
    color: #2c3e50;
    border-bottom: 3px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 8px;
    margin-bottom: 25px;
    display: inline-block;
}


/* =========================================
   年代セクション（背景色）
   ========================================= */
.genre-section {
    background: #fff;
    margin-bottom: 60px;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.02);
}

/* ■ 最新（2025年・2026年）：フレッシュなオレンジレッド */
#section-latest {
    background-color: #fdfdfd;
    background-image: linear-gradient(to bottom, #fff3e0 0%, #ffffff 150px);
}
#section-latest h2 {
    border-color: #ff6d00;
    color: #e65c00;
}

/* ■ 2020年代：明るいアンバー */
#section-2020s {
    background-color: #fdfdfd;
    background-image: linear-gradient(to bottom, #fff8e1 0%, #ffffff 150px);
}
#section-2020s h2 {
    border-color: #ffb300;
    color: #e65100;
}

/* ■ 2010年代：ゴールデンイエロー */
#section-2010s {
    background-color: #fdfdfd;
    background-image: linear-gradient(to bottom, #fffde7 0%, #ffffff 150px);
}
#section-2010s h2 {
    border-color: #f9a825;
    color: #f57f17;
}

/* ■ 2000年代：ウォームグリーン（ミレニアム感） */
#section-2000s {
    background-color: #fdfdfd;
    background-image: linear-gradient(to bottom, #f1f8e9 0%, #ffffff 150px);
}
#section-2000s h2 {
    border-color: #7cb342;
    color: #558b2f;
}

/* ■ 1990年代：ノスタルジックなティール */
#section-1990s {
    background-color: #fdfdfd;
    background-image: linear-gradient(to bottom, #e0f7fa 0%, #ffffff 150px);
}
#section-1990s h2 {
    border-color: #00acc1;
    color: #006064;
}

/* ■ 1980年代：バイブスのあるインディゴ */
#section-1980s {
    background-color: #fdfdfd;
    background-image: linear-gradient(to bottom, #e8eaf6 0%, #ffffff 150px);
}
#section-1980s h2 {
    border-color: #5c6bc0;
    color: #283593;
}

/* ■ 1970年代：ブラウニッシュなバーガンディ */
#section-1970s {
    background-color: #fdfdfd;
    background-image: linear-gradient(to bottom, #fce4ec 0%, #ffffff 150px);
}
#section-1970s h2 {
    border-color: #e91e63;
    color: #880e4f;
}

/* ■ 1960年代：モカブラウン */
#section-1960s {
    background-color: #fdfdfd;
    background-image: linear-gradient(to bottom, #efebe9 0%, #ffffff 150px);
}
#section-1960s h2 {
    border-color: #8d6e63;
    color: #4e342e;
}

/* ■ 1950年代：モノクローム寄りのスレートグレー */
#section-1950s {
    background-color: #fdfdfd;
    background-image: linear-gradient(to bottom, #eceff1 0%, #ffffff 150px);
}
#section-1950s h2 {
    border-color: #78909c;
    color: #37474f;
}

/* ■ 1940年代：ダスティローズ */
#section-1940s {
    background-color: #fdfdfd;
    background-image: linear-gradient(to bottom, #f3e5f5 0%, #ffffff 150px);
}
#section-1940s h2 {
    border-color: #ab47bc;
    color: #6a1b9a;
}

/* ■ 1930年以前：クラシックなセピア */
#section-pre1930 {
    background-color: #fdfdfd;
    background-image: linear-gradient(to bottom, #fdf6ec 0%, #ffffff 150px);
}
#section-pre1930 h2 {
    border-color: #a1887f;
    color: #5d4037;
}


/* =========================================
   コントロールエリア（グラフ＆操作パネル）
   ========================================= */
.genre-top-area {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    margin-bottom: 30px;
}

.chart-card {
    flex: 3;
    min-width: 300px;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    display: flex;
    flex-direction: column;
}

.chart-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.genre-controls {
    flex: 2;
    min-width: 280px;
    background: rgba(255, 255, 255, 0.6);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 15px;
}

.control-group {
    flex-grow: 1;
    flex-basis: 140px;
}

.control-group:last-child {
    flex-basis: auto;
    flex-grow: 2;
}

.genre-controls label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #555;
    margin-bottom: 6px;
}

.genre-controls select,
.genre-controls input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 0.95rem;
    background: #fff;
    height: 42px;
    box-sizing: border-box;
}

/* フォーカス色：オレンジ系に変更 */
.genre-controls select:focus,
.genre-controls input:focus {
    border-color: #e65c00;
    outline: none;
    box-shadow: 0 0 0 3px rgba(230, 92, 0, 0.12);
}

.search-box-wrapper {
    display: flex;
    width: 100%;
}

.search-box-wrapper input {
    border-radius: 8px 0 0 8px;
    border-right: none;
}

/* 検索ボタン：オレンジ系に変更 */
.search-btn {
    background-color: #e65c00;
    color: white;
    border: 1px solid #e65c00;
    padding: 0 20px;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
    white-space: nowrap;
    min-width: 80px;
}

.search-btn:hover {
    background-color: #bf4e00;
}

/* 検索ボタン無効時 */
.search-btn:disabled {
    background-color: #ccc !important;
    border-color: #ccc !important;
    color: #888 !important;
    cursor: not-allowed;
    box-shadow: none !important;
}


/* =========================================
   映画カード並びエリア（横スクロール）
   ========================================= */
.genre-movie-area {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 10px 10px 25px 10px;
    scrollbar-width: thin;
    scrollbar-color: #f0a060 rgba(0, 0, 0, 0.05); /* スクロールバーもオレンジ寄りに */
}

.genre-movie-area::-webkit-scrollbar {
    height: 8px;
}

.genre-movie-area::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.genre-movie-area::-webkit-scrollbar-thumb {
    background: #f0a060; /* オレンジ系スクロールバー */
    border-radius: 4px;
}


/* =========================================
   映画カードデザイン (BookRee風デザイン)
   ========================================= */
   .movie-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px; /* 丸みを少し強く */
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    min-width: 220px; /* 少し広げて情報を入れやすく */
    max-width: 220px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: #ffcc99;
    z-index: 10;
}

.movie-item {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
}

.movie-cover {
    width: 80px;
    height: 115px;
    aspect-ratio: 100 / 140;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.movie-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.movie-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 6px;
    color: #2c3e50;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-author-text {
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-bottom: auto; /* スコアを下部に押しやる */
}

/* ★スコアのデザイン */
.movie-score {
    font-size: 1.2rem;
    font-weight: 800;
    color: #e65c00;
    margin-top: 8px;
}

/* ストリーミングボタンエリア */
.streaming-links {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.stream-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 900;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.1s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stream-btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

/* アマプラボタン風 */
.prime-btn {
    background-color: #00A8E1;
    color: #fff;
    font-style: italic;
    letter-spacing: -0.5px;
}

/* ネトフリボタン風 */
.netflix-btn {
    background-color: #000;
    color: #E50914;
    letter-spacing: 0.5px;
}

.netflix-btn svg {
    margin-right: 4px;
}

/* 投票ボタンエリア（BookRee風のピルボタン） */
.rating-area {
    margin-top: auto;
    border-top: 1px dashed #eee;
    padding-top: 12px;
}

.rating-buttons {
    display: flex;
    gap: 8px;
}

.btn-vote {
    flex: 1;
    background: #fff;
    color: #e65c00;
    border: 1px solid #e65c00;
    padding: 6px 0;
    border-radius: 20px; /* 角を完全に丸くする */
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-vote:hover {
    background: #e65c00;
    border-color: #e65c00;
    color: white;
}

.voted-message {
    text-align: center;
    font-size: 0.85rem;
    font-weight: bold;
    color: #27ae60;
    background: #eafaf1;
    padding: 8px;
    border-radius: 6px;
}

/* =========================================
   ランキングバッジ
   ========================================= */
.rank-badge {
    position: absolute;
    top: -10px;
    left: -10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff;
    font-weight: 800;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    border: 2px solid #fff;
    background: #95a5a6;
}

.rank-badge.rank-1 {
    background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
    width: 44px;
    height: 44px;
    font-size: 20px;
    top: -12px;
    left: -12px;
}

.rank-badge.rank-2 {
    background: linear-gradient(135deg, #bdc3c7 0%, #95a5a6 100%);
    width: 40px;
    height: 40px;
    font-size: 18px;
}

.rank-badge.rank-3 {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
}

/* =========================================
   インフォボタン
   ========================================= */
   .info-btn {
    background: #fff;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    color: #555;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.info-btn:hover {
    background: #f9f9f9;
    color: #333;
}

/* =========================================
   モーダル
   ========================================= */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    overflow-y: auto;
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border: none;
    width: 90%;
    max-width: 600px;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideIn 0.3s ease-out;
}

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

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
}

.close-btn:hover {
    color: #333;
}

/* =========================================
   おすすめ映画エリア（featured）
   ========================================= */
#featured-section {
    background: #fff3e0; /* 薄いオレンジ */
    border: 2px solid #ff8c00;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 30px;
    display: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.featured-label {
    background: #ff8c00;
    color: #fff;
    font-weight: bold;
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    margin-bottom: 10px;
}

/* =========================================
   フッター共通ボタン（action-btn）
   ========================================= */
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 16px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 20px;
    text-decoration: none;
    color: #555;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-family: inherit;
}

.action-btn:hover {
    background-color: #fff8f3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    color: #e65c00;
}
/* =========================================
   レスポンシブ（タブレット共通：1024px以下）
   ========================================= */
@media (max-width: 1024px) {
    header { padding: 20px 15px; }

    .genre-section { padding: 20px; }
    .genre-top-area { flex-direction: column; }
    .genre-controls { flex-direction: column; }
    .control-group { flex-basis: 100%; }

    .movie-card { min-width: 200px; max-width: 200px; }
}

/* =========================================
   スマホUI（768px以下）
   ========================================= */
@media (max-width: 768px) {
    .movie-card {
        width: 170px !important;
        min-width: 170px !important;
        max-width: 170px !important;
        flex: 0 0 auto !important;
        margin: 0 10px 0 0 !important;
        padding: 12px !important;
    }

    .movie-item {
        gap: 10px;
    }

    .movie-title {
        font-size: 0.85rem !important;
        line-height: 1.3;
    }

    .movie-score {
        font-size: 1rem;
    }

    .streaming-links {
        gap: 4px;
    }

    .stream-btn {
        font-size: 0.65rem;
        padding: 6px 0;
        flex-direction: column; /* スマホではアイコンと文字を縦並びに */
        gap: 2px;
    }
    
    .netflix-btn svg { margin-right: 0; }

    /* フッターボタン */
    .footer-buttons {
        flex-direction: column;
        align-items: center;
    }

    .footer-buttons .action-btn {
        width: 80%;
    }
}

/* =========================================
   フッターデザイン
   ========================================= */
.site-footer {
    background-color: #fff;
    border-top: 1px solid #ddd;
    padding: 40px 20px;
    margin-top: 60px;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
}

.footer-attribution {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 5px;
}

.copyright {
    font-size: 0.85rem;
    color: #aaa;
    margin: 0;
}

/* ===== 配信サイト アイコンボタン ===== */
.streaming-links {
    display: flex;
    justify-content: center;
    gap: 15px; /* ボタン同士の隙間 */
    padding: 15px 0 10px 0;
}

.stream-icon-btn {
    display: inline-block;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 12px; /* アイコンの角丸に合わせる */
}

/* ホバー（カーソルを乗せた時）に少し浮き上がる演出 */
.stream-icon-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.stream-icon-btn img {
    width: 44px;  /* アイコンの幅 */
    height: 44px; /* アイコンの高さ */
    border-radius: 12px;
    object-fit: cover;
    vertical-align: bottom; /* ズレ防止 */
}

/* ===== レビュー・予告編ボタンエリア (新規・修正) ===== */
.link-buttons-area {
    display: flex;
    justify-content: space-between; /* 2つのボタンを両端に寄せる */
    gap: 10px; /* ボタン間の隙間 */
    padding: 10px 15px 0; /* 上下の余白調整 */
}

/* 共通のボタン基本スタイル */
.btn-link-item {
    flex: 1; /* 均等な幅にする */
    display: inline-flex; /* 中央揃えのため */
    align-items: center;
    justify-content: center;
    text-decoration: none;
    text-align: center;
    padding: 6px 0; /* 高さを低くして小さく */
    border-radius: 8px;
    font-size: 12px; /* 文字を小さく */
    font-weight: bold;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1); /* 影を薄く */
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s;
    white-space: nowrap; /* 改行防止 */
}

/* ホバー時の演出（共通） */
.btn-link-item:hover {
    transform: translateY(-1px); /* 浮き具合を小さく */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Filmarks（レビュー）ボタン */
.btn-review {
    background-color: #ffcc00; /* イエロー */
    color: #111; /* 黒系文字 */
}

.btn-review:hover {
    background-color: #e6b800; /* 少し濃く */
}

/* YouTube（予告編）ボタン */
.btn-trailer {
    background-color: #c0392b; /* YouTube風の赤 */
    color: #fff; /* 白文字 */
}

.btn-trailer:hover {
    background-color: #a93226; /* 少し濃く */
}

/* ===== スマホ用レイアウト調整（画面幅が768px以下の場合） ===== */
@media screen and (max-width: 768px) {
    /* 1. グラフエリアと「グラフ表示数」を非表示（CinemaRee専用） */
    .chart-wrapper {
        display: none !important;
    }
    .genre-controls .control-group:first-child {
        display: none !important;
    }

    /* 2. 操作パネル全体を幅100%にし、隙間を極限まで詰める */
    .genre-controls {
        width: 100%;
        margin-left: 0 !important;
        gap: 4px !important;
    }
    .genre-top-area {
        flex-direction: column;
    }

    /* 3. 各項目の外側の余白を最小限に */
    .control-group {
        margin-bottom: 4px !important;
    }
    .control-group label {
        font-size: 11px !important; 
        margin-bottom: 2px !important; 
        line-height: 1.2 !important;
    }

    /* 4. プルダウン・検索入力欄・検索ボタンの高さを完全に統一し極小化 */
    .form-select, 
    .form-input, 
    .search-btn {
        padding: 2px 8px !important;
        font-size: 13px !important;
        height: 32px !important;
        line-height: 1.5 !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }
    .search-btn {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* 5. 操作パネルとカード一覧の間にわずかな余白を作る */
    .genre-top-area, 
    .genre-controls {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
    .genre-movies-area {
        margin-top: 12px !important;
        padding-top: 0 !important;
    }

    /* 6. 順位マークをスマホ用に小さく、位置を微調整 */
    .rank-badge {
        width: 22px !important;
        height: 22px !important;
        font-size: 11px !important;
        top: 2px !important;
        left: 2px !important;
        box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    }

    /* 7. セクション見出しと操作パネルの間の余白を詰める */
    .genre-section h2 {
        margin-bottom: 6px !important;
        padding-bottom: 0 !important;
    }
    .genre-top-area {
        margin-top: 0 !important;
    }

    /* 8. ヘッダーとメインコンテンツの間の余白を詰める */
    header, 
    .header-content {
        padding-bottom: 8px !important;
        margin-bottom: 0 !important;
    }
    main {
        padding-top: 8px !important;
    }
    .genre-section {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    /* 9. 各セクション同士の間の余白を詰める */
    .genre-section {
        margin-bottom: 16px !important;
    }

    /* 10. セクション内側（上下）の余白と、見出しの上の隙間を詰める */
    .genre-section {
        padding: 8px !important;
    }
    .genre-section h2 {
        margin-top: 0 !important;
    }

    /* 11. 幅の計算ルールを統一し、枠内に収める */
    .genre-section,
    .genre-section *,
    .genre-top-area,
    .genre-controls,
    .form-select,
    .form-input {
        box-sizing: border-box !important;
        max-width: 100% !important;
    }
    .form-select {
        width: 100% !important;
    }

    /* 12. カードとカードの間の余白を詰める */
    .genre-movie-area {
        gap: 0px !important;
    }
    .movie-item {
        margin-bottom: 8px !important;
    }
    .movie-item:last-child {
        margin-bottom: 0 !important;
    }

    /* 13. 操作パネル（プルダウン・検索領域）の上部余白を詰める */
    .genre-controls {
        margin-top: 0 !important;
        padding-top: 0.5 !important;
    }

    /* 14. スマホ版ではセクション見出しの下線を非表示にする */
    .genre-section h2 {
        border-bottom: none !important;
    }

    /* 15. カード下部（点数ボタン・シェアボタン周辺）の上下余白を詰める */
    .rating-area,
    .share-btn,
    .tweet-btn,
    .twitter-share-button {
        margin-top: 0px !important;
        margin-bottom: 0px !important;
    }
    .movie-item {
        padding-bottom: 0px !important; 
    }

    /* 16. 【横スクロール用レイアウト】画像・タイトル・スコアを中央揃えにする */
    .movie-item {
        display: grid !important;
        width: 100% !important; /* ★ 116px固定をやめ、親のカード幅いっぱい（100%）に広げる */
        grid-template-columns: 1fr !important;
        grid-template-areas: 
            "cover"
            "title"
            "director"
            "score" !important;
        gap: 4px !important;
        align-items: start !important;
        justify-items: center !important;
        order: 1 !important; /* スマホでの順番（20番指定用） */
        margin-bottom: 6px !important;
    }

    .movie-info {
        display: contents !important;
    }

    .movie-cover {
        grid-area: cover !important;
        width: 100% !important; 
        height: auto !important;
        aspect-ratio: 100 / 140 !important;
        margin: 0 auto !important; /* ★追加：画像を中央に寄せる */
    }

    .movie-title {
        grid-area: title !important;
        width: 100% !important; /* ★追加：幅を最大に広げる */
        text-align: center !important; /* ★追加：文字を中央揃えに */
        white-space: normal !important;
        line-height: 1.3 !important;
        margin-top: 4px !important;
        font-size: 13px !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 3 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    .movie-director-text {
        grid-area: director !important;
        width: 100% !important; /* ★追加：幅を最大に広げる */
        text-align: center !important; /* ★追加：文字を中央揃えに */
        margin-top: 0 !important;
        margin-bottom: 2px !important;
        font-size: 11px !important;
        color: #666 !important;
    }

    .movie-score {
        grid-area: score !important;
        width: 100% !important; /* ★追加：幅を最大に広げる */
        text-align: center !important; /* ★追加：文字を中央揃えに */
        font-size: 16px !important; 
        margin: 0 !important;
    }
    /* 17. スマホ版では「投票済み (+〇点)」のテキストのみ非表示にする */
    .voted-container,
    .voted-text-mobile {
        display: none !important;
    }

    /* 18. 【修正】スマホ版ではタイトルの下の公開年（movie-author-text）を非表示にする */
    .movie-author-text {
        display: none !important;
    }

    /* 20. 【修正】スマホ版でカード内要素の順番を入れ替え、余白を最適化する */
    .movie-card {
        display: flex !important;
        flex-direction: column !important; 
        padding: 8px 8px 6px 8px !important; 
        
        /* ★ カード全体の方に幅と縮み防止を設定する */
        width: 136px !important; /* 長いボタンが綺麗に収まるように幅を少し最適化 */
        flex-shrink: 0 !important; 
    }

    /* ① 画像・タイトル・スコアのエリア（一番上） */
    .movie-item {
        order: 1 !important; /* 順番を1番目に指定 */
        margin-bottom: 6px !important;
    }

    /* ② 点数ボタン・投票済エリア（スコアのすぐ下へ移動） */
    .rating-area {
        order: 2 !important;
        margin-top: 0 !important;
        margin-bottom: 6px !important;
        padding-top: 0 !important;
        border: none !important; /* ★追加：上部の点線を非表示にする */
    }

    /* ③ 予告編・レビューボタン（点数ボタンの下へ移動） */
    .link-buttons-area {
        order: 3 !important; /* 順番を3番目に指定 */
        margin-top: 0 !important;
        margin-bottom: 6px !important;
    }

    /* ④ 配信サイトボタン（一番下へ移動） */
    .streaming-links {
        order: 4 !important; /* 順番を4番目に指定 */
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }

    /* 21. 【修正】スマホ版では点数ボタンを常時「検索ボタンと同じ色」にする */
    .btn-vote {
        background-color: #e65c00 !important; /* ★検索ボタンの背景色と同じ色 */
        color: #ffffff !important;            
        border: 1px solid #e65c00 !important; /* ★枠線も同じ色 */
    }

    /* ★タップした瞬間に少し濃い色にして「押した感」を出す */
    .btn-vote:active {
        background-color: #cc5200 !important; /* ★ベースより少し濃いオレンジ色に変更 */
        border-color: #cc5200 !important;
    }

    /* 22. ランキングに戻るカードの幅を狭くする */
    .back-to-ranking-card {
        width: 80px !important;      /* カードの幅を大幅にスリム化 */
        min-width: 80px !important;
        max-width: 80px !important;
        padding: 10px 4px !important; /* 内側の左右の余白を削る */
    }
}