/* Games v2 Specific Styles */

.games-v2-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Search Container */
.search-container {
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 15px 20px;
    border: 3px solid #ffe6f0;
    border-radius: 50px;
    font-size: 1em;
    background: white;
    color: #5a4a6a;
    box-shadow: 0 2px 10px rgba(255, 182, 193, 0.2);
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #ffb3d9;
    box-shadow: 0 4px 15px rgba(255, 182, 193, 0.3);
}

/* Controls Row */
.controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    background: linear-gradient(180deg, #fff9fc 0%, #ffe6f0 100%);
    padding: 15px 20px;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(255, 182, 193, 0.15);
}

/* View Toggle */
.view-toggle {
    display: flex;
    gap: 5px;
    background: white;
    padding: 5px;
    border-radius: 30px;
    box-shadow: 0 2px 8px rgba(255, 182, 193, 0.15);
}

.view-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    background: transparent;
    color: #8a7a9a;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.3s;
}

.view-btn:hover {
    background: #fff0f5;
    color: #ff87b2;
}

.view-btn.active {
    background: linear-gradient(135deg, #ffb3d9 0%, #ff9ecd 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 182, 193, 0.3);
}

.view-btn svg {
    width: 18px;
    height: 18px;
}

/* Sort Container */
.sort-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-container label {
    color: #5a4a6a;
    font-weight: 600;
    font-size: 0.9em;
}

.sort-select {
    padding: 8px 15px;
    border: 2px solid #ffe6f0;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #fff9fc 100%);
    color: #5a4a6a;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(255, 182, 193, 0.1);
}

.sort-select:hover {
    border-color: #ffb3d9;
    box-shadow: 0 2px 8px rgba(255, 182, 193, 0.2);
}

.sort-select:focus {
    outline: none;
    border-color: #ffb3d9;
    box-shadow: 0 2px 10px rgba(255, 182, 193, 0.3);
}

/* Filters Toggle Button */
.filters-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    color: #5a4a6a;
    border: 2px solid #ffe6f0;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.3s;
}

.filters-toggle-btn:hover {
    background: #fff0f5;
    border-color: #ffb3d9;
}

.filters-toggle-btn .chevron {
    transition: transform 0.3s;
}

.filters-toggle-btn.expanded .chevron {
    transform: rotate(180deg);
}

/* Filters Row */
.filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    background: linear-gradient(180deg, #fff9fc 0%, #ffe6f0 100%);
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(255, 182, 193, 0.15);
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out, padding 0.3s ease-in-out, opacity 0.3s ease-in-out;
    opacity: 1;
}

.filters-row.collapsed {
    max-height: 0;
    padding: 0 20px;
    opacity: 0;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 150px;
}

.filter-group label {
    color: #5a4a6a;
    font-weight: 600;
    font-size: 0.85em;
}

.filter-select {
    padding: 8px 12px;
    border: 2px solid #ffe6f0;
    border-radius: 15px;
    background: linear-gradient(180deg, #ffffff 0%, #fff9fc 100%);
    color: #5a4a6a;
    font-size: 0.85em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(255, 182, 193, 0.1);
}

.filter-select:hover {
    border-color: #ffb3d9;
    box-shadow: 0 2px 8px rgba(255, 182, 193, 0.2);
}

.filter-select:focus {
    outline: none;
    border-color: #ffb3d9;
    box-shadow: 0 2px 10px rgba(255, 182, 193, 0.3);
}

/* Checkbox Label */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding-top: 20px;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Results Info */
.results-info {
    color: #8a7a9a;
    font-size: 0.9em;
    padding: 10px 20px;
    background: linear-gradient(180deg, #fff9fc 0%, #ffe6f0 100%);
    border-radius: 15px;
    text-align: center;
}

/* Games Display */
.games-display {
    min-height: 400px;
}

/* Grid View */
.games-display.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

@media (max-width: 768px) {
    .games-display.grid-view {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .games-display.grid-view {
        gap: 10px;
    }
}

/* List View */
.games-display.list-view {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Game Card - Grid */
.game-card-v2 {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(255, 182, 193, 0.2);
    transition: all 0.3s;
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.game-card-v2:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255, 182, 193, 0.4);
}

.game-card-v2.has-cover {
    background-size: cover;
    background-position: center;
    min-height: 200px;
}

.game-card-v2.has-cover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 1;
}

.game-card-v2-content {
    padding: 20px;
    position: relative;
    z-index: 2;
}

.game-card-v2.has-cover .game-card-v2-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 200px;
}

.game-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 10px;
}

.game-card-title {
    font-size: 1.1em;
    font-weight: 600;
    color: #5a4a6a;
    margin: 0;
}

.game-card-v2.has-cover .game-card-title {
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.game-platform-badge {
    width: 32px;
    height: 32px;
    filter: drop-shadow(2px 2px 3px rgba(0, 0, 0, 0.15));
}

.game-card-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.game-status {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, #e8f4fd 0%, #d4e8fc 100%);
    color: #4a7ab3;
    border-radius: 15px;
    font-size: 0.75em;
    font-weight: 600;
    border: 1px solid #b3d4ff;
}

.game-card-v2.has-cover .game-status {
    background: rgba(255, 255, 255, 0.9);
}

.game-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.game-tag-v2 {
    padding: 3px 10px;
    background: linear-gradient(135deg, #fff0f5 0%, #ffe6f0 100%);
    color: #ff87b2;
    border-radius: 12px;
    font-size: 0.7em;
    font-weight: 500;
    border: 1px solid #ffe6f0;
}

.game-card-v2.has-cover .game-tag-v2 {
    background: rgba(255, 255, 255, 0.85);
}

.game-partner-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #ffd4e5 0%, #ffb3d9 100%);
    color: #d9006a;
    border-radius: 15px;
    font-size: 0.75em;
    font-weight: 600;
    margin-top: 5px;
}

/* Game Card - List View */
.list-view .game-card-v2 {
    display: flex;
    min-height: 100px;
}

.list-view .game-card-v2.has-cover {
    background-size: cover;
    background-position: center;
}

.list-view .game-card-v2-content {
    display: flex;
    width: 100%;
    gap: 20px;
}

.list-view .game-card-header {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.list-view .game-card-title {
    font-size: 1.2em;
}

.list-view .game-card-meta {
    flex-direction: row;
    flex-wrap: wrap;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #8a7a9a;
}

.no-results p {
    font-size: 1.2em;
    margin-bottom: 20px;
}

.clear-filters-btn {
    padding: 12px 30px;
    background: linear-gradient(135deg, #ffb3d9 0%, #ff9ecd 100%);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(255, 182, 193, 0.3);
}

.clear-filters-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 182, 193, 0.4);
}

/* Game Drawer */
.game-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    pointer-events: none;
}

.game-drawer.open {
    pointer-events: all;
}

.drawer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s;
}

.game-drawer.open .drawer-overlay {
    background: rgba(0, 0, 0, 0.5);
}

.drawer-content {
    position: absolute;
    right: -500px;
    top: 0;
    width: 100%;
    max-width: 500px;
    height: 100%;
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    transition: right 0.3s;
    overflow-y: auto;
}

.game-drawer.open .drawer-content {
    right: 0;
}

.drawer-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ffb3d9 0%, #ff9ecd 100%);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s;
}

.drawer-close:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(255, 182, 193, 0.4);
}

.drawer-body {
    padding: 30px;
}

.drawer-game-header {
    margin-bottom: 30px;
}

.drawer-game-cover {
    width: 100%;
    height: 250px;
    background-size: cover;
    background-position: center;
    border-radius: 15px;
    margin-bottom: 20px;
}

.drawer-game-title {
    font-size: 2em;
    color: #ff87b2;
    margin-bottom: 10px;
}

.drawer-game-platform {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #8a7a9a;
    font-size: 1em;
}

.drawer-game-platform img {
    width: 24px;
    height: 24px;
}

.drawer-section {
    margin-bottom: 25px;
}

.drawer-section h3 {
    color: #ff87b2;
    font-size: 1.2em;
    margin-bottom: 10px;
}

.drawer-section p,
.drawer-section ul {
    color: #5a4a6a;
    line-height: 1.6;
}

.drawer-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.drawer-tag {
    padding: 6px 14px;
    background: linear-gradient(135deg, #e8f4fd 0%, #d4e8fc 100%);
    color: #4a7ab3;
    border-radius: 15px;
    font-size: 0.9em;
    font-weight: 500;
    border: 1px solid #b3d4ff;
}

.drawer-stat {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #ffe6f0;
}

.drawer-stat:last-child {
    border-bottom: none;
}

.drawer-stat strong {
    color: #8a7a9a;
    font-weight: 600;
    margin-right: 8px;
}

.drawer-stat em {
    color: #5a4a6a;
    font-style: italic;
}

.drawer-stats-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.drawer-stat-label {
    color: #8a7a9a;
    font-weight: 600;
}

.drawer-stat-value {
    color: #5a4a6a;
}

.drawer-link {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #ffb3d9 0%, #ff9ecd 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(255, 182, 193, 0.3);
}

.drawer-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 182, 193, 0.4);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .controls-row {
        flex-direction: column;
        align-items: stretch;
    }

    .view-toggle,
    .sort-container {
        width: 100%;
        justify-content: center;
    }

    .filters-row {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

    /* Make list view more compact and horizontal on mobile */
    .list-view .game-card-v2 {
        padding: 12px;
        min-height: auto;
    }

    .list-view .game-card-v2-content {
        flex-direction: row;
        gap: 12px;
    }
    
    .list-view .game-card-header {
        flex: 1;
        min-width: 0; /* Allow text to wrap/truncate */
    }
    
    .list-view .game-card-title {
        font-size: 1em;
        line-height: 1.3;
    }
    
    .list-view .game-card-meta {
        flex-direction: column;
        gap: 4px;
        font-size: 0.75em;
    }
    
    .list-view .game-card-actions {
        display: none; /* Hide actions in mobile list view for compactness */
    }
    
    /* Grid view stays card-like on mobile but more compact */
    .grid-view .game-card-v2 {
        padding: 12px;
    }
    
    .grid-view .game-card-title {
        font-size: 0.95em;
    }
    
    .grid-view .game-card-meta {
        font-size: 0.75em;
    }

    .drawer-content {
        max-width: 100%;
    }

    .drawer-game-title {
        font-size: 1.5em;
    }
}

/* Extra small mobile devices - even more compact */
@media (max-width: 480px) {
    .games-v2-section {
        gap: 12px;
    }
    
    .search-input {
        padding: 10px 14px;
        font-size: 0.85em;
    }
    
    .controls-row {
        padding: 10px 12px;
        gap: 10px;
    }
    
    .view-btn {
        padding: 5px 10px;
        font-size: 0.8em;
    }
    
    .view-btn svg {
        width: 14px;
        height: 14px;
    }
    
    .sort-container label {
        font-size: 0.8em;
    }
    
    .sort-select,
    .filter-select {
        font-size: 0.8em;
        padding: 5px 10px;
    }
    
    .games-display.grid-view {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    /* Make grid cards very compact */
    .grid-view .game-card-v2 {
        padding: 8px;
    }
    
    .grid-view .game-card-title {
        font-size: 0.8em;
    }
    
    .grid-view .game-card-meta {
        font-size: 0.65em;
    }
    
    .grid-view .game-card-v2-content {
        padding: 8px;
    }
    
    /* Make list view more horizontal and compact */
    .list-view .game-card-v2 {
        padding: 8px;
    }
    
    .list-view .game-card-v2-content {
        gap: 6px;
    }
    
    .list-view .game-card-title {
        font-size: 0.85em;
    }
    
    .list-view .game-card-meta {
        font-size: 0.65em;
    }
}
