/* =========================================================
   Browse Page / Discovery Engine Styles
   ========================================================= */

/* --- Main Container --- */
.discovery-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    text-align: center;
}

/* --- Search Bar --- */
.search-bar-container {
    width: 100%;
    max-width: 600px;
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

.search-bar-container input {
    flex-grow: 1;
    padding: 12px 15px;
    background-color: var(--content-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1em;
}

/* --- Breadcrumb Navigation --- */
.breadcrumb-nav {
    margin-bottom: 40px;
    font-size: 1em;
    color: var(--text-secondary);
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.breadcrumb-item {
    cursor: pointer;
    transition: all 0.2s;
    background-color: var(--content-bg);
    border: 1px solid var(--border-color);
    padding: 5px 15px;
    border-radius: 20px; /* Pill shape */
    font-weight: 500;
}

.breadcrumb-item:hover {
    color: var(--accent-purple);
    border-color: var(--accent-purple);
    background-color: rgba(106, 57, 166, 0.1);
}

.breadcrumb-separator {
    color: var(--text-secondary);
    font-size: 0.8em;
}

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 700;
    background-color: var(--accent-purple);
    border: 1px solid var(--accent-purple);
    padding: 5px 15px;
    border-radius: 20px;
    cursor: default;
}

/* --- Discovery Bubble Container --- */
.discovery-bubbles {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    max-width: 1000px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.discovery-bubbles.fade-out {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}

/* --- The Bubble --- */
.bubble {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background-color: var(--content-bg);
    border: 2px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.bubble:hover {
    transform: scale(1.1);
    border-color: var(--accent-purple);
    box-shadow: 0 0 20px rgba(106, 57, 166, 0.4);
    background-color: #2a2a2a;
}

.bubble-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: var(--text-secondary);
    transition: color 0.3s;
}

.bubble:hover .bubble-icon {
    color: var(--accent-purple);
}

.bubble-label {
    font-family: var(--font-heading);
    font-size: 1.1em;
    font-weight: 700;
    color: var(--text-primary);
    padding: 0 10px;
    line-height: 1.2;
}

/* --- Results Section --- */
.results-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    width: 100%;
    display: none; /* Hidden initially */
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.results-header h2 {
    color: var(--tgm-green);
    margin: 0;
}

.view-toggle button {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}
.view-toggle button.active {
    background-color: var(--accent-purple);
    color: white;
    border-color: var(--accent-purple);
}
.view-toggle button:first-child { border-radius: 8px 0 0 8px; }
.view-toggle button:last-child { border-radius: 0 8px 8px 0; margin-left: -1px; }

.results-footer {
    text-align: center;
    margin-top: 30px;
}

/* --- NEW: List View Styles --- */
.game-list-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.game-list-header {
    display: grid;
    grid-template-columns: 60px 3fr 1fr 1fr 1fr 1fr; /* Rank, Game, TGM, GE, DD, Year */
    gap: 15px;
    padding: 10px 15px;
    background-color: var(--content-bg);
    border-bottom: 2px solid var(--border-color);
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.85em;
    align-items: center;
}

.game-list-row {
    display: grid;
    grid-template-columns: 60px 3fr 1fr 1fr 1fr 1fr;
    gap: 15px;
    padding: 15px;
    background-color: var(--content-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    align-items: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: transform 0.2s, border-color 0.2s;
}

.game-list-row:hover {
    transform: translateX(5px);
    border-color: var(--accent-purple);
}

.list-col-game {
    display: flex;
    align-items: center;
    gap: 15px;
}

.list-thumb {
    width: 40px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    background-color: #000;
}

.list-title {
    font-weight: 700;
    font-family: var(--font-heading);
    font-size: 1.1em;
}

.list-col-score {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2em;
}

.list-col-rank {
    color: var(--text-secondary);
    font-weight: 600;
}

/* Responsive List View */
@media (max-width: 768px) {
    .game-list-header {
        display: none; /* Hide header on mobile */
    }

    .game-list-row {
        grid-template-columns: 60px 1fr; /* Thumbnail + Info */
        grid-template-rows: auto auto;
        gap: 10px;
    }

    .list-col-rank, .list-col-year {
        display: none; /* Hide less critical info on mobile */
    }

    .list-col-game {
        grid-column: 2;
        grid-row: 1;
    }

    .list-thumb {
        grid-column: 1;
        grid-row: 1 / span 2;
        height: 80px;
        width: 55px;
    }

    /* Stack scores */
    .list-col-score {
        font-size: 0.9em;
    }
    .list-col-score::before {
        content: attr(data-label) ": ";
        color: var(--text-secondary);
        font-weight: 400;
        font-family: var(--font-body);
        font-size: 0.8em;
    }
}
