/* Cosmetics Shop Styles */

.cosmetics-shop {
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Shop Header */
.shop-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  color: white;
}

.shop-title-section h1 {
  margin: 0;
  font-size: 2rem;
}

.shop-title-section p {
  margin: 5px 0 0 0;
  opacity: 0.9;
}

.shop-stats {
  display: flex;
  gap: 20px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.1);
  padding: 12px 20px;
  border-radius: 8px;
}

.stat-icon {
  font-size: 1.5rem;
}

.stat-value {
  font-size: 1.2rem;
  font-weight: bold;
}

.stat-label {
  font-size: 0.85rem;
  opacity: 0.8;
}

/* Shop Tabs */
.shop-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
}

.shop-tab {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  color: #666;
  transition: all 0.3s ease;
}

.shop-tab:hover {
  color: #667eea;
  background: rgba(102, 126, 234, 0.05);
}

.shop-tab.active {
  color: #667eea;
  border-bottom-color: #667eea;
  background: rgba(102, 126, 234, 0.1);
}

/* Shop Content */
.shop-content {
  min-height: 600px;
}

.shop-tab-content {
  display: none;
}

.shop-tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Filters */
.shop-filters {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 180px;
}

.filter-group.search-group {
  flex: 1;
  min-width: 250px;
}

.filter-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #555;
}

.filter-select,
.filter-input {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.95rem;
  background: white;
  transition: border-color 0.3s ease;
}

.filter-select:focus,
.filter-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Cosmetics Grid */
.cosmetics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding: 10px 0;
}

/* Cosmetic Card */
.cosmetic-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.cosmetic-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.cosmetic-card.owned {
  border: 2px solid #4caf50;
}

.cosmetic-card.equipped {
  border: 2px solid #ffd700;
  background: linear-gradient(135deg, #fff9e6 0%, #ffffff 100%);
}

.cosmetic-preview {
  position: relative;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cosmetic-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.animated-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #ff4081;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: bold;
}

.owned-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #4caf50;
  color: white;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: bold;
}

.equipped-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #ffd700;
  color: #333;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: bold;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.locked-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.cosmetic-info {
  padding: 15px;
}

.cosmetic-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.cosmetic-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  color: #333;
}

.cosmetic-rarity {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.05);
}

.cosmetic-description {
  font-size: 0.9rem;
  color: #666;
  margin: 8px 0;
  line-height: 1.4;
}

.requirement {
  font-size: 0.85rem;
  color: #ff5722;
  margin: 8px 0;
  font-weight: 500;
}

.cosmetic-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
}

.cosmetic-price {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.price-tokens,
.price-coins {
  font-size: 0.9rem;
  font-weight: 600;
}

.price-tokens {
  color: #ffa726;
}

.price-coins {
  color: #66bb6a;
  font-size: 0.8rem;
  opacity: 0.7;
}

.cosmetic-meta {
  font-size: 0.85rem;
  color: #999;
}

/* Buttons */
.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary {
  background: #667eea;
  color: white;
}

.btn-primary:hover {
  background: #5568d3;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.btn-success {
  background: #4caf50;
  color: white;
}

.btn-success:hover {
  background: #45a049;
}

.btn-secondary {
  background: #9e9e9e;
  color: white;
}

.btn-secondary:hover {
  background: #757575;
}

.btn-disabled {
  background: #e0e0e0;
  color: #999;
  cursor: not-allowed;
}

.btn-disabled:hover {
  transform: none;
  box-shadow: none;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 12px 24px;
  font-size: 1.1rem;
}

.btn-block {
  width: 100%;
}

/* Bundle Card */
.bundles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 25px;
  padding: 10px 0;
}

.bundle-card {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.bundle-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.bundle-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.bundle-header h3 {
  margin: 0;
  color: #333;
}

.bundle-discount {
  background: #ff4081;
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 0.9rem;
}

.bundle-description {
  color: #666;
  margin-bottom: 20px;
  line-height: 1.5;
}

.bundle-items h4 {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 10px;
}

.bundle-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.bundle-item-preview {
  aspect-ratio: 1;
  background: #f5f5f5;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 1.5rem;
  font-weight: bold;
  color: #999;
}

.bundle-item-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bundle-more {
  background: #667eea;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  border-radius: 8px;
}

.bundle-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 2px solid #f0f0f0;
}

.bundle-price .price-value {
  font-size: 1.5rem;
  font-weight: bold;
  color: #ffa726;
}

/* Featured Items */
.cosmetic-card.featured {
  background: linear-gradient(135deg, #fff9e6 0%, #ffffff 100%);
  border: 2px solid #ffd700;
}

.featured-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  color: #333;
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.85rem;
  box-shadow: 0 4px 8px rgba(255, 215, 0, 0.3);
  z-index: 2;
}

.countdown-timer {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 64, 129, 0.9);
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: bold;
}

.featured-pricing {
  margin: 15px 0;
}

.original-price {
  margin-bottom: 5px;
}

.strike {
  text-decoration: line-through;
  color: #999;
  font-size: 0.9rem;
}

.sale-price {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sale-price .price-tokens {
  font-size: 1.3rem;
  color: #4caf50;
}

.discount-badge {
  background: #ff4081;
  color: white;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: bold;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 16px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #f0f0f0;
  border: none;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
  z-index: 1;
}

.modal-close:hover {
  background: #e0e0e0;
}

/* Detail Modal */
.cosmetic-detail-modal {
  padding: 40px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.detail-image-container {
  border-radius: 12px;
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.detail-image {
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
}

.animated-indicator {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: #ff4081;
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: bold;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.detail-header h2 {
  margin: 0;
  color: #333;
}

.rarity-badge {
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.9rem;
  text-transform: uppercase;
}

.rarity-badge.common {
  background: #B0BEC5;
  color: white;
}

.rarity-badge.rare {
  background: #42A5F5;
  color: white;
}

.rarity-badge.epic {
  background: #AB47BC;
  color: white;
}

.rarity-badge.legendary {
  background: #FFD54F;
  color: #333;
}

.detail-description {
  color: #666;
  line-height: 1.6;
  margin-bottom: 25px;
}

.detail-stats {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 25px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #e0e0e0;
}

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

.limited-badge {
  background: #ff4081;
  color: white;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: bold;
}

.detail-pricing {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 25px;
}

.price-option {
  background: white;
  border: 2px solid #e0e0e0;
  padding: 15px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price-label {
  font-weight: 600;
  color: #666;
}

.price-value {
  font-size: 1.2rem;
  font-weight: bold;
}

.detail-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Equipped Modal */
.equipped-modal {
  padding: 40px;
}

.equipped-modal h2 {
  margin-top: 0;
  margin-bottom: 30px;
  text-align: center;
}

.equipped-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.equipped-slot {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  border: 2px solid #e0e0e0;
}

.slot-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e0e0e0;
}

.slot-icon {
  font-size: 1.5rem;
}

.slot-name {
  font-weight: 600;
  color: #555;
}

.equipped-item {
  text-align: center;
}

.equipped-item img {
  max-width: 100%;
  max-height: 120px;
  margin-bottom: 10px;
  border-radius: 6px;
}

.item-name {
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
}

.empty-slot {
  text-align: center;
  padding: 40px 20px;
  color: #999;
  font-style: italic;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-message {
  margin-top: 20px;
  color: white;
  font-size: 1.1rem;
  font-weight: 500;
}

/* No Items / Error Messages */
.no-items,
.error-message {
  text-align: center;
  padding: 60px 20px;
  color: #999;
  font-size: 1.1rem;
}

.error-message {
  color: #f44336;
}

.loading {
  text-align: center;
  padding: 60px 20px;
  color: #666;
  font-size: 1.1rem;
}

/* Inventory Header */
.inventory-header,
.bundles-header,
.featured-header {
  margin-bottom: 25px;
}

.inventory-header h2,
.bundles-header h2,
.featured-header h2 {
  margin: 0 0 10px 0;
  color: #333;
}

.inventory-header p,
.bundles-header p,
.featured-header p {
  color: #666;
  margin: 0;
}

.inventory-filters {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .shop-header {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .shop-stats {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .cosmetics-grid,
  .bundles-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }

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

  .filter-group {
    width: 100%;
  }

  .shop-tabs {
    overflow-x: auto;
    white-space: nowrap;
  }

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

  .detail-pricing {
    grid-template-columns: 1fr;
  }

  .cosmetic-detail-modal {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .cosmetics-grid,
  .bundles-grid {
    grid-template-columns: 1fr;
  }

  .shop-header {
    padding: 15px;
  }

  .shop-stats {
    flex-direction: column;
    width: 100%;
  }

  .stat-item {
    width: 100%;
  }
}
