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

/* ============================================================
   N TEST TREASURE HUNT - Paletă NIBIRU.net
   
   Culori:
   - Background:  #0a0a0a (negru pur)
   - Accent:      #e8175d (magenta/roz NIBIRU)
   - Accent light: #ff3a7d
   - Text primar: #ffffff
   - Text secundar: #8a8a9a
   - Panouri:     rgba(15, 15, 20, 0.9)
   - Border:      rgba(232, 23, 93, 0.2)
   
   Fonturi:
   - Titluri: 'Syne' (bold, geometric, similar cu NIBIRU)
   - Body: 'Space Grotesk' (clean, modern)
   ============================================================ */

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

body {
  overflow: hidden;
  background: #0a0a0a;
  font-family: 'Space Grotesk', sans-serif;
  cursor: crosshair;
  color: #ffffff;
}

/* ===================== LOADING ===================== */
#loading-screen {
  position: fixed; inset: 0; z-index: 1000;
  background: #0a0a0a;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  transition: opacity 0.8s ease;
}

#loading-screen.fade-out { opacity: 0; pointer-events: none; }

#loading-screen h1 {
  font-family: 'Syne', sans-serif;
  font-size: 4rem; font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  position: relative;
}

#loading-screen h1::after {
  content: '';
  position: absolute; bottom: -8px; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #e8175d, transparent);
}

#loading-screen p {
  color: #e8175d; font-size: 1rem; margin-top: 1.5rem;
  letter-spacing: 0.4em; text-transform: uppercase;
  font-weight: 600;
}

.loading-bar-wrap {
  width: 300px; height: 2px; background: #1a1a1a;
  border-radius: 2px; margin-top: 2.5rem; overflow: hidden;
}

.loading-bar {
  height: 100%; width: 0%; border-radius: 2px;
  background: linear-gradient(90deg, #e8175d, #ff3a7d);
  box-shadow: 0 0 20px rgba(232, 23, 93, 0.5);
  animation: load-fill 2s ease-out forwards;
}

@keyframes load-fill { to { width: 100%; } }

canvas { display: block; }

/* ===================== HUD ===================== */
#hud {
  position: fixed; top: 0; left: 0; right: 0;
  padding: 20px 30px; z-index: 10;
  display: flex; justify-content: space-between; align-items: flex-start;
  pointer-events: none;
}

.hud-panel {
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(232, 23, 93, 0.15);
  border-radius: 10px; padding: 14px 22px;
  pointer-events: auto;
}

.hud-left { display: flex; flex-direction: column; gap: 6px; }

.game-title {
  font-family: 'Syne', sans-serif;
  font-size: 0.75rem; font-weight: 700;
  color: #e8175d; letter-spacing: 0.25em;
  text-transform: uppercase;
}

.treasure-count {
  font-size: 1.6rem; font-weight: 700; color: #fff;
  display: flex; align-items: center; gap: 8px;
  font-family: 'Space Grotesk', sans-serif;
}

.treasure-count .icon { font-size: 1.4rem; }
.treasure-count .found { color: #e8175d; }
.treasure-count .total { color: #4a4a5a; font-size: 1rem; }

.hud-right { display: flex; gap: 12px; align-items: flex-start; }

.player-count {
  font-size: 0.9rem; color: #8a8a9a;
  display: flex; align-items: center; gap: 6px;
}

.player-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #e8175d;
  box-shadow: 0 0 8px rgba(232, 23, 93, 0.6);
  animation: dot-pulse 2s ease-in-out infinite;
}

@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 8px rgba(232, 23, 93, 0.6); }
  50% { box-shadow: 0 0 16px rgba(232, 23, 93, 0.9); }
}

/* ===================== COMPASS ===================== */
#compass {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  z-index: 10; font-family: 'Syne', sans-serif;
  font-size: 0.7rem; font-weight: 700; color: #4a4a5a;
  letter-spacing: 0.35em;
  pointer-events: none;
}

/* ===================== RADAR ===================== */
#radar {
  position: fixed; top: 90px; left: 30px; z-index: 10;
  pointer-events: none;
}

.radar-bar {
  width: 120px; height: 3px; background: #1a1a1a;
  border-radius: 3px; overflow: hidden; margin-top: 5px;
}

.radar-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, #3a3a4a, #e8175d, #ff3a7d);
  transition: width 0.3s;
  box-shadow: 0 0 8px rgba(232, 23, 93, 0.3);
}

.radar-label {
  font-size: 0.65rem; color: #4a4a5a; font-weight: 600;
  letter-spacing: 0.25em; text-transform: uppercase;
}

/* ===================== INTERACT PROMPT ===================== */
#interact-prompt {
  position: fixed; bottom: 50%; left: 50%; transform: translate(-50%, 50%);
  z-index: 10; opacity: 0; transition: opacity 0.3s;
  pointer-events: none;
}

#interact-prompt.visible { opacity: 1; }

#interact-prompt .prompt-box {
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(232, 23, 93, 0.5);
  border-radius: 10px; padding: 14px 28px;
  text-align: center;
}

#interact-prompt .key {
  font-family: 'Syne', sans-serif;
  font-size: 1.4rem; font-weight: 800; color: #e8175d;
  display: inline-block; padding: 2px 14px;
  border: 2px solid #e8175d; border-radius: 6px;
  margin-bottom: 4px;
  animation: key-bounce 1s ease-in-out infinite;
}

#interact-prompt .label {
  color: #c0c0c0; font-size: 0.85rem; font-weight: 500;
}

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

/* ===================== CHAT ===================== */
#chat-container {
  position: fixed; bottom: 20px; left: 20px; z-index: 10;
  width: 340px; pointer-events: auto;
}

#chat-messages {
  max-height: 180px; overflow-y: auto;
  padding: 12px; display: flex; flex-direction: column; gap: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(232, 23, 93, 0.2) transparent;
}

.chat-msg {
  font-size: 0.85rem; color: #b0b0b0;
  padding: 4px 0; line-height: 1.4;
  animation: msg-in 0.3s ease;
}

.chat-msg .name { font-weight: 700; }
.chat-msg.system { color: #e8175d; font-style: italic; font-size: 0.8rem; }

@keyframes msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

#chat-input-wrap {
  display: flex; gap: 0;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(232, 23, 93, 0.15);
  border-radius: 8px; overflow: hidden;
  margin-top: 6px;
}

#chat-input {
  flex: 1; padding: 10px 14px;
  background: transparent; border: none; outline: none;
  color: #e0e0e0; font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
}

#chat-input::placeholder { color: #3a3a4a; }

#chat-send {
  padding: 10px 16px;
  background: rgba(232, 23, 93, 0.15);
  border: none; color: #e8175d; cursor: pointer;
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: 0.8rem; letter-spacing: 0.1em;
  transition: background 0.2s;
}

#chat-send:hover { background: rgba(232, 23, 93, 0.3); }

/* ===================== MINIMAP ===================== */
#minimap-container {
  position: fixed; bottom: 20px; right: 20px; z-index: 10;
}

#minimap {
  width: 160px; height: 160px;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(232, 23, 93, 0.15);
  border-radius: 50%; overflow: hidden;
}

#minimap canvas {
  width: 100%; height: 100%; border-radius: 50%;
}

/* ===================== WIN SCREEN ===================== */
#win-screen {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(5, 5, 5, 0.97);
  backdrop-filter: blur(30px);
  display: none; align-items: center; justify-content: center;
  flex-direction: column;
}

#win-screen.show { display: flex; }

#win-screen h1 {
  font-family: 'Syne', sans-serif;
  font-size: 2.8rem; font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.1em;
}

#win-screen .prize {
  margin-top: 1.5rem; font-size: 1.2rem; color: #b0b0b0;
  text-align: center; line-height: 1.8;
}

#win-screen .prize strong {
  color: #e8175d; font-size: 1.5rem; font-weight: 700;
}

.claim-btn {
  margin-top: 2.5rem; padding: 16px 48px;
  background: #e8175d;
  border: none; border-radius: 50px; cursor: pointer;
  font-family: 'Syne', sans-serif;
  font-size: 0.9rem; font-weight: 700; color: #ffffff;
  letter-spacing: 0.15em; text-transform: uppercase;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 40px rgba(232, 23, 93, 0.3);
}

.claim-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 60px rgba(232, 23, 93, 0.5);
  background: #ff3a7d;
}

.win-particles {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
}

.particle {
  position: absolute; width: 8px; height: 8px;
  background: #e8175d; border-radius: 50%;
  animation: particle-fall linear infinite;
}

@keyframes particle-fall {
  0% { transform: translateY(-10vh) rotate(0deg); opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* ===================== MOBILE ===================== */
@media (max-width: 768px) {
  #chat-container { width: 260px; bottom: 120px; }
}
