@tailwind base;
@tailwind components;
@tailwind utilities;

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
.glass {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.glass:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.fade-in {
  animation: fadeIn 0.6s ease forwards;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
.pulse-anim {
  animation: pulse 2s ease-in-out infinite;
}
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #667eea, #764ba2);
  border-radius: 4px;
}
.game-layout {
  position: fixed;
  inset: 0;
  display: flex;
  overflow: hidden;
  background: #000;
  z-index: 9999;
}
.sidebar {
  width: 220px;
  background: rgba(0, 0, 0, 0.95);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 100;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar-header {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.sidebar-header h1 {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}
.sidebar-header .badge {
  font-size: 8px;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(168, 85, 247, 0.15);
  color: #a78bfa;
  border: 1px solid rgba(168, 85, 247, 0.2);
  font-weight: 700;
}
.sidebar-search {
  padding: 6px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.sidebar-search input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11px;
  color: #d4d4d8;
  outline: none;
}
.sidebar-search input:focus {
  border-color: rgba(168, 85, 247, 0.3);
}
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}
.sidebar-nav::-webkit-scrollbar {
  width: 3px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
}
.nav-cat {
  padding: 6px 12px 2px;
  font-size: 9px;
  font-weight: 700;
  color: #52525b;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  margin: 0 6px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  color: #a1a1aa;
  cursor: pointer;
  transition: all 0.12s;
  text-decoration: none;
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}
.nav-item.active {
  background: rgba(0, 255, 0, 0.08);
  color: #00ff00;
}
.nav-item svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  opacity: 0.5;
}
.nav-item.active svg {
  opacity: 1;
}
.game-area {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #000;
}
.game-area canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}
.hamburger {
  display: none;
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #a1a1aa;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.hamburger:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
}
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay.open {
    display: block;
  }
  .hamburger {
    display: flex;
  }
}
.game-welcome {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 20px 24px;
  background: radial-gradient(
    ellipse at center,
    rgba(20, 20, 30, 1) 0%,
    #000 100%
  );
}
.gw-header {
  text-align: center;
  padding: 16px 0 20px;
}
.gw-header h1 {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
}
.gw-header p {
  font-size: 12px;
  color: #52525b;
  margin-top: 4px;
}
.gw-search {
  max-width: 360px;
  margin: 12px auto 0;
}
.gw-search input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 12px;
  color: #d4d4d8;
  outline: none;
}
.gw-search input:focus {
  border-color: rgba(168, 85, 247, 0.3);
}
.gw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  padding: 8px 0 24px;
}
.gw-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.12s;
  text-align: center;
}
.gw-card:hover {
  background: rgba(0, 255, 0, 0.04);
  border-color: rgba(0, 255, 0, 0.15);
  transform: translateY(-1px);
}
.gw-card .cat {
  font-size: 7px;
  color: #52525b;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 3px;
}
.gw-card .name {
  font-size: 11px;
  font-weight: 600;
  color: #d4d4d8;
}
.gw-card:hover .name {
  color: #fff;
}
.gw-card .icon {
  font-size: 20px;
  margin-bottom: 4px;
}
.hud {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  pointer-events: none;
}
.hud-score {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hud-score .lbl {
  font-size: 8px;
  color: #71717a;
  font-family: monospace;
  text-transform: uppercase;
}
.hud-score .val {
  font-size: 14px;
  font-weight: 700;
  color: #00ff00;
  font-family: monospace;
}
.hud-gameover {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 20;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(12px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 24px;
}
.hud-gameover h2 {
  font-size: 32px;
  font-weight: 800;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hud-gameover .fs {
  font-size: 16px;
  color: #d4d4d8;
  font-family: monospace;
}
.hud-gameover button {
  margin-top: 6px;
  padding: 8px 28px;
  background: rgba(0, 255, 0, 0.12);
  border: 1px solid rgba(0, 255, 0, 0.25);
  border-radius: 8px;
  color: #00ff00;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.hud-gameover button:hover {
  background: rgba(0, 255, 0, 0.2);
}
