/* =========================================
   STUDYHUP ONLINE — THEME 2 (Neon Glow)
   Compatible with generate_full_build.php
========================================= */

:root {
  --bg: #060a13;
  --card: #0e1624;
  --accent: #6a7bff;
  --accent2: #8f47ff;
  --text: #eaf3ff;
  --radius: 14px;
  --glow: 0 0 12px rgba(138,120,255,0.4);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  background: linear-gradient(160deg, var(--bg) 0%, #0a1120 100%);
  color: var(--text);
  line-height: 1.6;
}

header, footer {
  background: #0e1525;
  text-align: center;
  padding: 24px;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.05);
}

h1 {
  font-size: 26px;
  margin: 0;
  color: var(--accent2);
  text-shadow: 0 0 10px rgba(143,71,255,0.6);
}

/* ---- Home Grid ---- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 25px;
  padding: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.grid a {
  display: block;
  text-decoration: none;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--glow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.grid a:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 0 20px rgba(140,100,255,0.8);
}

.grid img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.grid h3 {
  margin: 10px 0;
  color: #fff;
  font-size: 17px;
  text-align: center;
}

/* ---- Game Page ---- */
.game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 40px auto;
  max-width: 960px;
  padding: 0 15px;
}

.back {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.back:hover { text-decoration: underline; }

.game-frame {
  position: relative;
  width: 100%;
  max-width: 900px;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 2px solid var(--accent2);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(138,120,255,0.3);
  margin: 30px auto;
}

.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 18px;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.25s ease;
  animation: pulseGlow 2s infinite;
}

.fullscreen-btn:hover {
  filter: brightness(1.2);
}

@keyframes pulseGlow {
  0%,100% { box-shadow: 0 0 12px rgba(138,120,255,0.5); }
  50% { box-shadow: 0 0 24px rgba(138,120,255,0.9); }
}

/* ---- Articles ---- */
.article {
  max-width: 820px;
  margin: 40px auto;
  line-height: 1.8;
  font-size: 16px;
  color: #e9f0ff;
  text-align: left;
  background: rgba(10,15,25,0.6);
  padding: 25px;
  border-radius: 12px;
  box-shadow: inset 0 0 20px rgba(140,100,255,0.15);
}

.article h2 {
  color: var(--accent2);
  font-size: 22px;
  text-shadow: 0 0 8px rgba(143,71,255,0.6);
}

/* ---- Ads ---- */
.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: 8px;
  font-size: 14px;
}
.footer-links a {
  color: #b1b9d0;
  text-decoration: none;
  margin: 0 6px;
}
.footer-links a:hover { color: var(--accent2); text-decoration: underline; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .game-frame { aspect-ratio: auto; height: 70vh; }
  .fullscreen-btn { bottom: 10px; right: 10px; font-size: 14px; }
  h1 { font-size: 22px; }
}
