:root {
  --bg: #0b0f1a;
  --panel: #12182b;
  --card: #161d35;
  --border: #222b4a;
  --text: #e6e9f2;
  --muted: #9aa3c7;
  --accent: #4f7cff;
}

* {
  box-sizing: border-box;
  font-family: Inter, system-ui, sans-serif;
}

body {
  margin: 0;
  background: radial-gradient(circle at top, #111736, #070b14);
  color: var(--text);
}

.container {
  max-width: 1400px;
  margin: auto;
}

.header {
  padding: 40px 24px 24px;
  text-align: center;
}

.header h1 {
  font-size: 2.5rem;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.header p {
  color: var(--muted);
  margin-bottom: 20px;
}

/* ───── Game Grid ───── */

#gameGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
  padding: 40px 24px;
}

.gameCard {
  background: linear-gradient(180deg, var(--card), #0f1530);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gameCard:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
}

.gameCard h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 500;
}

/* ───────── macOS Window ───────── */

.window {
  position: absolute;
  width: 900px;
  height: 560px;
  background: #0d1224;
  border-radius: 14px;
  box-shadow: 0 40px 90px rgba(0,0,0,0.7);
  overflow: hidden;
  border: 1px solid #1f2645;
  transition: box-shadow 0.2s ease, opacity 0.2s ease;
}

.window.inactive {
  opacity: 0.88;
}

.windowHeader {
  height: 36px;
  background: linear-gradient(180deg, #1a2142, #121735);
  display: flex;
  align-items: center;
  padding: 0 12px;
  cursor: default;
  user-select: none;
}

/* ───────── macOS Controls ───────── */

.windowControls {
  display: flex;
  gap: 8px;
}

.windowControls span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;

  /* macOS behavior */
  cursor: default;
  transition:
    filter 0.15s ease,
    transform 0.08s ease;
}

/* Correct macOS colors */
.red    { background: #ff5f57; }
.yellow { background: #febc2e; }
.green  { background: #28c840; }

/* Hover = subtle glow (NOT pointer cursor) */
.windowControls span:hover {
  filter: brightness(1.18);
}

/* Press = tiny shrink */
.windowControls span:active {
  transform: scale(0.92);
}

/* Iframe */
.window iframe {
  width: 100%;
  height: calc(100% - 36px);
  border: none;
  background: black;
}

/* ───────── Resize Handles (macOS style) ───────── */

.window {
  min-width: 480px;
  min-height: 300px;
}

/* Edge handles */
.resize-handle {
  position: absolute;
  background: transparent;
  z-index: 10;
}

/* Sides */
.resize-e {
  top: 6px;
  right: -4px;
  width: 8px;
  height: calc(100% - 12px);
  cursor: ew-resize;
}

.resize-w {
  top: 6px;
  left: -4px;
  width: 8px;
  height: calc(100% - 12px);
  cursor: ew-resize;
}

.resize-s {
  bottom: -4px;
  left: 6px;
  height: 8px;
  width: calc(100% - 12px);
  cursor: ns-resize;
}

.resize-n {
  top: -4px;
  left: 6px;
  height: 8px;
  width: calc(100% - 12px);
  cursor: ns-resize;
}

/* Corners */
.resize-se {
  right: -4px;
  bottom: -4px;
  width: 12px;
  height: 12px;
  cursor: nwse-resize;
}

.resize-sw {
  left: -4px;
  bottom: -4px;
  width: 12px;
  height: 12px;
  cursor: nesw-resize;
}

.resize-ne {
  right: -4px;
  top: -4px;
  width: 12px;
  height: 12px;
  cursor: nesw-resize;
}

.resize-nw {
  left: -4px;
  top: -4px;
  width: 12px;
  height: 12px;
  cursor: nwse-resize;
}

/* Tabs Navigation */
.nav-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.tab-btn {
    background: #1e1e1e;
    border: 1px solid #333;
    padding: 8px 20px;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: #2e2e2e;
    transform: scale(1.05);
}

.tab-btn.active {
    background: #3a3a3a;
    border-bottom: 2px solid #00aaff;
}

/* Tabs Content */
.tab-content {
    display: none;
    padding: 15px;
}

.tab-content.active {
    display: block;
}

/* Browser iframe styling */
#browserFrame {
    width: 100%;
    height: 80vh;
    border: 1px solid #333;
    border-radius: 10px;
}
