@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;700;800&family=Nunito:wght@400;600;700&display=swap');

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

:root {
  --bg: #0f0f23;
  --surface: #1a1a35;
  --card: #22224a;
  --card-hover: #2e2e60;
  --accent1: #ff6b9d;
  --accent2: #c084fc;
  --accent3: #67e8f9;
  --accent4: #fbbf24;
  --text: #e8e8f0;
  --text-dim: #8888aa;
  --radius: 16px;
}

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Animated background */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 107, 157, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(192, 132, 252, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(103, 232, 249, 0.05) 0%, transparent 50%);
  z-index: -1;
  animation: bgPulse 8s ease-in-out infinite alternate;
}

@keyframes bgPulse {
  0% { opacity: 0.7; }
  100% { opacity: 1; }
}

/* Header */
.header {
  text-align: center;
  padding: 40px 20px 10px;
}

.logo {
  font-family: 'Baloo 2', cursive;
  font-size: 56px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent1), var(--accent2), var(--accent3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 2px;
  animation: logoFloat 3s ease-in-out infinite;
  text-shadow: none;
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.tagline {
  font-size: 16px;
  color: var(--text-dim);
  margin-top: 4px;
  font-weight: 600;
}

/* Tabs */
.tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 24px 20px 8px;
}

.tab {
  background: var(--surface);
  border: 2px solid transparent;
  color: var(--text-dim);
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 700;
  padding: 10px 28px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.25s;
}

.tab:hover {
  background: var(--card);
  color: var(--text);
}

.tab.active {
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 20px rgba(255, 107, 157, 0.25);
}

/* Content */
.content {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

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

/* Single game = full width */
.game-grid:has(.game-card:only-child) {
  grid-template-columns: 1fr;
  max-width: 480px;
  margin: 0 auto;
}

/* Game card */
.game-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
  display: block;
}

.game-card:hover {
  transform: translateY(-6px) scale(1.02);
  background: var(--card-hover);
  border-color: var(--accent2);
  box-shadow:
    0 12px 40px rgba(192, 132, 252, 0.15),
    0 4px 12px rgba(0, 0, 0, 0.3);
}

.game-card:active {
  transform: translateY(-2px) scale(0.98);
}

.game-thumb {
  height: 180px;
  background: linear-gradient(135deg, var(--bg1, #0e8aaa), var(--bg2, #0a3d6b));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.game-thumb::after {
  content: '▶';
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #fff;
  opacity: 0;
  transition: opacity 0.3s;
}

.game-card:hover .game-thumb::after {
  opacity: 1;
}

.mini-fish {
  image-rendering: auto;
}

.game-info {
  padding: 16px;
}

.game-title {
  font-family: 'Baloo 2', cursive;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.game-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.4;
  margin-bottom: 10px;
}

.game-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag {
  background: rgba(192, 132, 252, 0.15);
  color: var(--accent2);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.empty-state h2 {
  font-family: 'Baloo 2', cursive;
  font-size: 24px;
  color: var(--text);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 14px;
}

/* Footer */
.footer {
  text-align: center;
  padding: 30px 20px;
  color: var(--text-dim);
  font-size: 13px;
}

/* Mobile */
@media (max-width: 480px) {
  .logo { font-size: 42px; }
  .header { padding: 28px 16px 8px; }
  .game-grid { grid-template-columns: 1fr; }
  .tab { padding: 8px 20px; font-size: 14px; }
}
