/* Shop Page Styles */
.shop-page {
  min-height: calc(100vh - 70px);
  background: #0a0a0a;
}

.shop-header {
  background: #1a1a1a;
  padding: 2rem;
  border-bottom: 2px solid #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.shop-header h1 {
  color: #FFD700;
  font-size: 2rem;
}

.user-balance {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.balance-label {
  color: #888;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.balance-amount {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: bold;
  color: #FFD700;
}

.coin-icon {
  font-size: 1.2rem;
}

.shop-container {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
}

.shop-sidebar {
  width: 250px;
  background: #1a1a1a;
  padding: 2rem;
  border-right: 2px solid #333;
}

.shop-sidebar h2 {
  color: #FFD700;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.category-btn {
  background: #2a2a2a;
  border: 2px solid #333;
  color: #fff;
  padding: 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.category-btn:hover {
  border-color: #FFD700;
}

.category-btn.active {
  background: #FFD700;
  color: #000;
  border-color: #FFD700;
}

.filter-section {
  background: #2a2a2a;
  padding: 1rem;
  border-radius: 8px;
}

.filter-section h3 {
  color: #FFD700;
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.filter-section label {
  display: block;
  color: #fff;
  margin-bottom: 0.5rem;
  cursor: pointer;
}

.filter-section input[type="checkbox"] {
  margin-right: 0.5rem;
}

.shop-main {
  flex: 1;
  padding: 2rem;
}

.shop-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.search-input {
  flex: 1;
  padding: 0.75rem;
  background: #2a2a2a;
  border: 2px solid #333;
  border-radius: 8px;
  color: #fff;
  font-size: 1rem;
}

.search-input:focus {
  outline: none;
  border-color: #FFD700;
}

.sort-select {
  padding: 0.75rem;
  background: #2a2a2a;
  border: 2px solid #333;
  border-radius: 8px;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.item-card {
  background: #1a1a1a;
  border-radius: 12px;
  border: 2px solid #333;
  overflow: hidden;
  transition: all 0.3s;
  position: relative;
  cursor: pointer;
}

.item-card:hover {
  border-color: #FFD700;
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(255, 215, 0, 0.2);
}

.item-rarity {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 0.5rem;
  text-align: center;
  color: #fff;
  font-size: 0.75rem;
  font-weight: bold;
  letter-spacing: 1px;
}

.item-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: #FF1493;
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: bold;
  z-index: 10;
}

.item-preview {
  padding: 3rem 2rem 1rem;
  background: rgba(255, 215, 0, 0.05);
  display: flex;
  justify-content: center;
  align-items: center;
}

.item-icon {
  font-size: 4rem;
}

.item-info {
  padding: 1.5rem;
}

.item-name {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.item-description {
  color: #888;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  line-height: 1.4;
  min-height: 2.8em;
}

.item-stats {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.item-type,
.item-size {
  background: #2a2a2a;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  color: #aaa;
}

.item-price {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 1.3rem;
  font-weight: bold;
  color: #FFD700;
}

.item-card .btn {
  width: 100%;
  margin: 0;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: #1a1a1a;
  border: 3px solid #FFD700;
  border-radius: 16px;
  padding: 2rem;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  color: #888;
  cursor: pointer;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #FFD700;
}

.purchase-details {
  margin-top: 1rem;
}

.purchase-item {
  text-align: center;
  margin-bottom: 2rem;
}

.item-icon-large {
  font-size: 5rem;
  margin-bottom: 1rem;
}

.purchase-item h3 {
  color: #FFD700;
  margin-bottom: 0.5rem;
}

.purchase-item p {
  color: #aaa;
}

.purchase-cost {
  background: #2a2a2a;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.cost-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid #333;
  color: #fff;
}

.cost-row:last-child {
  border-bottom: none;
}

.cost-row.total {
  font-weight: bold;
  font-size: 1.1rem;
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 2px solid #FFD700;
}

.cost-amount {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #FFD700;
}

.purchase-actions {
  display: flex;
  gap: 1rem;
}

.purchase-actions .btn {
  flex: 1;
}

.error-message,
.no-items {
  text-align: center;
  padding: 3rem;
  color: #888;
}

.loader {
  text-align: center;
  padding: 3rem;
  color: #FFD700;
  font-size: 1.2rem;
}
