/* ============================
   GLOBAL PAGE STYLE
   ============================ */

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #0d1b2a;
  color: #e0e0e0;
}

/* ============================
   TOP SEARCH BAR (very top)
   ============================ */

.top-search-bar {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 20px;
  background: #1b263b;
  border-bottom: 3px solid #415a77;
}

.top-search-bar #search {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  display: block;
  padding: 14px;
  font-size: 18px;
  border-radius: 10px;
  border: 2px solid #415a77;
  background: #0d1b2a;
  color: #fff;
}

/* ============================
   BANNER (top)
   ============================ */

.banner {
  width: 100%;
  text-align: center;
  background: #0d1b2a;
  padding: 0;
  margin: 0;
}

.banner img {
  width: 100%;
  max-width: 1200px;
  height: 160px;
  object-fit: cover;
  object-position: center top;
  display: block;
  margin: 0 auto;
}

/* ============================
   LAYOUT WRAPPER
   ============================ */

.layout {
  display: flex;
  min-height: 100vh;
}

/* ============================
   SIDE MENU
   ============================ */

.side-menu {
  width: 240px;
  background: #1b263b;
  border-right: 3px solid #415a77;
  padding: 20px;
  overflow-y: auto;
}

.side-menu h3 {
  margin-top: 0;
  font-size: 22px;
  font-weight: 800;
  color: #e0e0e0;
  margin-bottom: 15px;
}

.side-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.side-menu li {
  padding: 10px 8px;
  margin-bottom: 6px;
  background: #415a77;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  color: #fff;
  transition: background 0.15s;
}

.side-menu li:hover {
  background: #778da9;
}

.side-menu a {
  text-decoration: none;
  color: #fff;
  font-weight: 600;
}

/* ============================
   MAIN CONTENT
   ============================ */

.container {
  flex: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

/* ============================
   TITLES
   ============================ */

h1 {
  text-align: center;
  font-size: 42px;
  font-weight: 900;
  margin: 0 0 5px;
  color: #e0e0e0;
}

h2 {
  text-align: center;
  font-size: 20px;
  margin-bottom: 30px;
  opacity: 0.8;
  color: #e0e0e0;
}

/* ============================
   SEARCH BAR
   ============================ */

#search {
  width: 100%;
  padding: 14px;
  font-size: 18px;
  border-radius: 10px;
  border: 2px solid #415a77;
  background: #1b263b;
  color: #fff;
  margin-bottom: 30px;
}

/* ============================
   RESOURCE GRID
   ============================ */

#res-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 25px;
}

/* ============================
   RESOURCE CARD (FIXED)
   ============================ */

.res-card {
  background: #1b263b;
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  border: 3px solid #415a77;
  color: #fff;
  transition: transform 0.15s, box-shadow 0.15s;
  position: relative;   /* FIX: ensures hover doesn't block clicks */
  z-index: 0;
}

.res-card:hover {
  transform: translateY(-5px);
  box-shadow: 0px 6px 15px rgba(0,0,0,0.4);
  z-index: 1;           /* FIX: keeps card clickable during hover */
}

.res-card a {
  display: flex;        /* FIX: entire card is clickable */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: #fff;
}

/* Logo shown at the top of a card */
.res-logo {
  width: 100%;
  height: 110px;
  object-fit: contain;
  border-radius: 8px;
  background: #0d1b2a;
  padding: 6px;
  box-sizing: border-box;
}

/* ============================
   FOOTER
   ============================ */

footer {
  text-align: center;
  margin-top: 40px;
  opacity: 0.7;
  font-size: 14px;
  color: #e0e0e0;
}

/* ============================
   PLAY PAGE
   ============================ */

.play-body {
  margin: 0;
  background: #0d1b2a;
  color: #fff;
}

.play-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: #1b263b;
  font-size: 18px;
  border-bottom: 3px solid #415a77;
}

.back-btn {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

.play-main {
  height: calc(100vh - 50px);
}

.play-frame-wrap {
  width: 100%;
  height: 100%;
}

#res-frame {
  width: 100%;
  height: 100%;
  border: none;
}

/* ============================
   FULLSCREEN BUTTON
   ============================ */

#fullscreen-btn {
  margin-left: auto;
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: #415a77;
  border: 2px solid #778da9;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

#fullscreen-btn:hover {
  background: #778da9;
}

/* Keep the game frame filling the screen in fullscreen mode */
#frame-wrap:fullscreen {
  width: 100vw;
  height: 100vh;
  background: #000;
}

#frame-wrap:fullscreen #res-frame {
  width: 100%;
  height: 100%;
}
/* ============================
   STICKY AD (INVISIBLE UNTIL LOADED)
   ============================ */

#sticky-ad {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: transparent; /* no black bar */
  padding: 0;
  text-align: center;
  z-index: 9999;
  height: 0;               /* invisible until ad loads */
  overflow: visible;       /* ad will still appear if Google serves one */
}

