@import url('https://fonts.googleapis.com/css2?family=Tektur:wght@400..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Orbitron&display=swap');

/* CSS for the ship stats overlay */
 
.ship-stats-overlay {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 15px 25px; /* Increased padding */
  border-radius: 10px; /* Increased border radius */
  font-family: Arial, sans-serif;
  font-size: 16px; /* Increased font size */
  z-index: 1000;
}

/* CSS Definitions for Spacezone Dialog */
.spacezone-dialog-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, rgba(10,10,40,0.9), rgba(20,20,60,0.9));
  color: white;
  padding: 25px 30px;
  border-radius: 12px 8px 20px 8px;
  box-shadow: 0 0 16px rgba(31,38,135,0.8);
  xbackdrop-filter: blur(8px);
  -xwebkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  z-index: 1000;
  font-family: 'Tektur', sans-serif;
  font-size: 1.2em;
  max-height: calc(96vh - 60px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 255, 234, 0.5) rgba(255, 255, 255, 0.1);
}

.spacezone-dialog-container::-webkit-scrollbar {
    width: 8px;
}

.spacezone-dialog-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.spacezone-dialog-container::-webkit-scrollbar-thumb {
    background-color: rgba(0, 255, 234, 0.5);
    border-radius: 4px;
}

/* Additional existing styles */
.spacezone-dialog-container p {
  margin-bottom: 1em;
  line-height: 1.5;
  text-align: justify;
}

.spacezone-dialog-container button.spacezone-continue-button {
  margin: 25px auto 0 auto;
  padding: 12px 25px;
  font-size: 18px;
  cursor: pointer;
  background-color: rgba(0, 255, 234, 0.2);
  border: 2px solid #00FFEA;
  border-radius: 6px;
  color: #00FFEA;
  transition: background-color 0.3s, transform 0.2s;
  display: block;
}

.spacezone-dialog-container button.spacezone-continue-button:hover {
  background-color: rgba(0, 255, 234, 0.4);
  transform: scale(1.05);
}

.spacezone-dialog-container button.spacezone-continue-button:active {
  background-color: rgba(0, 255, 234, 0.6);
  transform: scale(0.95);
}

.spacezone-dialog-container h1,
.spacezone-dialog-container h2,
.spacezone-dialog-container h3,
.spacezone-dialog-container h4,
.spacezone-dialog-container h5,
.spacezone-dialog-container h6,
.spacezone-dialog-container button {
  font-family: 'Orbitron', sans-serif;
  margin-bottom: 0.5em;
  text-align: center;
}

.spacezone-dialog-container .intro-frame-1 {
  width: 100%;
  display: block;
  max-width: 50em;
  margin: 0 auto;
}
.spacezone-dialog-container .intro-frame-2 {
    float: right;
    shape-outside: polygon(50% 0, 100% 0, 100% 51%, 61% 51%);
    clip-path: polygon(50% 0, 100% 0, 100% 51%, 61% 51%);
}
.spacezone-dialog-container .intro-frame-3 {
    float: right;
    shape-outside: polygon(0 50%, 100% 50%, 100% 99%, 0 99%);
    clip-path: polygon(0 50%, 100% 50%, 100% 99%, 0 99%);
}
/* CSS for budget HTML element */

.spacezone-budget-credits {
    position: fixed;
    top: 10px;
    left: 10px;
    font-size: 20px;
    color: white;
    z-index: 1000;
}
.spacezone-budget-credits .budget_balance {
    transition: all 150ms linear;
}
.spacezone-budget-credits .budget_balance.budget_credit {
    color: lime;
    transform: scale(1.1);
}

.spacezone-budget-credits .budget_balance.budget_debit {
    color: red;
    transform: scale(1.1);
}
.spacezone-budget-credits .budget_item {
    transition: all 4500ms linear;
    opacity: 1;
}
.spacezone-budget-credits .budget_item.budget_item_removing {
    opacity: 0;
}
/* 
CSS for spacezone-store
*/

.spacezone-store {
  font-family: Arial, sans-serif;
  color: #ffffff;
  min-height: 40em;
}

.store-tabs {
  display: flex;
  margin-bottom: 10px;
}

.store-tab {
  padding: 10px 20px;
  cursor: pointer;
  background-color: #333;
  margin-right: 5px;
  border-radius: 4px 4px 0 0;
}

.store-tab.active {
  background-color: #555;
}

.store-content {
  background-color: #444;
  padding: 20px;
  border-radius: 0 4px 4px 4px;
}

.item-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.store-item {
  background-color: #555;
  padding: 10px;
  border-radius: 4px;
  cursor: pointer;
  width: 150px; /* Fixed width */
  box-sizing: border-box;
  aspect-ratio: 1 / 1;
  border: 1px solid #ccc;
  transition: box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}

.store-item:hover {
  box-shadow: 0 0 10px #00ffea;
}

.store-item.selected {
  border: 2px solid #00ff00;
}

.store-item.over-budget.selected {
  border: 2px solid red;
}

.store-item img {
  width: 128px;
  height: 128px;
  object-fit: cover;
  margin: 0; /* Remove default margin */
  padding: 0; /* Remove default padding */
}

.store-item-name {
  margin-top: 5px; /* Minimal space above the text */
  text-align: center;
  font-size: 14px;
}

/* Adjusted item-details to accommodate changes */
.item-details {
  margin-top: 20px;
  background-color: #333;
  padding: 15px;
  border-radius: 4px;
  min-height: 286px;
}

.item-details .details-item-image {
  width: 256px;
  height: 256px;
  float: right;
}

.buy-button {
  margin-top: 10px;
  padding: 10px 20px;
  background-color: #28a745;
  border: none;
  color: #ffffff;
  cursor: pointer;
  border-radius: 4px;
}

.buy-button:hover {
  background-color: #218838;
}
.store-item.over-budget {
  opacity: 0.5;
}

.buy-button.disabled {
  background-color: grey;
  cursor: not-allowed;
}
janus-controls-analog[axes="2,3"] {
  display: none;
}
/* Responsive CSS for mobile devices */
@media (max-width: 800px) {
  .spacezone-dialog-container {
    left: 2vw;
    right: 2vw;
    top: 2vw;
    transform: none;
    border-radius: 0;
    height: 96vh;
    overflow-y: auto;
    padding: 20px;
    max-height: calc(96vh - 40px);
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 255, 234, 0.5) rgba(255, 255, 255, 0.1);
  }

  .spacezone-dialog-container::-webkit-scrollbar {
      width: 6px;
  }

  .spacezone-dialog-container::-webkit-scrollbar-track {
      background: rgba(255, 255, 255, 0.1);
  }

  .spacezone-dialog-container::-webkit-scrollbar-thumb {
      background-color: rgba(0, 255, 234, 0.5);
      border-radius: 3px;
  }

  .spacezone-store {
    max-width: 100%;
    overflow-x: hidden;
  }
}