body {
    padding: 40px;
    background: transparent;
    color: white;
    font-family: 'Inter', -apple-system, sans-serif;
}

.header-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

h1 {
    font-size: 2.5rem;
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.search-container {
    flex: 0 1 300px;
}

.search-container input {
    width: 100%;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-family: inherit;
    outline: none;
    transition: all 0.2s;
}

.search-container input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.05);
}

.loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 100px;
    opacity: 0.5;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
}

.game-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.game-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.game-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.game-info {
    padding: 15px;
    text-align: left;
}

.game-info h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-info .author {
    font-size: 0.75rem;
    opacity: 0.5;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px;
    opacity: 0.5;
    font-size: 1.1rem;
}

/* Game Viewer Styles */
#gameContainer {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.95);
    display: none;
    flex-direction: column;
    z-index: 999;
    backdrop-filter: blur(20px);
}

#gameHeader {
    height: 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    color: #fff;
}

#game-title {
    font-weight: 600;
    letter-spacing: -0.01em;
}

.back-btn, .viewer-action {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0.7;
    transition: all 0.2s;
}

.back-btn:hover, .viewer-action:hover {
    opacity: 1;
    transform: scale(1.1);
}

#gameContent {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

#gameContent iframe {
    width: 100%;
    height: 100%;
    border: none;
}
