/* GamesList2025 Plugin Styles */

#gameslist2025-container {
    max-width: 100%;
    margin: 20px 0;
    font-family: Arial, sans-serif;
}

/* Tab Navigation */
.gameslist-tabs {
    display: flex;
    flex-wrap: wrap;
    background-color: #f8f9fa;
    border-radius: 5px 5px 0 0;
}

.gameslist-tab {
    background-color: #000000;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    border-radius: 5px 5px 0 0;
    margin-right: 2px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gameslist-tab:hover {
    background-color: #b93434;
    color: #ffffff;
}

.gameslist-tab.active {
    background-color: #b93434;
    color: white;
    border-bottom: 2px solid #b93434;
}

/* Loading indicator */
.gameslist-loading {
    text-align: center;
    padding: 40px;
    font-size: 16px;
    color: #6c757d;
}

/* Mobile portrait mode message */
.gameslist-mobile-message {
    display: none;
    text-align: center;
    padding: 40px 20px;
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    color: #856404;
    font-size: 16px;
    font-weight: 600;
    margin: 20px 0;
}

.gameslist-mobile-message .icon {
    font-size: 24px;
    margin-bottom: 10px;
    display: block;
}

/* Table Styles */
.gameslist-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 5px;
    overflow: hidden;
}

.gameslist-table thead {
    background-color: #343a40;
    color: white;
}

.gameslist-table th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #495057;
}

.gameslist-table tbody tr {
    border-bottom: 1px solid #dee2e6;
    transition: background-color 0.2s ease;
}

.gameslist-table tbody tr:hover {
    background-color: #f8f9fa;
}

.gameslist-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.gameslist-table tbody tr:nth-child(even):hover {
    background-color: #e9ecef;
}

.gameslist-table td {
    padding: 12px;
    vertical-align: middle;
    font-size: 14px;
    color: #495057;
}

/* Game title column */
.game-title {
    font-weight: 600;
    min-width: 200px;
}

.game-title a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.game-title a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Year column */
.game-year {
    width: 80px;
    text-align: left;
    font-weight: 500;
}

/* Publisher column */
.game-publisher {
    min-width: 120px;
}

/* Playerbase column */
.game-playerbase {
    width: 100px;
    text-align: center;
    font-weight: 600;
    color: #6c757d;
}

/* Rating column */
.game-rating {
    width: 100px;
    text-align: center;
    font-weight: 600;
    color: #28a745;
}

/* No games message */
.no-games {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
}

/* Game count display */
.gameslist-count {
    text-align: center;
    padding: 15px;
    margin-top: 10px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gameslist-tabs {
        flex-direction: column;
    }
    
    .gameslist-tab {
        margin-right: 0;
        margin-bottom: 2px;
        border-radius: 5px;
    }
    
    .gameslist-table {
        font-size: 12px;
    }
    
    .gameslist-table th,
    .gameslist-table td {
        padding: 8px 6px;
    }
    
    .game-title {
        min-width: 120px;
    }
    
    .game-publisher {
        min-width: 80px;
    }
    
    .game-playerbase {
        min-width: 80px;
    }
    
    .gameslist-count {
        font-size: 12px;
        padding: 10px;
    }
}

/* Mobile Portrait Mode - Hide table and show message when width < 485px */
@media (max-width: 484px) {
    .gameslist-mobile-message {
        display: block;
    }
    
    .gameslist-table,
    .gameslist-count {
        display: none;
    }
    
    .gameslist-tabs {
        margin-bottom: 0;
    }
}

@media (max-width: 480px) and (min-width: 485px) {
    .gameslist-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .gameslist-table thead,
    .gameslist-table tbody,
    .gameslist-table th,
    .gameslist-table td,
    .gameslist-table tr {
        display: block;
    }
    
    .gameslist-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .gameslist-table tr {
        border: 1px solid #ccc;
        margin-bottom: 10px;
        padding: 10px;
        border-radius: 5px;
        background-color: white;
    }
    
    .gameslist-table td {
        border: none;
        position: relative;
        padding-left: 50%;
        white-space: normal;
    }
    
    .gameslist-table td:before {
        content: attr(data-label) ": ";
        position: absolute;
        left: 6px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: bold;
        color: #333;
    }
}

/* Animation for tab switching */
#gameslist-table-container {
    transition: opacity 0.3s ease;
}

.gameslist-loading-active #gameslist-table-container {
    opacity: 0.5;
}

/* Custom scrollbar for table */
.gameslist-table::-webkit-scrollbar {
    height: 8px;
}

.gameslist-table::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.gameslist-table::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.gameslist-table::-webkit-scrollbar-thumb:hover {
    background: #555;
}
