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

:root {
  --primary: #fe2c55;
  --secondary: #25f4ee;
  --dark: #010101;
  --card-bg: #1a1a2e;
  --text: #ffffff;
  --muted: #888;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--dark);
  color: var(--text);
  min-height: 100vh;
}

/* NAV */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.nav-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.nav-logo span {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 32px;
}

nav ul a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

nav ul a:hover {
  color: var(--text);
}

/* HERO */
.hero {
  padding: 80px 40px 60px;
  text-align: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(254,44,85,0.15) 0%, transparent 70%);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(254,44,85,0.12);
  border: 1px solid rgba(254,44,85,0.3);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 40%, rgba(255,255,255,0.5));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 18px;
  color: rgba(255,255,255,0.6);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--primary), #c0213d);
  color: #fff;
  text-decoration: none;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 24px rgba(254,44,85,0.4);
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(254,44,85,0.5);
}

/* GAMES GRID */
.section {
  padding: 60px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.section-subtitle {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 36px;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.game-card {
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  display: block;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: rgba(254,44,85,0.4);
  box-shadow: 0 12px 40px rgba(254,44,85,0.15);
}

.game-thumb {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  position: relative;
  overflow: hidden;
}

.game-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.15;
}

.game-card:nth-child(1) .game-thumb { background: linear-gradient(135deg, #1a472a, #0d2b1a); }
.game-card:nth-child(1) .game-thumb::before { background: linear-gradient(135deg, #4caf50, #2e7d32); }
.game-card:nth-child(2) .game-thumb { background: linear-gradient(135deg, #0d1b4b, #1a1a6e); }
.game-card:nth-child(2) .game-thumb::before { background: linear-gradient(135deg, #2196f3, #3f51b5); }
.game-card:nth-child(3) .game-thumb { background: linear-gradient(135deg, #4a1942, #2d0b2a); }
.game-card:nth-child(3) .game-thumb::before { background: linear-gradient(135deg, #e91e63, #9c27b0); }
.game-card:nth-child(4) .game-thumb { background: linear-gradient(135deg, #4a2c0a, #2d1a06); }
.game-card:nth-child(4) .game-thumb::before { background: linear-gradient(135deg, #ff9800, #ff5722); }

.game-info {
  padding: 18px 20px 20px;
}

.game-info h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}

.game-info p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 14px;
}

.game-tag {
  display: inline-block;
  background: rgba(254,44,85,0.12);
  color: var(--primary);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* COMPANY INFO */
.company-section {
  background: rgba(255,255,255,0.02);
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.company-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 768px) {
  .company-grid { grid-template-columns: 1fr; }
}

.company-logo-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.company-logo-box .big-logo {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 800;
  color: white;
}

.company-logo-box h2 {
  font-size: 28px;
  font-weight: 800;
}

.company-logo-box p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.info-table {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.info-row {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
}

.info-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.info-content label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
  margin-bottom: 3px;
}

.info-content span {
  font-size: 14px;
  font-weight: 500;
}

/* FOOTER */
footer {
  padding: 32px 40px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

footer a {
  color: var(--primary);
  text-decoration: none;
}

/* GAME PAGE */
.game-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.game-header {
  padding: 20px 40px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.back-btn:hover { color: white; }

.game-header h2 {
  font-size: 20px;
  font-weight: 700;
}

.game-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 20px;
  gap: 20px;
}

.score-bar {
  display: flex;
  gap: 20px;
  align-items: center;
}

.score-box {
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 10px 24px;
  text-align: center;
  min-width: 90px;
}

.score-box label {
  display: block;
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 2px;
}

.score-box span {
  font-size: 22px;
  font-weight: 700;
}

canvas {
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  background: #0a0a0a;
  display: block;
}

.game-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  padding: 10px 24px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #c0213d);
  color: white;
  box-shadow: 0 4px 16px rgba(254,44,85,0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(254,44,85,0.4);
}

.btn-secondary {
  background: rgba(255,255,255,0.08);
  color: white;
  border: 1px solid rgba(255,255,255,0.12);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.12);
}

.game-tip {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

/* 2048 specific */
.board-2048 {
  background: #bbada0;
  border-radius: 8px;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: min(360px, 92vw);
  aspect-ratio: 1;
}

.tile {
  background: rgba(238,228,218,0.35);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(18px, 4vw, 28px);
  font-weight: 800;
  color: #776e65;
  transition: background 0.1s;
}

/* Memory specific */
.memory-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 400px;
  width: 92vw;
}

.mem-card {
  aspect-ratio: 1;
  perspective: 600px;
  cursor: pointer;
}

.mem-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.4s;
  border-radius: 10px;
}

.mem-card.flipped .mem-inner,
.mem-card.matched .mem-inner {
  transform: rotateY(180deg);
}

.mem-front, .mem-back {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(22px, 5vw, 32px);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.mem-front {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border: 2px solid rgba(255,255,255,0.1);
  font-size: 20px;
  color: rgba(255,255,255,0.2);
}

.mem-back {
  background: linear-gradient(135deg, #4a1942, #2d0b2a);
  border: 2px solid rgba(233,30,99,0.3);
  transform: rotateY(180deg);
}

.mem-card.matched .mem-back {
  background: linear-gradient(135deg, #1a472a, #0d2b1a);
  border-color: rgba(76,175,80,0.4);
}
