﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: Arial, sans-serif;
}

.layout {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 365px;
    background-color: #121212;
    color: #ecf0f1;
    flex-shrink: 0;
    transition: width 0.3s ease, padding 0.3s ease;
    overflow: hidden;
    overflow-y: auto;
    white-space: nowrap;
}

.sidebar.collapsed {
    width: 0;
}

.sidebar-title {
    padding: 20px;
    font-size: 2rem;
    font-weight: bold;
    color: #CCCCCC;
    cursor: default !important;
    text-align: center;
    width: 350px;
}

.sidebar-section-title {
    padding: 10px 20px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #CCCCCC;
    cursor: default !important;
}

.sidebar-separator {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.25);
    list-style: none;
}

.showcase {
    padding: 20px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.showcase.active {
    background-color: #252525;
}

.showcase-thumbnail {
    width: 310px;
    height: auto;
    border-radius: 10px;
    align-self: stretch;
    margin-bottom: 10px;
}

.showcase-title {
    font-size: 1rem;
    font-weight: bold;
    color: #ecf0f1;
    text-align: left;
    align-self: stretch;
    margin-bottom: 5px;
}

.showcase-date-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    align-self: stretch;
    margin-bottom: 5px;
}

.showcase-date {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

.showcase-countdown {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    white-space: nowrap;
}

.showcase-links {
    display: flex;
    gap: 0.5rem;
    align-self: stretch;
}

.showcase-link {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    text-decoration: none;
}

.showcase-link:hover {
    color: white;
}

.content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: 60px;
    background-color: #121212;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    flex-shrink: 0;
}

.topbar-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle-btn {
    background-color: #121212;
    border-style: solid;
    border-color: #121212;
    border-radius: 5px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 1.1rem;
    color: #CCCCCC;
}

.toggle-btn:hover {
    border-color: #333;
    background-color: #333;
}

.topbar-showcases-title {
    font-size: 1.1rem;
    color: #CCCCCC;
}

.player-section {
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.player-wrapper {
    width: 100%;
    max-width: calc((100vh - 60px - 40px) * (16 / 9));
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
}

.player-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.no-link {
    font-size: 2rem;
    color: #CCCCCC;
    text-align: center;
    margin-top: 20px;
    cursor: default !important;
    display: flex;
    margin-bottom: 20px;
}

.main {
    flex: 1;
    background-color: #121212;
    overflow-y: auto;
}

.main-content {
    max-width: 1500px;
    margin: 0 auto;
}

.games-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0 20px 20px;
}

.game-item {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 20px;
}

.game-thumbnail {
    grid-column: 1;
    grid-row: 1 / -1;
    width: 300px;
    height: auto;
    border-radius: 10px;
    flex-shrink: 0;
    object-fit: cover;
    align-self: start;
    margin-right: 5px;
}

.game-item > .game-embed-wrapper {
    margin-top: 20px;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
}

.game-embed-wrapper {
    width: 100%;
    max-width: 1500px;
    border-radius: 10px;
    flex-shrink: 0;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.game-embed {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.game-info {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto auto;
    gap: 8px;
    padding: 0;
    align-items: start;
    flex: 1;
    min-width: 0;
}

.game-info-left {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.game-platforms {
    grid-column: 3;
    grid-row: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.game-trailer-details {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
}

.game-trailer-details[open] {
    grid-column: 1 / -1;
    justify-self: stretch;
}

.game-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: #CCCCCC;
}

.game-release-date {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.game-platforms {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.game-platform {
    background-color: #333;
    color: rgba(255, 255, 255, 0.7);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
}

.game-platform:hover {
    color: white;
    background-color: #444;
}

.game-trailer-btn {
    grid-column: 3;
    grid-row: 3;
    justify-self: end;
    align-self: end;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    padding: 6px 12px;
    background-color: #1e1e1e;
    border: none;
    border-radius: 6px;
    user-select: none;
    transition: background-color 0.2s, color 0.2s;
}

.game-trailer-btn:hover {
    background-color: #333;
    color: #fff;
}

.game-info > .game-embed-wrapper {
    grid-column: 1 / -1;
    grid-row: 3;
    margin-top: 10px;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
}

.game-trailer-summary {
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    padding: 6px 12px;
    background-color: #1e1e1e;
    border-radius: 6px;
    display: inline-block;
    user-select: none;
    transition: background-color 0.2s, color 0.2s;
}

.game-trailer-summary:hover {
    background-color: #333;
    color: #fff;
}

.game-trailer-details[open] > .game-trailer-summary {
    margin-bottom: 10px;
}

.game-trailer-container {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.game-trailer-container.open {
    grid-column: 1 / -1;
    align-items: stretch;
}

.game-trailer-container.open .game-trailer-btn {
    align-self: flex-end;
}

.game-trailer-btn {
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    padding: 6px 12px;
    background-color: #1e1e1e;
    border: none;
    border-radius: 6px;
    display: inline-block;
    user-select: none;
    transition: background-color 0.2s, color 0.2s;
}

.game-trailer-btn:hover {
    background-color: #333;
    color: #fff;
}

.game-trailer-container .game-embed-wrapper {
    margin-top: 10px;
    width: 100%;
    aspect-ratio: 16 / 9;
    align-self: stretch;
}