/* --- FINAL MAIN PLUGIN STYLES (v4.0) --- */

/* 1. FORCE TITLE VISIBILITY - Overrides theme settings */
h1.sli-entry-title,
.sli-title-wrapper {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* 2. SINGLE PAGE LAYOUT */
.sli-single-page .site-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.sli-default-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.sli-provider-info {
    font-size: 1.1em;
    color: #888;
}

/* 3. FULLSCREEN BUTTON */
.sli-fullscreen-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #f0f0f1;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.sli-fullscreen-button:hover { background-color: #e0e0e1; }
.sli-fullscreen-button svg { width: 20px; height: 20px; fill: #555; }

/* 4. GRID LAYOUT (Desktop & Mobile) */
.sli-layout-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}
.sli-layout-left, .sli-layout-right {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* 5. GAME EMBED */
.game-container {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
}
.game-container iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

/* 6. DETAILS BOX */
.sli-details-box {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
}
.game-details-table { width: 100%; border-collapse: collapse; }
.game-details-table th, .game-details-table td { padding: 10px 0; border-bottom: 1px solid #eee; text-align: left; }
.game-details-table th { font-weight: 600; color: #555; padding-right: 15px; }

/* 7. FULLSCREEN ACTIVE MODE */
body.sli-fullscreen-active { overflow: hidden; }
.sli-fullscreen-active #sli-layout-container {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: #000;
    z-index: 999999;
    display: block;
    padding: 20px;
    overflow-y: auto;
}
.sli-fullscreen-active .game-container { height: 90%; padding-top: 0; }
.sli-fullscreen-active #sli-fullscreen-toggle {
    position: fixed; top: 20px; right: 20px; z-index: 1000000; background: rgba(255,255,255,0.9);
}
/* Hide everything else */
.sli-fullscreen-active .sli-layout-right,
.sli-fullscreen-active .play-for-real-section,
.sli-fullscreen-active .sli-details-box,
.sli-fullscreen-active header, 
.sli-fullscreen-active footer,
.sli-fullscreen-active .sli-default-header > div:first-child {
    display: none !important;
}

/* 8. ARCHIVE GRID (The Compact Look) */
.game-archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
}
.game-card {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    transition: transform 0.3s ease;
    text-decoration: none;
    color: inherit;
}
.game-card:hover { transform: translateY(-5px); }
.game-card-thumb { position: relative; }
.game-card-thumb img { width: 100%; height: auto; display: block; }
.game-card-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); display: flex; justify-content: center; align-items: center;
    opacity: 0; transition: opacity 0.3s;
}
.game-card:hover .game-card-overlay { opacity: 1; }
.game-card-button { background: #fff; padding: 8px 15px; border-radius: 5px; font-weight: bold; color: #333; }
.game-card-content { padding: 10px; text-align: center; border-top: 1px solid #eee; }
.game-card h3 { font-size: 15px; margin: 0 0 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-card .game-provider { font-size: 13px; color: #e91e63; }

/* Responsive */
@media (max-width: 900px) { .sli-layout-wrapper { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .game-archive-grid { grid-template-columns: 1fr; } }