
        .video-card {
            text-decoration: none;
            color: inherit;
            border: none;
            background: none;
            padding: 0;
            width: 100%;
        }


        .video-card h5 {
            margin: 8px 0 4px;
            font-size: 1rem;
        }

        .video-card .stats {
            font-size: 0.9rem;
            color: #555;
        }

        @media (min-width: 768px) {
            .thumbnail-wrapper {
                max-height: 360px;
            }
        }

        /* ===== モーダル関連CSS ===== */

        .custom-modal-dialog {
            max-width: 320px;
            margin: 2rem auto;
            width: calc(100% - 2rem);
        }

        .modal-content {
            border-radius: 12px;
            overflow: hidden;
            max-height: 90vh;
        }

        .modal-video-wrapper {
            position: relative;
            width: 100%;
            padding-top: 177.78%;
            /* 9:16 */
            background: #000;
            overflow: hidden;
        }

        .modal-video-wrapper iframe {
            position: absolute;
            top: 0;
            left: -25%;
            width: 150%;
            height: 100%;
            border: none;
        }

        @media (min-width: 768px) {
        .custom-modal-dialog {
            max-width: 480px;
        }
        }

        .btn-close {
            z-index: 1056;
        }

        #backToTop {
            position: fixed;
            bottom: 30px;
            right: 20px;
            display: none;
            z-index: 1050;
            width: 48px;
            height: 48px;
            font-size: 24px;
            line-height: 1;
            padding: 0;
            text-align: center;
        }



.ranking-tabs {
  display: flex;
  flex-wrap: wrap; /* PCで折り返す */
  gap: 8px;
  padding-bottom: 8px;
}

/* スマホ画面ではスクロールに切り替え */
@media (max-width: 768px) {
  .ranking-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
  }

  .ranking-tabs::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
  }
}
.tab-btn {
    flex: 0 0 auto; /* 横スクロール対応 */
    white-space: nowrap;
    padding: 8px 14px;
    font-size: 0.9rem;
    color: #333;
    background-color: #f4f4f4;
    border: 1px solid #ccc;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.tab-btn:hover {
    background-color: #ddd;
}

.tab-btn.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}


.thumbnail-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    background: #ddd;
}

.thumbnail-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.thumbnail-wrapper:hover img {
    transform: scale(1.05);
}

@media (max-width: 576px) {
  .thumbnail-wrapper {
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
  }
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 0 8px rgba(0,0,0,0.6);
    z-index: 2; /* 追加 */
}

.card-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
    max-height: 2.4em; /* 2行分 */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-body .stats {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.3;
}

.card-body .stats.mb-1 {
    font-weight: 500;
    color: #333;
}


