/* Trending Games Tables - Fix Layout to Match Design */

/* Container for both trending tables */
.ranking-tables-container,
.trending-games-section {
    display: flex;
    gap: 30px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Individual table wrapper */
.ranking-table-wrapper {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
}

/* Table title */
.ranking-table-wrapper h2,
.trending-games-section h2 {
    font-size: 24px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 20px;
    text-align: left;
}

/* Table styling */
.ranking-table.table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
    margin: 0;
}

/* Table header */
.ranking-table thead tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ranking-table thead th {
    padding: 12px 8px;
    text-align: left;
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
}

.ranking-table__name-column {
    text-align: left !important;
}

.ranking-table__hype-column {
    text-align: right !important;
}

/* Table rows */
.ranking-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s;
}

.ranking-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.ranking-table tbody tr:last-child {
    border-bottom: none;
}

/* Position column */
.ranking-table__position-column {
    width: 40px;
    padding: 12px 8px;
    text-align: center;
    color: #ffffff;
    font-weight: 600;
    font-size: 16px;
}

/* Arrow icon column */
.ranking-table tbody tr td:nth-child(2) {
    width: 24px;
    padding: 12px 4px;
    text-align: center;
    vertical-align: middle;
}

.ranking-position__reference-icon {
    width: 16px;
    height: 16px;
    display: inline-block;
}

.ranking-position__reference-icon.-increase path {
    fill: #4ade80; /* Green color for upward trend */
}

/* Game image column */
.ranking-table tbody tr td:nth-child(3) {
    width: 70px;
    padding: 8px 12px;
    text-align: left;
    vertical-align: middle;
}

.ranking-position__cover-image {
    width: 50px;
    height: 66px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    margin: 0;
    flex-shrink: 0;
}

/* Ensure images are visible */
.ranking-table img.ranking-position__cover-image,
.ranking-table td img {
    max-width: 50px;
    height: auto;
    min-height: 66px;
    object-fit: cover;
    display: inline-block;
    vertical-align: middle;
}

/* Game name column */
.ranking-table__game-name-column {
    padding: 12px 12px 12px 0;
    text-align: left;
    vertical-align: middle;
    min-width: 150px;
}

.ranking-table__game-name-column a {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.ranking-table__game-name-column a:hover {
    color: #7B8FF0;
}

/* Trend column */
.ranking-table__hype-column {
    padding: 12px 12px;
    text-align: right;
    vertical-align: middle;
    font-weight: 600;
    font-size: 14px;
}

.ranking-table__hype-column.-increase {
    color: #4ade80; /* Green for positive trend */
}

.ranking-table__hype-column.-decrease {
    color: #ef4444; /* Red for negative trend */
}

/* Ensure proper spacing between elements */
.ranking-position {
    display: table-row;
}

.ranking-position td {
    vertical-align: middle;
}

/* Responsive design */
@media (max-width: 768px) {
    .ranking-tables-container,
    .trending-games-section {
        flex-direction: column;
        gap: 30px;
    }
    
    .ranking-table-wrapper {
        max-width: 100%;
    }
    
    .ranking-table {
        font-size: 12px;
    }
    
    .ranking-position__cover-image {
        width: 40px;
        height: 40px;
    }
}

/* Fix any overlapping text with images */
.ranking-table tbody tr {
    position: relative;
}

.ranking-table tbody tr td {
    padding: 12px 8px;
}

/* Ensure images don't overlap with text */
.ranking-position__cover-image {
    margin-right: 12px;
    flex-shrink: 0;
    background-color: rgba(255, 255, 255, 0.05);
}

/* Fix image display issues */
.ranking-table td img {
    display: inline-block !important;
    vertical-align: middle;
    max-width: 50px;
    height: auto;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure all images in ranking table are visible */
.ranking-table .ranking-position__cover-image,
.ranking-table tbody tr td img {
    width: 50px !important;
    height: 66px !important;
    object-fit: cover !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background-color: rgba(255, 255, 255, 0.05);
    border: none;
}

/* Ensure proper spacing between image and name */
.ranking-table tbody tr td:nth-child(3) + td {
    padding-left: 12px;
}

/* Proper alignment for all columns */
.ranking-table tbody tr {
    display: table-row;
}

.ranking-table tbody tr td {
    display: table-cell;
    vertical-align: middle;
}

