#delta-panel {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 260px;
    background: rgba(37,43,54,0.95);
    color: #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    font-family: 'Segoe UI', sans-serif;
    font-size: 14px;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

#delta-header {
    background: #1e242f;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: bold;
    color: #fff;
    border-bottom: 1px solid #2e3440;
}

#delta-header h4 {
    margin: 0;
    font-size: 15px;
    letter-spacing: 0.5px;
}

#delta-toggle {
    background: transparent;
    border: none;
    color: #aaa;
    font-size: 18px;
    cursor: pointer;
    transition: color 0.2s;
}
#delta-toggle:hover {
    color: #fff;
}

#delta-body {
    padding: 12px 16px;
    display: grid;
    grid-template-columns: 90px auto;
    row-gap: 8px;
    column-gap: 10px;
}

#delta-body strong {
    color: #8ab4f8;
    font-weight: 500;
}

#delta-open {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: #252B36;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
#delta-open:hover {
    background: #323844;
}

#shop-panel {
  display: none;
  position: absolute;
  top: 60px;
  right: 20px;
  width: 380px;
  max-width: calc(100vw - 40px);
  background: linear-gradient(180deg, rgba(18,20,25,0.72), rgba(18,20,25,0.9));
  color: #fff;
  font-family: 'Segoe UI', sans-serif;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
  padding: 10px;
  z-index: 3000;
  overflow: hidden;
}
/* show panel when .open is toggled */
#shop-panel.open {
  display: block;
  transform: translateY(0);
  animation: shopPop 0.18s ease-out;
}

@keyframes shopPop {
  from { transform: translateY(-6px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* animated subtle gradient background */
#shop-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255,90,145,0.08), rgba(0,170,255,0.08), rgba(90,255,160,0.08));
  background-size: 300% 300%;
  z-index: 0;
  pointer-events: none;
  animation: shopGradient 8s ease-in-out infinite;
  mix-blend-mode: screen;
  opacity: 1;
}

/* subtle animated stripe overlay for texture */
#shop-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* use a repeating tile and animate background-position for a seamless loop */
  background: repeating-linear-gradient(135deg, rgba(255,255,255,0.06) 0 2px, rgba(255,255,255,0.00) 2px 12px);
  background-size: 40px 40px; /* tile size that matches the stripe repeat */
  opacity: 0.06; /* subtle by default */
  will-change: background-position;
  animation: shopStripes 6s linear infinite;
}

#shop-panel .shop-shell { position: relative; z-index: 1; }

.shop-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
}
.shop-title { font-size:18px; font-weight:700; color:#f0f7ff; }
.shop-header #close-shop { margin:0; }

.shop-resources {
  margin: 0 12px 10px 12px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  text-align:center;
  color:#dfffe6;
  font-weight:700;
}

#resources {
  background: #1e242f;
  padding: 6px 10px;
  border-radius: 8px;
  text-align: center;
  font-weight: bold;
  margin-bottom: 12px;
}

.shop-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 6px 12px 14px 12px;
}

.shop-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.06));
  border-radius: 12px;
  box-shadow: 0 6px 14px rgba(4,10,18,0.45);
  border: 1px solid rgba(255,255,255,0.03);
}

.card-img { width:64px; height:64px; border-radius:10px; object-fit:cover; flex-shrink:0; }
.card-body { flex:1; min-width:0; }
.card-title { font-weight:700; color:#f7fbff; margin-bottom:4px; }
.card-desc { font-size:13px; color:#b7c7d6; margin-bottom:6px; }
.card-meta { font-weight:700; color:#ffd369; }
.card-actions { display:flex; align-items:center; gap:8px; }
.btn-buy { background: linear-gradient(90deg,#00bcd4,#0066ff); border:none; color:#fff; padding:8px 12px; border-radius:8px; cursor:pointer; font-weight:700; }
.btn-buy:hover { filter:brightness(1.06); transform:translateY(-2px); }

#close-shop {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ff5a5a 0%, #e53939 60%, #c40000 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(196,0,0,0.18);
  transition: transform .14s ease, box-shadow .14s ease, filter .14s ease;
  overflow: hidden;
  transform-origin: center center;
}

#close-shop::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.16) 50%, rgba(255,255,255,0) 100%);
  mix-blend-mode: overlay;
  pointer-events: none;
  transform: translateX(-140%);
  opacity: 0.9;
  animation: closeShimmer 2.2s linear infinite;
}

@keyframes closeShimmer {
  0% { transform: translateX(-140%); }
  100% { transform: translateX(140%); }
}

@keyframes shopGradient {
  0%{ background-position:0% 50%; }
  50%{ background-position:100% 50%; }
 100%{ background-position:0% 50%; }
}

@keyframes shopStripes {
  0% { background-position: 0 0; }
 100% { background-position: -40px 0; }
}

#close-shop:hover::before {
  opacity: 1;
  animation-duration: 0.9s; 
}

#close-shop:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 28px rgba(196,0,0,0.28);
}

#close-shop:active { transform: scale(0.98); }

#close-shop:focus { outline: 3px solid rgba(255,90,90,0.25); outline-offset: 2px; }

.shop-item button:hover {
  background: #265dbe;
}

/* --- фиксим смещение панели --- */
#delta-ui {
  left: 0%;
  transform: translateX(-0%);
  max-width: 100vw;
}

/* --- уведомления теперь ниже панели --- */
#notification-container {
  top: 90px !important; /* чуть ниже панели */
  z-index: 4500 !important; /* чтобы были над всем */
  left: 50% !important;
  transform: translateX(-50%) !important;
}

#mapid {
  position: absolute;
  top: 64px; /* чтобы не перекрывалась верхней панелью */
  height: calc(100% - 64px);
  width: 100%;
  z-index: 1;
}

/* ===== Нижний HUD DeltaDrone ===== */
#delta-hud {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(14, 18, 25, 0.88);
  border: 1px solid rgba(60, 70, 80, 0.4);
  border-radius: 12px;
  display: flex;
  gap: 36px;
  align-items: center;
  justify-content: center;
  padding: 10px 28px;
  color: #cfd6df;
  font-family: 'Roboto Mono', monospace;
  font-size: 14px;
  z-index: 3500;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  transition: all 0.2s ease;
}

#delta-hud .hud-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

#delta-hud span {
  color: #00ffa2;
  font-weight: 600;
}

/* Hover / изменение */
#delta-hud:hover {
  border-color: #00ffa2;
  color: #ffffff;
}

/* ===== Мобильная адаптация ===== */
@media (max-width: 768px) {
  #delta-hud {
    gap: 18px;
    padding: 8px 18px;
    font-size: 13px;
    bottom: 10px;
  }
}

/* ===== Кнопки меню ===== */
.menu-buttons {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 30px;
}

.menu-buttons button {
  background: #0f1724;
  border: 1px solid #00ffa2;
  color: #00ffa2;
  font-size: 16px;
  padding: 12px 36px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s ease, box-shadow 0.3s ease;
  box-shadow: 0 0 10px rgba(0, 255, 162, 0.1);
}

.menu-buttons button:hover {
  background: #00ffa2;
  color: #0f1724;
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(0, 255, 162, 0.4);
}

/* ===== Панель настроек ===== */
#settings-panel {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 12, 0.96);
  color: #cde7d6;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 1;
  transition: opacity 0.4s ease;
}

#settings-panel.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.settings-content {
  background: #0f1724;
  padding: 30px 40px;
  border-radius: 12px;
  border: 1px solid #00ffa2;
  text-align: center;
  box-shadow: 0 0 20px rgba(0, 255, 162, 0.3);
}

.settings-content h2 {
  margin-top: 0;
  margin-bottom: 20px;
  color: #00ffa2;
}

.settings-content label {
  display: block;
  margin: 10px 0;
  font-size: 15px;
}

#back-btn {
  margin-top: 20px;
  background: #00ffa2;
  color: #0f1724;
  border: none;
  padding: 8px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s;
}

#back-btn:hover {
  background: #11ffb8;
}



