/* -----------------------------
   Global Styles
----------------------------- */
:root {
  --bg: #0a0f16;
  --card: #121824;
  --accent: #2ea8ff;
  --text: #e7edf5;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

header, footer {
  text-align: center;
  background: var(--card);
  padding: 20px;
}

h1 {
  font-size: 24px;
  margin: 0;
  color: var(--accent);
}

/* -----------------------------
   Game Grid (Home Page)
----------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.grid a {
  display: block;
  background: var(--card);
  border-radius: var(--radius);
  text-decoration: none;
  padding: 14px;
  transition: all 0.15s ease;
}

.grid a:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 10px rgba(46, 168, 255, 0.3);
}

.grid img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
  background: #000;
}

.grid h3 {
  font-size: 16px;
  color: #fff;
  margin: 10px 0 0;
  text-align: center;
}

/* -----------------------------
   Game Page Layout
----------------------------- */
.game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  margin: 40px auto;
  padding: 0 15px;
  max-width: 1000px;
}

.back {
  color: var(--accent);
  text-decoration: none;
  display: inline-block;
  margin: 10px 0;
  font-size: 16px;
}
.back:hover {
  text-decoration: underline;
}

.game-frame {
  position: relative;
  width: 100%;
  max-width: 900px;
  aspect-ratio: 16 / 9; /* default horizontal */
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0,0,0,0.4);
  margin: 30px auto;
}

/* portrait override */
.game-frame.portrait {
  aspect-ratio: 9 / 16;
}

.game-frame iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.fullscreen-btn {
  position: absolute;
  bottom: 14px;
  right: 14px;
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  font-family: Inter, sans-serif;
  transition: background 0.2s ease;
}

.fullscreen-btn:hover {
  background: #1e8bd6;
}


.article {
  max-width: 800px;
  margin-top: 40px;
  line-height: 1.8;
  color: var(--text);
  font-size: 16px;
  padding: 0 10px;
}

.article h2 {
  color: var(--accent);
  font-size: 22px;
  margin-bottom: 10px;
}

/* -----------------------------
   Ad Blocks
----------------------------- */
.ad-top, .ad-bottom, .ad-article {
  text-align: center;
  margin: 25px 0;
}

/* -----------------------------
   Footer
----------------------------- */
footer p {
  color: #9aa4b5;
  font-size: 14px;
  margin: 0;
}

.footer-links {
  margin-top: 10px;
  font-size: 14px;
}

.footer-links a {
  color: #9aa4b5;
  text-decoration: none;
  margin: 0 6px;
}

.footer-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}


/* -----------------------------
   Responsive
----------------------------- */
@media (max-width: 900px) {
  .game-frame {
    height: 70vh;
  }
  .fullscreen-btn {
    bottom: 10px;
    right: 10px;
    font-size: 14px;
    padding: 8px 14px;
  }
  h1 {
    font-size: 20px;
  }
}
