
/* Shop Modal Styles */
.shop-panel {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  max-width: 900px;
  width: 95%;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  color: white;
}

.shop-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.shop-header h2 {
  margin: 0;
  font-size: 1.8rem;
}

.close-quiz {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-quiz:hover {
  background: rgba(255, 255, 255, 0.2);
}

.points-display {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: bold;
  font-size: 1.1rem;
}

.shop-content {
  height: calc(90vh - 200px);
  overflow-y: auto;
}

.shop-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.2);
  margin: 0;
}

.shop-tab {
  flex: 1;
  padding: 1rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  border-bottom: 3px solid transparent;
}

.shop-tab.active {
  color: white;
  background: rgba(255, 255, 255, 0.1);
  border-bottom-color: #FFD700;
}

.shop-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.shop-tab-content {
  display: none;
  padding: 2rem;
}

.shop-tab-content.active {
  display: block;
}

/* Shop Grid */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.shop-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 1.5rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.shop-item:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.shop-item.disabled {
  opacity: 0.6;
  transform: none;
}

.shop-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s;
}

.shop-item:hover::before {
  left: 100%;
}

.item-icon {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

.item-info h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.3rem;
  color: #FFD700;
}

.item-description {
  margin: 0 0 1rem 0;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.4;
}

.item-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.item-price {
  font-size: 1.2rem;
  font-weight: bold;
  color: #FFD700;
}

.item-stock {
  background: rgba(0, 0, 0, 0.3);
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.9rem;
}

.item-duration {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.3);
  padding: 0.3rem 0.8rem;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.buy-btn {
  width: 100%;
  padding: 0.8rem;
  background: linear-gradient(45deg, #28a745, #20c997);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.buy-btn:hover {
  background: linear-gradient(45deg, #218838, #1cc88a);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.buy-btn.disabled {
  background: #6c757d;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Inventory Styles */
.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.inventory-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.inventory-item .item-icon {
  font-size: 2rem;
  margin: 0;
}

.inventory-item .item-info {
  flex: 1;
}

.inventory-item h4 {
  margin: 0 0 0.5rem 0;
  color: #FFD700;
}

.item-quantity {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-weight: bold;
}

.use-btn {
  background: linear-gradient(45deg, #007bff, #0056b3);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s;
}

.use-btn:hover {
  background: linear-gradient(45deg, #0056b3, #004085);
  transform: translateY(-1px);
}

.empty-inventory, .no-effects {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
  padding: 2rem;
}

/* Active Effects */
.effects-list {
  display: grid;
  gap: 1rem;
}

.active-effect {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border-left: 4px solid #FFD700;
}

.active-effect .effect-icon {
  font-size: 2rem;
}

.active-effect h4 {
  margin: 0 0 0.5rem 0;
  color: #FFD700;
}

.time-left {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-weight: bold;
}

/* Shop Footer */
.shop-footer {
  padding: 1rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
  background: rgba(0, 0, 0, 0.2);
}

.shop-footer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
}

/* Confirmation Dialog */
.confirm-dialog {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1001;
}

.confirm-content {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  max-width: 400px;
  text-align: center;
  color: #333;
}

.confirm-content h3 {
  margin: 0 0 1rem 0;
  color: #333;
}

.confirm-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.confirm-buttons button {
  flex: 1;
  padding: 0.8rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s;
}

.confirm-buttons button:first-child {
  background: #6c757d;
  color: white;
}

.confirm-buttons button:last-child {
  background: #007bff;
  color: white;
}

/* Notifications */
.purchase-success, .mystery-reward, .shop-message {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transform: translateX(400px);
  transition: transform 0.3s;
  z-index: 1002;
  max-width: 300px;
}

.mystery-reward {
  background: linear-gradient(135deg, #6f42c1, #e83e8c);
}

.shop-message {
  background: linear-gradient(135deg, #dc3545, #fd7e14);
}

.purchase-success.show, .mystery-reward.show, .shop-message.show {
  transform: translateX(0);
}

.purchase-content, .mystery-content, .message-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.purchase-icon, .mystery-icon {
  font-size: 2rem;
}

.purchase-text h4, .mystery-text h4, .message-content h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
}

.purchase-text p, .mystery-text p, .message-content p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 768px) {
  .shop-panel {
    width: 95%;
    margin: 1rem;
  }

  .shop-grid {
    grid-template-columns: 1fr;
  }

  .inventory-grid {
    grid-template-columns: 1fr;
  }

  .shop-tabs {
    flex-direction: column;
  }

  .shop-tab {
    text-align: center;
  }

  .shop-header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .item-details {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
}

/* Animation Effects */
@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: 200px 0; }
}

.shop-item:hover {
  animation: shimmer 2s infinite;
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 200px 100%;
}
