/* Cards & panels */
.panel {
  background: var(--glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 15px;
  box-shadow: var(--shadow);
}
.panel.center { text-align: center; }

/* Buttons */
.btn {
  background: linear-gradient(135deg, var(--purple3), var(--purple));
  color: #fff; border: none; border-radius: 12px;
  padding: 12px 16px; font-size: 13px; font-weight: 600;
  cursor: pointer; box-shadow: 0 5px 18px rgba(168, 85, 247, 0.35);
  transition: transform 0.12s;
}
.btn:active { transform: scale(0.97); }
.btn.sm { padding: 9px 13px; font-size: 12px; }
.btn.ghost {
  background: transparent; border: 1px solid var(--line);
  color: var(--muted); box-shadow: none;
}
.btn.green {
  background: linear-gradient(135deg, #16a34a, var(--green));
  box-shadow: 0 5px 18px rgba(34, 197, 94, 0.35);
}
.btn.pink {
  background: linear-gradient(135deg, #db2777, var(--pink));
  box-shadow: 0 5px 18px rgba(236, 72, 153, 0.3);
  width: 100%; max-width: 280px;
}
.btn.purple {
  background: linear-gradient(135deg, #6d28d9, #8b5cf6);
  box-shadow: 0 5px 18px rgba(139, 92, 246, 0.3);
  width: 100%; max-width: 280px;
}
.btn.gold {
  background: linear-gradient(135deg, #d97706, var(--gold));
  box-shadow: 0 5px 18px rgba(245, 158, 11, 0.3);
  width: 100%; max-width: 260px;
}

/* Inputs */
.input {
  width: 100%; padding: 12px 13px; border-radius: 11px;
  border: 1px solid var(--line); background: rgba(0, 0, 0, 0.4);
  color: var(--text); font-size: 14px;
}
.input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.18);
}

/* Game list cards */
.game-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(155deg, rgba(48, 28, 90, 0.75), rgba(14, 10, 28, 0.92));
  border: 1px solid var(--line); box-shadow: var(--shadow);
  cursor: pointer; margin-bottom: 11px;
  transform-style: preserve-3d;
  transition: transform 0.2s, box-shadow 0.2s;
}
.game-card:active { transform: scale(0.985) rotateX(2deg); }
.game-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  font-size: 10px; font-weight: 700; padding: 2px 8px;
  border-radius: 20px; color: #fff;
}
.game-badge.hot { background: linear-gradient(90deg, var(--red), var(--orange)); }
.game-badge.new { background: linear-gradient(90deg, var(--purple3), var(--purple)); }
.game-preview {
  height: 112px; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.game-meta { padding: 11px 13px; border-top: 1px solid var(--line2); }
.game-meta h3 { font-size: 14px; margin-bottom: 2px; }
.game-meta p { font-size: 11px; color: var(--muted); line-height: 1.35; }

/* Profile */
.avatar {
  width: 54px; height: 54px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple3), #c026d3);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700;
  border: 2px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--glow-p);
}
.stat-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0;
}
.stat-item {
  background: rgba(0, 0, 0, 0.3); border-radius: 11px;
  padding: 10px 6px; text-align: center; border: 1px solid var(--line2);
}
.stat-item .ico { font-size: 18px; }
.stat-item b { display: block; font-size: 15px; margin: 2px 0; }
.stat-item small { font-size: 10px; color: var(--muted); }

/* Tags */
.tag {
  font-size: 10px; padding: 2px 8px; border-radius: 20px;
  background: rgba(239, 68, 68, 0.18); color: #f87171;
}
.tag.on { background: rgba(34, 197, 94, 0.18); color: #4ade80; }

/* Remain timer */
.remain-time {
  font-size: 26px; font-weight: 800; letter-spacing: 1px; margin: 4px 0;
  background: linear-gradient(90deg, var(--purple2), var(--neon));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* FAB */
.fab {
  position: fixed; bottom: calc(var(--nav-h) + 16px); left: 16px;
  width: 50px; height: 50px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple3), #c026d3);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; box-shadow: 0 6px 22px rgba(168, 85, 247, 0.5);
  z-index: 70; cursor: grab; touch-action: none;
  transition: transform 0.12s;
}
.fab:active { cursor: grabbing; transform: scale(1.08); }

/* Modal / Sheet */
.sheet-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6);
  z-index: 200; display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  width: 100%; max-width: 420px; max-height: 72vh;
  background: rgba(16, 12, 32, 0.96); backdrop-filter: blur(18px);
  border-radius: 18px 18px 0 0; border: 1px solid var(--line);
  display: flex; flex-direction: column;
}
.sheet-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
}
.sheet-head button {
  background: none; border: none; color: var(--text); font-size: 22px; cursor: pointer;
}
.chat-box {
  flex: 1; overflow-y: auto; padding: 12px;
  display: flex; flex-direction: column; gap: 8px; min-height: 140px;
}
.bubble {
  max-width: 78%; padding: 8px 12px; border-radius: 12px;
  font-size: 12px; line-height: 1.4;
}
.bubble.bot {
  background: rgba(168, 85, 247, 0.18); align-self: flex-start;
  border-bottom-right-radius: 3px;
}
.bubble.user {
  background: rgba(255, 255, 255, 0.1); align-self: flex-end;
  border-bottom-left-radius: 3px;
}
.sheet-input {
  display: flex; gap: 7px; padding: 10px 12px 14px;
}
.sheet-input input {
  flex: 1; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(0, 0, 0, 0.35);
  color: var(--text); font-size: 13px;
}
.sheet-input button {
  padding: 10px 14px; border-radius: 10px; border: none;
  background: var(--purple); color: #fff; font-weight: 600; cursor: pointer;
}

/* Toast */
.toast {
  position: fixed; top: 70px; left: 50%; transform: translateX(-50%);
  background: rgba(30, 20, 55, 0.95); border: 1px solid var(--line);
  color: var(--text); padding: 10px 18px; border-radius: 12px;
  font-size: 13px; z-index: 300; box-shadow: var(--shadow);
  animation: toast-in 0.3s ease;
}
