/* =================================================================
   DB POST ENHANCEMENTS CSS
   Styles for new features: Daily Performance, Vs Related, Same Day Battle, FAQ
   ================================================================= */

/* Daily Performance Cards */
.bo-daily-performance {
    margin: 30px 0;
}

.performance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.performance-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.performance-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.day-label {
    font-size: 12px;
    font-weight: 700;
    color: #667eea;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.net-value {
    font-size: 18px;
    font-weight: 800;
    color: #2d3436;
    margin: 10px 0;
}

.trend-indicator {
    font-size: 13px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 15px;
    display: inline-block;
    margin-top: 5px;
}

.trend-indicator.trend-up {
    background: #d4edda;
    color: #155724;
}

.trend-indicator.trend-down {
    background: #f8d7da;
    color: #721c24;
}

.trend-arrow {
    font-size: 16px;
    margin-right: 3px;
}

/* Vs Related Movies */
.bo-vs-related {
    margin: 30px 0;
}

.comparison-table-wrapper {
    overflow-x: auto;
    margin-top: 20px;
}

.bo-comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.bo-comparison-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.bo-comparison-table th {
    padding: 15px;
    text-align: left;
    font-weight: 700;
    font-size: 14px;
}

.bo-comparison-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #efefef;
}

.bo-comparison-table tr.current-movie {
    background: #f0f8ff;
    font-weight: 600;
}

.bo-comparison-table tr:hover {
    background: #f9f9f9;
}

.badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.badge.current {
    background: #667eea;
    color: #fff;
}

.badge.ahead {
    background: #d4edda;
    color: #155724;
}

.badge.behind {
    background: #f8d7da;
    color: #721c24;
}

/* Same Day Battle */
.bo-same-day-battle {
    margin: 30px 0;
}

.battle-subtitle {
    color: #aeaeae;
    font-style: italic;
    margin-bottom: 15px;
}

.battle-table-wrapper {
    overflow-x: auto;
    margin-top: 20px;
}

.bo-battle-table {
    width: 100%;
    border-collapse: collapse;
    background: #1a1c29;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    overflow: hidden;
    color: #e0e0e0;
}

.bo-battle-table thead {
    background: linear-gradient(135deg, #0F111A 0%, #1a1c29 100%);
    color: #FFD700;
    border-bottom: 2px solid #333;
}

.bo-battle-table th {
    padding: 15px;
    text-align: left;
    font-weight: 700;
    font-size: 14px;
}

.bo-battle-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #333;
}

.bo-battle-table tr.current-movie {
    background: rgba(255, 215, 0, 0.1);
    color: #fff;
    font-weight: bold;
}

.bo-battle-table tr:hover {
    background: rgba(255, 215, 0, 0.05);
}

.rank-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 700;
    background: #333;
    color: #fff;
}

.rank-badge.winner {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000;
    font-size: 16px;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.badge.winner {
    background: #FFD700;
    color: #000;
}

/* FAQ Section */
.bo-faq-section {
    margin: 30px 0;
}

.bo-faq {
    background: #1a1c29;
    border: 1px solid #333;
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.3s;
}

.bo-faq summary {
    padding: 15px 20px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    background: linear-gradient(to right, #1a1c29, #252839);
    color: #e0e0e0;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.bo-faq summary:hover {
    background: #252839;
    color: #FFD700;
}

.bo-faq[open] summary {
    background: #0F111A;
    color: #FFD700;
    border-left: 3px solid #FFD700;
    border-bottom: 1px solid #333;
}

.bo-faq p {
    padding: 15px 20px;
    margin: 0;
    line-height: 1.6;
    color: #ccc;
}

/* Related News Carousel */
.bo-related-news {
    margin: 40px 0;
}

.news-carousel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.news-carousel-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.news-carousel-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.card-thumbnail {
    position: relative;
    padding-top: 56.25%;
    /* 16:9 aspect ratio */
    overflow: hidden;
    background: #f0f0f0;
}

.card-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-content {
    padding: 15px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.day-badge {
    background: #667eea;
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.card-date {
    color: #999;
    font-size: 12px;
}

.card-title {
    margin: 0;
    font-size: 16px;
    line-height: 1.4;
}

.card-title a {
    color: #2d3436;
    text-decoration: none;
    transition: color 0.2s;
}

.card-title a:hover {
    color: #667eea;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .performance-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }

    .performance-card {
        padding: 15px 10px;
    }

    .net-value {
        font-size: 16px;
    }

    .news-carousel-grid {
        grid-template-columns: 1fr;
    }

    .bo-comparison-table,
    .bo-battle-table {
        font-size: 13px;
    }

    .bo-comparison-table th,
    .bo-comparison-table td,
    .bo-battle-table th,
    .bo-battle-table td {
        padding: 10px 8px;
    }

    /* FIX: Day column taking 50% space on mobile */
    .bo-comparison-table th:first-child,
    .bo-comparison-table td:first-child,
    .bo-battle-table th:first-child,
    .bo-battle-table td:first-child,
    .bo-chart-table th:first-child,
    .bo-chart-table td:first-child {
        width: auto !important;
        min-width: 60px;
        max-width: 80px;
        white-space: nowrap;
    }

    /* Allow other columns to scroll horizontally */
    .bo-table-scroll,
    .comparison-table-wrapper,
    .battle-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Comparison CTA Button */
.bo-cta-button {
    display: inline-block;
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff !important;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s;
    text-align: center;
}

.bo-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}