/* Costume Set Bonus Modal CSS - Based on Item Modal Design */
.costume-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 1050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.costume-modal-backdrop.show {
  display: flex;
  opacity: 1;
}

.costume-modal-backdrop.closing {
  opacity: 0;
}

/* Modern modal container - COMPACT SPLIT PANEL LAYOUT */
.costume-modal {
  position: relative;
  width: 100%;
  max-width: 87rem; /* More compact - 1040px */
  max-height: min(900px, 75vh); /* Reduced height */
  background: #0f172a;
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 0.75rem; /* Smaller radius */
  padding: 0;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.7);
  animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-1rem);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Modern header - COMPACT & STICKY */
.costume-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem; /* Reduced padding */
  border-bottom: 1px solid rgba(99, 102, 241, 0.2);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.7));
  position: relative;
  top: 0;
  z-index: 20;
}

.costume-modal-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.costume-modal h3 {
  font-size: 1.1rem; /* Smaller font */
  font-weight: 600;
  color: #f1f5f9;
  margin: 0;
  letter-spacing: -0.025em;
}

.costume-modal-title i {
  color: #fbbf24;
  font-size: 1.25rem;
}

.costume-modal-subtitle {
  color: #94a3b8;
  font-size: 0.875rem;
  margin: 0.25rem 0 0 0;
  font-style: italic;
}

/* Buttons container */
.costume-modal-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Simulator button */
.costume-modal-simulator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #4f46e5; /* indigo-600 */
  color: white;
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.costume-modal-simulator:hover {
  background: #4338ca; /* indigo-700 */
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.costume-modal-simulator:active {
  background: #3730a3; /* indigo-800 */
  transform: translateY(0);
}

.costume-modal-simulator i {
  font-size: 0.875rem;
}

/* Close button - Top right */
.costume-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  font-size: 1.125rem;
}

.costume-modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  transform: rotate(90deg);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}

/* COMPACT SPLIT PANEL LAYOUT */
.costume-modal-body {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* LEFT PANEL - Costume List & Search - COMPACT */
.costume-left-panel {
  width: 16rem; /* 256px - More compact */
  border-right: 1px solid rgba(99, 102, 241, 0.2);
  display: flex;
  flex-direction: column;
  background: rgba(15, 23, 42, 0.6);
  max-height: 100%;
}

/* RIGHT PANEL - Costume Detail & Actions - COMPACT */
.costume-right-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  overflow: hidden;
  padding: 0; /* Padding kaldırıldı - scroll #costumeDetailContent'te olacak */
}

/* Search section - Left Panel - COMPACT */
.costume-modal-search-section {
  padding: 0.75rem; /* Reduced padding */
  border-bottom: 1px solid rgba(99, 102, 241, 0.15);
  flex-shrink: 0;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(100, 116, 139, 0.5);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-input-wrapper:focus-within {
  background: rgba(15, 23, 42, 1);
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.search-icon {
  color: #64748b;
  font-size: 0.875rem;
  margin-right: 0.5rem;
  transition: color 0.2s;
}

.search-input-wrapper:focus-within .search-icon {
  color: #6366f1;
}

.search-input-wrapper input {
  flex: 1;
  background: transparent;
  border: none;
  color: #f1f5f9;
  font-size: 0.875rem;
  padding: 0.5rem 0;
  outline: none;
}

.search-input-wrapper input::placeholder {
  color: #64748b;
  opacity: 0.7;
}

.search-clear-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.25rem;
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}

.search-clear-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* Results container - Left Panel Scrollable - COMPACT */
.costume-modal-results {
  flex: 1;
  overflow-y: auto;
  padding: 0.25rem 0.5rem;
  max-height: 750px; /* Reduced height */
}

/* Compact costume list item */
.costume-result-row {
  display: flex;
  align-items: center;
  gap: 0.4rem; /* Reduced gap */
  padding: 0.4rem 0.5rem; /* Reduced padding */
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(71, 85, 105, 0.4);
  border-radius: 0.4rem; /* Smaller radius */
  margin-bottom: 0.2rem; /* Reduced margin */
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  margin-left: 1rem; /* Indent items */
}

.costume-result-row:hover,
.costume-result-row.active {
  background: rgba(99, 102, 241, 0.25);
  border-color: #6366f1;
  transform: translateX(2px);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.costume-result-group-title {
  padding: 0.5rem 0.75rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(71, 85, 105, 0.6);
  border-radius: 0.5rem;
  color: #e2e8f0;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.costume-result-group-title:hover,
.costume-result-group-title.active {
  background: rgba(99, 102, 241, 0.25);
  border-color: #6366f1;
  transform: translateX(2px);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.costume-result-group-title.expanded::after {
  content: '▼';
  position: absolute;
  right: 0.75rem;
  font-size: 0.75rem;
  transition: transform 0.2s;
}

.costume-result-group-title.expanded::after {
  transform: rotate(180deg);
}

.costume-result-group-title:not(.expanded)::after {
  content: '▶';
  position: absolute;
  right: 0.75rem;
  font-size: 0.75rem;
}

.costume-result-items {
  padding-left: 0.5rem;
  border-left: 2px solid rgba(99, 102, 241, 0.3);
  margin-left: 0.5rem;
}

.costume-result-img {
  width: 2rem;
  height: 2rem;
  border-radius: 0.375rem;
  border: 1px solid rgba(251, 191, 36, 0.4);
  object-fit: contain;
  flex-shrink: 0;
  background: rgba(15, 23, 42, 0.6);
  padding: 0.125rem;
}

.costume-result-name {
  flex: 1;
  color: #f1f5f9;
  font-weight: 500;
  font-size: 0.75rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.costume-result-type {
  color: #94a3b8;
  font-size: 0.6875rem;
  white-space: nowrap;
  background: rgba(99, 102, 241, 0.1);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
}

/* RIGHT PANEL - Empty State */
.costume-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 2rem;
  text-align: center;
  color: #64748b;
}

.costume-empty-state i {
  font-size: 4rem;
  color: #6366f1;
  opacity: 0.3;
  margin-bottom: 1rem;
}

.costume-empty-state h4 {
  color: #cbd5e1;
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.costume-empty-state p {
  color: #94a3b8;
  font-size: 0.875rem;
  margin: 0;
}

/* RIGHT PANEL - Costume Detail View - COMPACT */
#costumeDetailContent {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

.costume-detail-view {
  display: flex;
  flex-direction: column;
  min-height: 100%; /* İçerik uzunsa taşması için */
  padding: 1rem; /* Reduced padding */
}

.costume-detail-header-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem; /* Reduced gap */
  padding: 1rem; /* Reduced padding */
  background: rgba(99, 102, 241, 0.05);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 0.5rem; /* Smaller radius */
  margin-bottom: 0.75rem; /* Reduced margin */
  position: relative;
  top: 0;
  z-index: 10;
}

.costume-detail-icon-large {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 0.75rem;
  border: 2.5px solid #fbbf24;
  object-fit: contain;
  background: rgba(15, 23, 42, 0.8);
  padding: 0.5rem;
  box-shadow: 
    0 0 30px rgba(251, 191, 36, 0.4),
    0 0 60px rgba(251, 191, 36, 0.2);
  transition: all 0.3s;
}

.costume-detail-icon-large:hover {
  transform: scale(1.05);
  box-shadow: 
    0 0 40px rgba(251, 191, 36, 0.5),
    0 0 80px rgba(251, 191, 36, 0.3);
}

.costume-detail-title-large {
  color: #fbbf24;
  font-size: 1.375rem;
  font-weight: 700;
  margin: 0;
  text-align: center;
  text-shadow: 0 2px 10px rgba(251, 191, 36, 0.3);
}

.costume-detail-subtitle {
  color: #cbd5e1;
  font-size: 0.8125rem;
  margin: 0;
  font-style: italic;
  opacity: 0.9;
}

/* Set Items Section */
.set-items-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.set-item-card {
  border-radius: 0.5rem;
  border: 1px solid rgba(203, 213, 225, 0.2);
  background: rgba(15, 23, 42, 0.6);
  padding: 0.75rem;
  min-width: 12rem;
  flex: 1;
}

.set-item-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.set-item-card-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #e2e8f0;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.set-item-images {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.set-item-image {
  width: 2rem;
  border-radius: 0.25rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  object-fit: contain;
  background: rgba(30, 41, 59, 0.8);
  padding: 0.125rem;
  cursor: pointer;
  transition: all 0.2s;
}

.set-item-image:hover {
  transform: scale(1.1);
  border-color: #6366f1;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
}

/* Bonuses Section */
.bonuses-container {
  margin-top: 1rem;
}

.bonuses-title {
  font-size: 1rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

.bonus-card {
  border-radius: 0.5rem;
  border: 1px solid rgba(203, 213, 225, 0.1);
  background: rgba(15, 23, 42, 0.4);
  padding: 0.75rem;
  margin-bottom: 0.5rem;
}

.bonus-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.bonus-card-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: #e2e8f0;
  background: rgba(99, 102, 241, 0.2);
  padding: 0.125rem 0.5rem;
  border-radius: 0.75rem;
}

.bonus-stat-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.bonus-stat-item {
  font-size: 0.8125rem;
  color: #cbd5e1;
  padding-left: 0.75rem;
  position: relative;
}

.bonus-stat-item::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #6366f1;
}

/* Add simulator iframe styles */
.simulator-iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 0.5rem;
  background: #0f172a;
}

.simulator-content-wrapper {
  flex: 1;
  overflow: hidden;
  margin-top: 1rem;
  height: calc(100% - 100px); /* Account for header */
}

/* Make sure the iframe takes full height */
.costume-right-panel .simulator-content-wrapper {
  display: flex;
  flex-direction: column;
}

.costume-right-panel .simulator-iframe {
  flex: 1;
  min-height: 650px;
}

/* Responsive adjustments for simulator */
@media (max-width: 768px) {
  .simulator-iframe {
    height: 400px;
    min-height: 400px;
  }
  
  .simulator-content-wrapper {
    height: calc(100% - 80px);
  }
}

@media (max-width: 480px) {
  .simulator-iframe {
    height: 300px;
    min-height: 300px;
  }
  
  .simulator-content-wrapper {
    height: calc(100% - 70px);
  }
}

/* Responsive düzenlemeler */
@media (max-width: 1024px) {
  .costume-modal {
    max-width: 90vw;
    max-height: min(600px, 85vh); /* More compact for tablets */
  }
  
  .costume-left-panel {
    width: 16rem; /* Reduced width */
  }
}

@media (max-width: 768px) {
  .costume-modal {
    max-height: min(550px, 85vh); /* More compact max height for mobile */
  }
  
  .costume-modal-body {
    flex-direction: column;
  }
  
  .costume-left-panel {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
    max-height: 180px; /* Reduced height for mobile item list */
  }
  
  .costume-right-panel {
    width: 100%;
    flex: 1;
    min-height: 0;
  }
}

@media (max-width: 480px) {
  .costume-modal {
    max-width: 95vw;
    max-height: min(500px, 90vh); /* More compact for tiny screens */
  }
  
  .costume-left-panel {
    max-height: 160px; /* Smaller item list on mobile */
  }
  
  .set-item-card {
    min-width: 100%;
  }
}