*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --sidebar-w: 270px;
  --c-sidebar: #1e1b4b;
  --c-hover:   #312e81;
  --c-active:  #3730a3;
  --c-accent:  #f59e0b;
  --c-bg:      #0f172a;
  --c-text:    #f1f5f9;
  --c-muted:   #94a3b8;
  --c-border:  rgba(255, 255, 255, 0.08);
  --radius:    10px;
}

html, body {
  height: 100%;
  font-family: system-ui, -apple-system, sans-serif;
  overflow: hidden;
}

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

/* ── SIDEBAR ── */

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--c-sidebar);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  border-right: 1px solid var(--c-border);
  color: var(--c-text);
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.4rem 1.2rem 1rem;
  border-bottom: 1px solid var(--c-border);
  flex-shrink: 0;
}

.logo {
  font-size: 2.4rem;
  line-height: 1;
  color: var(--c-accent);
  flex-shrink: 0;
}

.brand-title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-sub {
  font-size: 0.7rem;
  color: var(--c-muted);
  margin-top: 0.15rem;
}

#game-list {
  flex: 1;
  padding: 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.game-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: none;
  border-left: 3px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--c-text);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.game-btn:hover {
  background: var(--c-hover);
}

.game-btn.active {
  background: var(--c-active);
  border-left-color: var(--c-accent);
}

.game-icon {
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
}

.game-name {
  font-size: 0.875rem;
  font-weight: 600;
}

.game-desc {
  font-size: 0.73rem;
  color: var(--c-muted);
  margin-top: 0.2rem;
  line-height: 1.35;
}

.github-link {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.9rem 1.2rem;
  font-size: 0.78rem;
  color: var(--c-muted);
  text-decoration: none;
  border-top: 1px solid var(--c-border);
  flex-shrink: 0;
  transition: color 0.15s;
}

.github-link:hover {
  color: var(--c-text);
}

/* ── CONTENT ── */

.content {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.welcome {
  position: absolute;
  inset: 0;
  background: var(--c-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.welcome-clef {
  font-size: 18rem;
  line-height: 1;
  color: var(--c-accent);
  opacity: 0.07;
  user-select: none;
  pointer-events: none;
  position: absolute;
}

.welcome-hint {
  font-size: 1.05rem;
  color: var(--c-muted);
  position: relative;
}

.game-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: none;
}
