@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;800&display=swap');

:root {
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --text: #f8fafc;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Poppins', sans-serif; }
body { background-color: var(--bg-dark); color: var(--text); }
a { text-decoration: none; color: inherit; }

/* Header & Nav */
header { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem 5%; background: rgba(15, 23, 42, 0.9); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 100; border-bottom: 1px solid #334155; }
.logo { font-size: 1.8rem; font-weight: 800; color: var(--primary); }
.search-bar { padding: 0.8rem 1.2rem; border-radius: 25px; border: none; outline: none; width: 300px; background: var(--bg-card); color: white; transition: 0.3s; }
.search-bar:focus { box-shadow: 0 0 0 2px var(--primary); }
.btn { background: var(--primary); padding: 0.6rem 1.2rem; border-radius: 8px; font-weight: 600; cursor: pointer; border: none; color: white; transition: 0.3s; }
.btn:hover { background: var(--primary-hover); }

/* Main Grid */
main { padding: 2rem 5%; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.game-card { background: var(--bg-card); border-radius: 12px; overflow: hidden; transition: transform 0.3s, box-shadow 0.3s; cursor: pointer; display: flex; flex-direction: column; }
.game-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.5); }
.game-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.game-card h3 { padding: 1rem; font-size: 1.1rem; text-align: center; }

/* Play Screen Layout */
.play-container { display: flex; gap: 2rem; padding: 2rem 5%; max-width: 1600px; margin: auto; }
.game-area { flex: 1; display: flex; flex-direction: column; gap: 1rem; }

/* Fixed Game Canvas container */
.canvas-wrapper { width: 100%; aspect-ratio: 16/9; background: #000; border-radius: 12px; overflow: hidden; position: relative; box-shadow: 0 10px 30px rgba(0,0,0,0.8); border: 2px solid var(--bg-card); }
iframe { width: 100%; height: 100%; border: none; }
.game-controls { display: flex; justify-content: space-between; align-items: center; background: var(--bg-card); padding: 1rem 1.5rem; border-radius: 12px; }

/* Sidebar */
.sidebar { width: 300px; display: flex; flex-direction: column; gap: 1rem; }
.sidebar h2 { font-size: 1.2rem; border-bottom: 2px solid var(--primary); padding-bottom: 0.5rem; margin-bottom: 1rem; }
.sidebar-card { display: flex; gap: 1rem; align-items: center; background: var(--bg-card); padding: 0.5rem; border-radius: 8px; transition: 0.2s; }
.sidebar-card:hover { background: var(--primary); }
.sidebar-card img { width: 60px; height: 60px; border-radius: 6px; object-fit: cover; }

/* Responsive */
@media (max-width: 900px) {
    .play-container { flex-direction: column; }
    .sidebar { width: 100%; }
    .header { flex-direction: column; gap: 1rem; }
}