/* Base */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow: auto;
}

/* ========== Fake content: exact SMUHSD Canvas / Google Sites Vision theme (from page source) ========== */
#fake-content.fake-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background: #f0f0f0;
  color: #212121;
  font-family: Bitter, Montserrat, Lato, Karla, Arial, sans-serif;
  z-index: 0;
}

/* Vision theme: header & bar (from source) */
#fake-content .wgxiMe,
#fake-content .JzO0Vc,
#fake-content .BbxBP.aCIEDd,
#fake-content .zDUgLc,
#fake-content header#atIdViewHeader .BbxBP {
  background-color: #203e65;
  color: #fff;
}

#fake-content .zDUgLc {
  background-color: #203e65;
  opacity: 1;
  height: 8px;
  min-height: 8px;
  display: block;
}

#fake-content .VLoccc {
  padding: 14px 24px;
}

#fake-content .GAuSPc {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#fake-content .GAuSPc:hover {
  color: #fff;
  opacity: 0.9;
}

#fake-content .lzy1Td {
  max-height: 40px;
  width: auto;
  vertical-align: middle;
}

#fake-content .QTKDff.p46B7e {
  color: #fff;
  font-family: Bitter, serif;
  font-size: 18px;
}

#fake-content .YSH9J { color: #fff; }

/* Main content wrapper - Vision layout */
#fake-content .QZ3zWd {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 5px;
}

#fake-content .fktJZd {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

#fake-content .M63kCb { background-color: #fff; }

#fake-content #atIdViewHeader {
  flex-shrink: 0;
}

#fake-content #atIdViewHeader .VLoccc {
  padding: 14px 20px;
}

/* qeLZfd = gray top section block */
#fake-content .yaqOZd.qeLZfd {
  background-color: #f0f0f0;
  padding: 56px 0;
}

#fake-content .yaqOZd.qeLZfd:before {
  background-color: #f0f0f0;
  display: block;
  content: '';
}

#fake-content .yaqOZd.qeLZfd .zfr3Q,
#fake-content .yaqOZd.qeLZfd .JYVBee,
#fake-content .yaqOZd.qeLZfd .C9DxTc {
  color: #212121;
}

#fake-content .yaqOZd.qeLZfd .XqQF9c,
#fake-content .yaqOZd.qeLZfd a {
  color: #0000ff;
}

#fake-content .yaqOZd:not(.qeLZfd) {
  background-color: #fff;
  padding: 1.5rem 0;
}

#fake-content .LS81yb {
  max-width: 752px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 5px;
}

#fake-content .LS81yb.VICjCf {
  display: block;
}

/* Three-column grid for Observer (EN / ES / ZH) */
#fake-content .observer-cols {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (max-width: 768px) {
  #fake-content .observer-cols {
    grid-template-columns: 1fr;
  }
}

/* Two-column layout: login details left, tech contacts right */
#fake-content .detail-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px;
  align-items: start;
}

@media (max-width: 768px) {
  #fake-content .detail-cols {
    grid-template-columns: 1fr;
  }
}

#fake-content .tyJCtd.mGzaTb {
  padding: 8px;
  word-wrap: break-word;
}

/* Typography - exact from source (Vision theme) */
#fake-content .zfr3Q {
  font-family: Bitter, serif;
  color: #212121;
  font-size: 11pt;
  line-height: 1.38;
  margin-top: 15px;
}

#fake-content .JYVBee {
  font-family: Bitter, serif;
  font-size: 21pt;
  line-height: 1.25;
  font-weight: 700;
  margin-top: 25px;
  color: #212121;
}

#fake-content .JYVBee .XqQF9c {
  color: #0000ff;
}

#fake-content .C9DxTc {
  font-family: Karla, Lato, Arial, sans-serif;
  font-size: 12pt;
  color: #2d3b45;
  line-height: 1.38;
}

#fake-content .XqQF9c,
#fake-content a.XqQF9c {
  color: #0000ff;
  text-decoration: underline;
  font-family: Lato, Karla, Arial, sans-serif;
}

#fake-content .XqQF9c:hover {
  opacity: 0.85;
}

#fake-content .n8H08c {
  list-style-type: square;
  margin-left: 15pt;
  padding-left: 0;
}

#fake-content .n8H08c ul {
  margin-left: 36pt;
  list-style-type: square;
}

#fake-content .n8H08c li {
  margin: 4px 0 0 0;
  line-height: 1.38;
}

#fake-content .n8H08c li .C9DxTc {
  color: #2d3b45;
}

#fake-content .CDt4Ke {
  margin: 0 0 8px;
  line-height: 1.38;
}

#fake-content .UtePc.RCETm.SwuGbc {
  flex: 1 0 auto;
}

/* ========== Game content: modern dark mode grid ========== */
#game-content {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: linear-gradient(145deg, #0d0d12 0%, #1a1a2e 50%, #16213e 100%);
  color: #e8e8e8;
  font-family: 'Segoe UI', system-ui, sans-serif;
  z-index: 10;
}

.game-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 32px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.game-header-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}

.app-categories {
  display: inline-flex;
  align-items: stretch;
  background: rgba(0,0,0,0.2);
  border-radius: 10px;
  padding: 4px;
  gap: 0;
  flex-shrink: 0;
}

.app-category-btn {
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
  outline: none;
}

.app-category-btn span {
  pointer-events: none;
}

.app-category-btn:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
}

.app-category-btn:focus-visible {
  outline: 2px solid rgba(100, 180, 255, 0.8);
  outline-offset: 2px;
}

.app-category-btn.active {
  color: #fff;
  background: rgba(100, 180, 255, 0.35);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.app-category-wip {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255, 180, 80, 0.5);
  color: #1a1a2e;
  border-radius: 4px;
  vertical-align: middle;
}

.game-header h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  flex-shrink: 0;
}

.game-search {
  max-width: 280px;
  width: 100%;
  padding: 10px 14px;
  font-size: 0.95rem;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  outline: none;
}

.game-search::placeholder {
  color: rgba(255,255,255,0.5);
}

.game-search:focus {
  border-color: rgba(100, 180, 255, 0.6);
  background: rgba(255,255,255,0.1);
}

.game-header-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
}

.game-stat {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.85);
}

.game-stat-sub {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  margin-top: 2px;
}

/* Game content body: grid left, chat right */
.game-content-body {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.game-grid-wrapper {
  flex: 1;
  overflow: auto;
  min-width: 0;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
  padding: 32px;
  max-width: 900px;
  margin: 0 auto;
}

/* Chat panel: right side, only in game-content */
.chat-panel {
  width: 320px;
  min-width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.25);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-panel-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

.chat-panel-status {
  font-size: 0.75rem;
  color: rgba(100, 220, 140, 0.95);
  font-weight: 500;
}

.chat-panel-status::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 6px;
  vertical-align: middle;
  animation: chat-pulse 1.5s ease-in-out infinite;
}

@keyframes chat-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 120px;
}

.chat-msg {
  font-size: 0.9rem;
  line-height: 1.4;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  word-break: break-word;
}

.chat-msg .chat-msg-author {
  font-weight: 600;
  color: rgba(100, 180, 255, 0.95);
  margin-bottom: 2px;
}

.chat-msg .chat-msg-time {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.45);
  margin-left: 6px;
}

.chat-input-wrap {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-input {
  flex: 1;
  padding: 10px 14px;
  font-size: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  outline: none;
}

.chat-input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.chat-input:focus {
  border-color: rgba(100, 180, 255, 0.6);
}

.chat-send {
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #1a1a2e;
  background: rgba(100, 180, 255, 0.9);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  outline: none;
}

.chat-send:hover {
  background: rgba(100, 180, 255, 1);
}

.chat-send:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .game-content-body {
    flex-direction: column;
  }

  .chat-panel {
    width: 100%;
    min-width: 0;
    max-height: 280px;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
}

.game-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.game-card:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.game-card:focus {
  outline: none;
  border-color: rgba(100, 180, 255, 0.6);
  box-shadow: 0 0 0 2px rgba(100, 180, 255, 0.3);
}

.game-card-icon {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 12px;
  margin-bottom: 12px;
  background: rgba(0,0,0,0.2);
}

.game-card-name {
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
  color: #e0e0e0;
}

@media (min-width: 600px) {
  .game-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}
