.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Tab Navigation */
.tab-navigation {
    width: 70%;
    margin: 0 auto;
    display: flex;
    gap: 0;
    margin-bottom: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tab-button {
    flex: 1;
    padding: 8px 30px;
    background-color: #ffffff;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #BA312A;
    transition: all 0.3s ease;
    position: relative;
}

.tab-button:hover {
    background-color: #d5d5d5;
}

.tab-button.active {
    background-color: #BA312A;
    color: white;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -9px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 10px solid #BA312A;
}

/* Content Area */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Ranking Row - Contains cards and footer link */
.ranking-row {
    display: flex;
    align-items: center;
    column-gap: 20px;
    flex-direction: column;
}

/* Cards Container */
.cards-container {
    display: flex;
    gap: 20px;
    flex: 1;
}

/* Card Styling */
.card {
    flex: 1;
    width: 200px;
    background: white;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.card-image {
    position: relative;
    width: 100%;
    height: 120px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-image .no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
    color: #999;
    font-size: 14px;
    font-weight: 500;
}

.card-rank {
    position: absolute;
    top: 0px;
    left: 0px;
    background-color: #BA312A;
    color: white;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
}

.card-content {
    padding: 5px;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 7px;
    line-height: 1.5;
    min-height: 45px;
}

.card-title a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.card-title a:hover {
    color: #BA312A;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #999;
    margin-bottom: 8px;
}

.card-meta svg {
    width: 16px;
    height: 16px;
}

.card-author {
    font-size: 12px;
    color: #666;
    text-decoration: none;
}

.card-author a {
    font-size: 12px;
    color: #666;
    text-decoration: none;
}

.card-author a:hover {
    color: #BA312A;
}

/* No Data Message */
.no-ranking-data {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 15px;
}

/* Ranking Container */
.ranking-container {
    padding-bottom: 10px;
    padding-top: 25px;
    background-color: #F0F0F0;
}

/* Footer */
.footer-link {
    flex-shrink: 0;
    white-space: nowrap;
    width: 97%;
}

.footer-link a {
    color: #BA312A;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.footer-link a:hover {
    text-decoration: underline;
    color: #BA312A;
}

.footer-link a::after {
    margin-left: 8px;
    font-size: 18px;
}

/* Responsive */
@media (max-width: 1200px) {
    .ranking-row {
        flex-direction: column;
        align-items: stretch;
    }

    .container {
        max-width: 1200px;
    }

    .cards-container {
        flex-wrap: wrap;
    }

    .card {
        flex: 0 0 calc(50% - 10px);
    }

    .footer-link {
        text-align: right;
        margin-top: 20px;
    }
}

@media (max-width: 768px) {
    /* モバイル版ではランキングセクション全体を非表示 */
    .ranking-container {
        display: none;
    }
    
    .tab-button {
        padding: 15px 15px;
        font-size: 14px;
    }

    .card {
        flex: 0 0 100%;
    }
}
