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

body {
    font-family: sans-serif;
    background-color: #1a1a1a;
    color: #ffffff;
    min-height: 100vh;
}

.main-header {
    background-color: #0f0f0f;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.main-header h1 {
    font-size: 1.8rem;
    margin: 0;
}

#game-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.category-title {
    grid-column: 1 / -1;
    font-size: 1.8rem;
    margin-top: 1rem;
    border-bottom: 2px solid #333;
    padding-bottom: 0.5rem;
    text-transform: capitalize;
}

.game-card {
    background: #2a2a2a;
    border-radius: 10px;
    padding: 8px;
    overflow: hidden;
    text-align: center;
    text-decoration: none;
    color: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.game-card img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    border-radius: 6px;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.5);
}

.game-card h3 {
    padding: 1rem;
    font-size: 1.1rem;
}

.game-view {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.game-main-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.iframe-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.8);
    padding: 2rem;
}

iframe {
    width: 100%;
    height: 100%;
    max-width: 1600px;
    border: 3px solid #444;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.7);
    background: #000;
}

.game-footer {
    background-color: #0f0f0f;
    padding: 0.8rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    box-shadow: 0 -4px 6px rgba(0,0,0,0.3);
}

.footer-titles {
    display: flex;
    align-items: baseline;
    gap: 1rem;
}

#game-title {
    font-size: 1.3rem;
}

#game-creator {
    font-size: 1rem;
    color: #aaaaaa;
    font-weight: normal;
}

.nav-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s, opacity 0.2s;
    text-decoration: none;
}

.nav-btn svg {
    width: 32px;
    height: 32px;
    fill: #ffffff;
}

.nav-btn:hover {
    transform: scale(1.1);
    opacity: 0.8;
    background: transparent;
}