/* ========================================
   SOFTWARE GAMES TABLE - COMPLETE REDESIGN
   Clean, Modern, Professional Design
   ======================================== */

:root {
    --navy-dark: #08022a;
    --primary-navy: #0b004b;
    --navy-medium: #1a0d5c;
    --accent-red: #da1f15;
    --accent-red-light: #ff4d43;
    --white: #ffffff;
    --light-white: #f0f0f0;
    --green-rtp: #4ade80;
    --gold-maxwin: #fbbf24;
}

/* ========================================
   TABLE CONTAINER
   ======================================== */

#gameNewSection {
    margin: 40px auto 60px;
    width: 100%;
    padding: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--navy-medium) 0%, var(--primary-navy) 100%);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    overflow-x: auto;
    overflow-y: visible;
    position: relative;
}

/* ========================================
   GAMES TABLE
   ======================================== */

.games-table {
    width: 100%;
    min-width: 1100px;
    border-collapse: collapse;
    margin: 0;
    background: transparent;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ========================================
   TABLE HEADER
   ======================================== */

.games-table thead {
    background: linear-gradient(135deg, var(--accent-red) 0%, var(--accent-red-light) 100%);
    position: sticky;
    top: 0;
    z-index: 10;
}

.games-table thead tr {
    border: none;
}

.games-table th {
    color: var(--white);
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 18px 12px;
    text-align: center;
    vertical-align: middle;
    border: none;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    white-space: normal;
    line-height: 1.4;
}

.games-table th.col-game {
    text-align: left;
    padding-left: 20px;
    min-width: 220px;
}

.games-table th.col-rtp {
    min-width: 100px;
}

.games-table th.col-layout {
    min-width: 80px;
}

.games-table th.col-paylines {
    min-width: 90px;
}

.games-table th.col-maxwin {
    min-width: 100px;
}

.games-table th.col-volatility {
    min-width: 110px;
}

.games-table th.col-minstake {
    min-width: 90px;
}

.games-table th.col-maxbet {
    min-width: 90px;
}

.games-table th.col-actions {
    min-width: 140px;
    padding-right: 20px;
}

.games-table th br {
    display: block;
    margin: 4px 0 0 0;
    line-height: 0;
}

.games-table th span {
    display: block;
    font-size: 10px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0.3px;
    margin-top: 4px;
    opacity: 0.95;
    line-height: 1.3;
}

/* ========================================
   TABLE BODY
   ======================================== */

.games-table tbody tr {
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(218, 31, 21, 0.1);
    transition: background 0.2s ease;
}

.games-table tbody tr:hover {
    background: rgba(218, 31, 21, 0.1);
}

.games-table tbody tr:last-child {
    border-bottom: none;
}

.games-table td {
    color: var(--light-white);
    font-size: 14px;
    padding: 16px 12px;
    text-align: center;
    vertical-align: middle;
    border: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.games-table td.col-game {
    text-align: left;
    padding-left: 20px;
}

/* ========================================
   GAME INFO (First Column)
   ======================================== */

.games-table .game-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.games-table .game-info img {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid rgba(218, 31, 21, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
}

.games-table tbody tr:hover .game-info img {
    border-color: var(--accent-red);
    box-shadow: 0 4px 16px rgba(218, 31, 21, 0.4);
    transform: scale(1.03);
}

.games-table .game-name-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    transition: all 0.2s ease;
}

.games-table .game-name-link:hover {
    transform: translateX(3px);
}

.games-table .game-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    cursor: pointer;
    transition: color 0.2s ease;
}

.games-table .game-name-link:hover .game-name {
    color: var(--accent-red-light);
    text-shadow: 0 2px 8px rgba(218, 31, 21, 0.5);
}

.games-table tbody tr:hover .game-name {
    color: var(--accent-red-light);
}

/* ========================================
   DATA COLUMNS
   ======================================== */

.games-table td.col-rtp {
    color: var(--green-rtp);
    font-weight: 600;
    font-size: 14px;
}

.games-table td.col-maxwin {
    color: var(--gold-maxwin);
    font-weight: 600;
    font-size: 14px;
}

.games-table td.col-layout,
.games-table td.col-paylines,
.games-table td.col-volatility,
.games-table td.col-minstake,
.games-table td.col-maxbet {
    color: var(--light-white);
    font-weight: 500;
}

/* ========================================
   ACTIONS COLUMN - BUTTON
   ======================================== */

.games-table td.col-actions {
    padding: 12px 20px;
    text-align: center;
}

/* CRITICAL: Button text must be visible - override ALL other styles */
.games-table .splbtns,
.games-table td.col-actions .splbtns,
.games-table td.col-actions a.splbtns,
#gameNewSection .splbtns,
#gameNewSection .games-table .splbtns,
.splbtns {
    display: inline-block !important;
    padding: 10px 22px !important;
    background: linear-gradient(135deg, var(--accent-red) 0%, var(--accent-red-light) 100%) !important;
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 3px 12px rgba(218, 31, 21, 0.4) !important;
    border: none !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    position: relative !important;
    z-index: 1000 !important;
    visibility: visible !important;
    opacity: 1 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    text-indent: 0 !important;
    font-family: inherit !important;
    line-height: 1.5 !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    clip: auto !important;
    clip-path: none !important;
}

/* Force text content to be visible */
.games-table .splbtns::before,
.games-table .splbtns::after {
    display: none !important;
    content: none !important;
}

.games-table .splbtns *,
.games-table td.col-actions .splbtns * {
    color: #ffffff !important;
    visibility: visible !important;
    opacity: 1 !important;
    display: inline !important;
    text-indent: 0 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
}

.games-table .splbtns:hover {
    background: linear-gradient(135deg, var(--accent-red-light) 0%, var(--accent-red) 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(218, 31, 21, 0.6);
}

.games-table .splbtns:active {
    transform: translateY(0);
}

/* ========================================
   SEARCH FILTER
   ======================================== */

.table-filter-container {
    margin: 30px 0 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    padding: 0 20px;
}

.game-search-input {
    flex: 1;
    min-width: 250px;
    padding: 12px 18px;
    background: rgba(11, 0, 75, 0.5);
    border: 2px solid rgba(218, 31, 21, 0.3);
    border-radius: 8px;
    color: var(--white);
    font-size: 14px;
    transition: all 0.3s ease;
}

.game-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.game-search-input:focus {
    outline: none;
    border-color: var(--accent-red);
    box-shadow: 0 0 0 3px rgba(218, 31, 21, 0.2);
    background: rgba(11, 0, 75, 0.7);
}

.game-count {
    color: var(--light-white);
    font-size: 14px;
    font-weight: 600;
}

#gameCount {
    color: var(--accent-red-light);
    font-weight: 700;
    font-size: 16px;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1200px) {
    .games-table {
        min-width: 1000px;
    }
    
    .games-table th,
    .games-table td {
        padding: 14px 10px;
        font-size: 13px;
    }
    
    .games-table .game-info img {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 768px) {
    #gameNewSection {
        border-radius: 12px;
        margin: 30px auto 40px;
    }
    
    .games-table {
        min-width: 900px;
    }
    
    .games-table th {
        padding: 12px 8px;
        font-size: 11px;
    }
    
    .games-table td {
        padding: 12px 8px;
        font-size: 12px;
    }
    
    .games-table .game-info {
        gap: 10px;
    }
    
    .games-table .game-info img {
        width: 50px;
        height: 50px;
    }
    
    .games-table .splbtns {
        padding: 8px 16px;
        font-size: 11px;
    }
    
    .table-filter-container {
        padding: 0 15px;
    }
}

/* ========================================
   OVERRIDE ANY CONFLICTING STYLES
   ======================================== */

#gameNewSection .games-table,
.games-table {
    border: none !important;
}

#gameNewSection .games-table th,
#gameNewSection .games-table td {
    border: none !important;
}

/* ========================================
   FINAL OVERRIDE - FORCE BUTTON TEXT VISIBLE
   ======================================== */

body #gameNewSection .games-table td.col-actions a.splbtns,
body .games-table td.col-actions a.splbtns,
body #gameNewSection a.splbtns,
html body .games-table .splbtns {
    color: #ffffff !important;
    font-size: 12px !important;
    text-indent: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    display: inline-block !important;
    text-transform: uppercase !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    padding: 10px 22px !important;
    background: linear-gradient(135deg, #da1f15 0%, #ff4d43 100%) !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    overflow: visible !important;
    clip: auto !important;
    position: relative !important;
    z-index: 9999 !important;
}

body #gameNewSection .games-table td.col-actions a.splbtns::before,
body .games-table td.col-actions a.splbtns::before {
    display: none !important;
    content: none !important;
}

body #gameNewSection .games-table td.col-actions a.splbtns::after {
    display: none !important;
    content: none !important;
}
