body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: #0b0b0d;
    color: #fff;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #121216;
    padding: 15px 5%;
    border-bottom: 3px solid #ff4757;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #ff4757;
    text-shadow: 0 0 10px rgba(255, 71, 87, 0.5);
}

nav a {
    color: #a4a4b5;
    text-decoration: none;
    margin-left: 20px;
    font-weight: 600;
}

nav a:hover, nav a.active {
    color: #ff4757;
}

.hero-banner {
    text-align: center;
    background: linear-gradient(rgba(0,0,0,0.7), #0b0b0d), url('https://images.unsplash.com/photo-1538481199705-c710c4e965fc?q=80&w=1200') center/cover;
    padding: 40px 20px;
}

.hero-banner h2 {
    font-size: 32px;
    margin-bottom: 10px;
}

.game-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
    padding: 40px 5%;
    min-height: 300px;
}

.loading-text {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 18px;
    color: #ffa502;
    padding: 50px 0;
}

/* Game Card Style */
.game-card {
    background-color: #121216;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #1f1f26;
}

.game-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 71, 87, 0.4);
    border-color: #ff4757;
}

.game-card img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
}

.game-card h3 {
    font-size: 14px;
    margin: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 10px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    background-color: #ff4757;
}

/* Modal Popup Window */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
}

.modal-content {
    background-color: #121216;
    margin: 2% auto;
    width: 90%;
    max-width: 960px;
    height: 85vh;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 2px solid #ff4757;
}

.modal-header {
    background-color: #1f1f26;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-weight: bold;
    font-size: 16px;
    color: #2ed573;
}

.close-btn {
    cursor: pointer;
    background: #ff4757;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
}

#gameFrame {
    flex-grow: 1;
    width: 100%;
    height: 100%;
}

footer {
    text-align: center;
    padding: 20px;
    background-color: #121216;
    color: #666;
    font-size: 12px;
}