/* 마피아42 보석 제련 시뮬레이터 CSS */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

h1 {
  text-align: center;
  color: #2c3e50;
  margin-bottom: 20px;
  font-weight: bold;
}

/* 제련소 인터페이스 */
.refinery-interface {
  background: #2c3e50;
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 30px;
  color: white;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  position: relative;
}

.refinery-interface::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, #34495e, #2c3e50);
  border-radius: 20px;
  z-index: -1;
}

.refinery-title {
  font-size: 2rem;
  font-weight: bold;
  text-align: center;
  color: #f39c12;
  margin-bottom: 30px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.refinery-section {
  margin-bottom: 25px;
  padding: 20px;
  background: rgba(52, 73, 94, 0.8);
  border-radius: 15px;
  border: 2px solid #4a5f7a;
}

.section-title {
  font-size: 1.2rem;
  font-weight: bold;
  color: #f39c12;
  margin-bottom: 15px;
  text-align: center;
}

/* 보석 슬롯 */
.jewel-slot-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.jewel-slot {
  width: 120px;
  height: 120px;
  border: 3px solid #f39c12;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.jewel-slot:hover {
  border-color: #e67e22;
  transform: scale(1.05);
}

.jewel-slot.has-jewel {
  background: linear-gradient(45deg, #27ae60, #2ecc71);
  border-color: #27ae60;
}

.slot-placeholder {
  color: #bdc3c7;
  font-size: 0.9rem;
  text-align: center;
}

.jewel-info {
  text-align: center;
}

.jewel-name {
  font-weight: bold;
  font-size: 1rem;
  color: white;
}

.jewel-level {
  font-size: 1.2rem;
  font-weight: bold;
  color: #f39c12;
}

.select-jewel-btn {
  padding: 10px 20px;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
}

.select-jewel-btn:hover {
  background: #2980b9;
  transform: translateY(-2px);
}

/* 강화 비용 */
.cost-info {
  text-align: center;
  margin-top: 15px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
}

.cost-label {
  color: #bdc3c7;
  margin-right: 10px;
}

.cost-value {
  color: #f39c12;
  font-weight: bold;
}

/* 성공 미리보기 */
.success-preview {
  display: flex;
  justify-content: center;
}

.preview-slot {
  width: 100px;
  height: 100px;
  border: 2px solid #27ae60;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(39, 174, 96, 0.2);
}

.preview-slot.empty {
  border-color: #95a5a6;
  background: rgba(0, 0, 0, 0.2);
}

/* 아이템 그리드 */
.items-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}

.item-add-slot {
  width: 80px;
  height: 80px;
  border: 2px dashed #666;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(0, 0, 0, 0.1);
  position: relative;
}

.item-add-slot:hover {
  border-color: #3498db;
  background: rgba(52, 152, 219, 0.1);
}

.item-add-slot.empty .add-item-text {
  font-size: 24px;
  color: #666;
  font-weight: bold;
}

.item-add-slot.filled {
  border-style: solid;
  border-color: #f39c12;
  background: rgba(243, 156, 18, 0.2);
}

.item-add-slot.filled:hover {
  border-color: #e67e22;
}

.item-remove-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  background: #e74c3c;
  color: white;
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 12px;
  cursor: pointer;
  display: none;
  line-height: 1;
}

.item-add-slot.filled:hover .item-remove-btn {
  display: block;
}

.item-add-slot.filled .item-image {
  display: block;
}

.item-add-slot.filled .item-name {
  font-size: 10px;
  margin-top: 5px;
}

.item-icon {
  font-size: 1.5rem;
  margin-bottom: 5px;
}

.item-name {
  font-size: 0.7rem;
  text-align: center;
  color: #ecf0f1;
}

.item-count {
  position: absolute;
  bottom: 2px;
  right: 4px;
  background: #e74c3c;
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: bold;
}

/* 선택된 아이템 슬롯 */
.selected-items-container {
  margin-top: 20px;
}

.selected-items-title {
  color: #f39c12;
  font-weight: bold;
  margin-bottom: 10px;
  text-align: center;
}

.selected-items-slots {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.item-slot {
  width: 60px;
  height: 60px;
  border: 2px solid #4a5f7a;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  position: relative;
}

.item-slot.filled {
  border-color: #f39c12;
  background: rgba(243, 156, 18, 0.3);
}

.item-slot .remove-btn {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 16px;
  height: 16px;
  background: #e74c3c;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: bold;
}

/* 강화 시작 버튼 */
.refinery-action {
  text-align: center;
  margin-top: 30px;
}

.start-refinery-btn {
  padding: 15px 40px;
  font-size: 1.2rem;
  font-weight: bold;
  background: linear-gradient(45deg, #27ae60, #2ecc71);
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
}

.start-refinery-btn:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(39, 174, 96, 0.6);
}

.start-refinery-btn:disabled {
  background: #95a5a6;
  cursor: not-allowed;
  box-shadow: none;
}

/* 결과 패널 */
.results-panel {
  background: white;
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.results-panel h3 {
  color: #2c3e50;
  margin-bottom: 20px;
  text-align: center;
}

/* 확률 바 */
.probability-bars {
  margin-bottom: 20px;
}

.probability-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  margin-bottom: 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
  border-left: 4px solid #666;
  color: white;
}

.probability-bar.success {
  border-left-color: #27ae60;
  background: rgba(39, 174, 96, 0.3);
}

.probability-bar.keep {
  border-left-color: #3498db;
  background: rgba(52, 152, 219, 0.3);
}

.probability-bar.down {
  border-left-color: #f39c12;
  background: rgba(243, 156, 18, 0.3);
}

.probability-bar.break {
  border-left-color: #e74c3c;
  background: rgba(231, 76, 60, 0.3);
}

.prob-type {
  font-weight: bold;
  color: #ecf0f1;
}

.prob-value {
  font-size: 1.1rem;
  font-weight: bold;
  color: #ecf0f1;
}

.prob-value.success {
  color: #2ecc71;
}

.prob-value.keep {
  color: #5dade2;
}

.prob-value.down {
  color: #f7dc6f;
}

.prob-value.break {
  color: #ec7063;
}

/* 시뮬레이션 섹션 */
.simulation-section {
  border-top: 2px solid #ecf0f1;
  padding-top: 20px;
}

.simulation-controls {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  justify-content: center;
}

.simulation-controls label {
  font-weight: bold;
  color: #2c3e50;
}

.simulation-controls select {
  padding: 8px 12px;
  border: 2px solid #ddd;
  border-radius: 6px;
}

.simulation-controls button {
  padding: 8px 20px;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

.simulation-controls button:hover {
  background: #2980b9;
}

/* 시뮬레이션 결과 */
.simulation-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}

.stat-item {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 10px;
  text-align: center;
  border-left: 5px solid #ddd;
}

.stat-item.success {
  border-left-color: #27ae60;
  background: rgba(39, 174, 96, 0.1);
}

.stat-item.keep {
  border-left-color: #3498db;
  background: rgba(52, 152, 219, 0.1);
}

.stat-item.down {
  border-left-color: #f39c12;
  background: rgba(243, 156, 18, 0.1);
}

.stat-item.break {
  border-left-color: #e74c3c;
  background: rgba(231, 76, 60, 0.1);
}

.stat-label {
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 4px;
}

.stat-item.success .stat-value {
  color: #27ae60;
}

.stat-item.keep .stat-value {
  color: #3498db;
}

.stat-item.down .stat-value {
  color: #f39c12;
}

.stat-item.break .stat-value {
  color: #e74c3c;
}

.stat-expected {
  font-size: 0.9rem;
  color: #7f8c8d;
}

.simulation-summary {
  text-align: center;
  color: #7f8c8d;
  font-style: italic;
}

/* 모달 */
.modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: #222222;
  border-radius: 15px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #ecf0f1;
}

.modal-header h3 {
  margin: 0;
  color: #ffffff;
}

.close {
  font-size: 2rem;
  cursor: pointer;
  color: #95a5a6;
}

.close:hover {
  color: #e74c3c;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  padding: 20px;
  text-align: center;
  border-top: 1px solid #444;
}

.confirm-btn {
  background: linear-gradient(45deg, #27ae60, #2ecc71);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.confirm-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(39, 174, 96, 0.4);
}

/* 보석 선택 그리드 */
.jewel-modal-content {
  width: 95%;
  max-width: 1000px; /* 직업 선택시 */
  max-height: 90vh;
}

/* 레벨 선택시 모달 크기 조정 */
.jewel-modal-content.level-selection {
  max-width: 600px;
}



.job-tab {
  padding: 8px 12px;
  background: #ecf0f1;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  white-space: nowrap;
}

.job-tab:hover {
  background: #d5dbdb;
}

.job-tab.active {
  background: #3498db;
  color: white;
  border-color: #2980b9;
}

.jewel-level-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  max-height: 600px;
  overflow-y: auto;
  padding: 10px;
}



/* 아이템 모달 */
.item-modal-content {
  width: 90%;
  max-width: 600px;
}

.item-detail {
  display: flex;
  gap: 20px;
  align-items: center;
}

.item-detail-image {
  width: 100px;
  height: 100px;
  object-fit: contain;
}

.item-detail-info {
  flex: 1;
}

.item-detail-info h3 {
  color: #2c3e50;
  margin-bottom: 10px;
}

.item-effect {
  color: #27ae60;
  font-weight: bold;
  margin-bottom: 8px;
}

.item-description {
  color: #7f8c8d;
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 10px;
}

.item-count {
  color: #3498db;
  font-weight: bold;
  margin-bottom: 15px;
}

.add-item-btn {
  background: linear-gradient(45deg, #27ae60, #2ecc71);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.add-item-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(39, 174, 96, 0.3);
}

/* 보석 이미지 */
.jewel-image {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 5px;
}

.preview-jewel-image {
  width: 60px;
  height: 60px;
  object-fit: contain;
  margin-bottom: 5px;
}

/* 아이템 이미지 */
.item-image {
  width: 50px;
  height: 50px;
  object-fit: contain;
  margin-bottom: 5px;
}

.selected-item-image {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .container {
    padding: 10px;
  }
  
  h1 {
    font-size: 1.5rem;
    margin-bottom: 15px;
  }
  
  .refinery-interface {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 15px;
  }
  
  .refinery-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
  }
  
  .refinery-section {
    padding: 15px;
    margin-bottom: 15px;
  }
  
  .section-title {
    font-size: 1rem;
    margin-bottom: 10px;
  }
  
  /* 보석 선택 모드 */
  .jewel-selection-mode .jewel-slot {
    width: 120px;
    height: 120px;
  }
  
  .jewel-selection-mode .slot-placeholder {
    font-size: 14px;
  }
  
  /* 보석 미리보기 */
  .jewel-preview-container {
    gap: 15px;
    margin: 15px 0;
  }
  
  .preview-slot {
    width: 80px;
    height: 80px;
  }
  
  .preview-jewel-image {
    width: 60px;
    height: 60px;
  }
  
  .preview-label {
    font-size: 12px;
  }
  
  .preview-arrow {
    font-size: 20px;
  }
  
  /* 선택된 아이템 그리드 */
  .selected-items-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 10px;
  }
  
  .selected-item-slot {
    width: 70px;
    height: 90px;
  }
  
  .selected-item-slot .item-image {
    width: 40px;
    height: 40px;
  }
  
  .selected-item-slot .item-name {
    font-size: 9px;
  }
  
  /* 확률 바 */
  .probability-bar {
    padding: 10px 12px;
    margin-bottom: 6px;
  }
  
  .prob-value {
    font-size: 1rem;
  }
  
  /* 비용 정보 */
  .cost-info {
    padding: 8px;
    margin-top: 10px;
  }
  
  .cost-label, .cost-value {
    font-size: 14px;
  }
  
  /* 모달 */
  .modal-content {
    width: 95%;
    max-height: 85vh;
  }
  
  .jewel-modal-content {
    width: 95%;
    max-width: none;
  }
  
  .jewel-modal-content.level-selection {
    max-width: none;
  }
  
  .modal-header {
    padding: 15px;
  }
  
  .modal-header h3 {
    font-size: 18px;
  }
  
  .modal-body {
    padding: 15px;
  }
  
  /* 직업 선택 그리드 - 모바일에서 4x9 배치 */
  .job-selection-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    max-width: none;
  }
  
  .job-option {
    padding: 10px;
  }
  
  .job-thumbnail {
    width: 45px;
    height: 45px;
    margin-bottom: 5px;
  }
  
  .job-name {
    font-size: 10px;
  }
  
  /* 보석 레벨 그리드 */
  .jewel-level-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  
  .jewel-level-option {
    width: 85px;
    height: 100px;
    padding: 5px;
  }
  
  .jewel-level-image {
    width: 40px;
    height: 40px;
  }
  
  .jewel-grade-name {
    font-size: 12px;
  }
  
  .level-number {
    font-size: 10px;
  }
  
  /* 아이템 선택 그리드 */
  .item-selection-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  
  .item-option {
    padding: 10px;
  }
  
  .item-option .item-image {
    width: 40px;
    height: 40px;
  }
  
  .item-option .item-name {
    font-size: 10px;
  }
  
  /* 버튼들 */
  .select-items-btn {
    padding: 12px 20px;
    font-size: 13px;
    min-height: 44px; /* 터치하기 쉬운 크기 */
  }
  
  .confirm-btn {
    padding: 12px 25px;
    font-size: 14px;
    min-height: 44px;
  }
  
  .jewel-remove-btn {
    width: 28px;
    height: 28px;
    font-size: 16px;
  }
  
  .close {
    font-size: 1.5rem;
    padding: 5px;
  }
}

/* 더 작은 모바일 화면 (480px 이하) */
@media (max-width: 480px) {
  .container {
    padding: 5px;
  }
  
  h1 {
    font-size: 1.2rem;
    margin-bottom: 10px;
  }
  
  .refinery-interface {
    padding: 10px;
    border-radius: 10px;
  }
  
  .refinery-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
  }
  
  .section-title {
    font-size: 0.9rem;
  }
  
  /* 보석 선택 */
  .jewel-selection-mode .jewel-slot {
    width: 100px;
    height: 100px;
  }
  
  .jewel-selection-mode .slot-placeholder {
    font-size: 12px;
  }
  
  /* 보석 미리보기 */
  .jewel-preview-container {
    flex-direction: column;
    gap: 10px;
  }
  
  .preview-arrow {
    font-size: 18px;
    transform: rotate(90deg);
  }
  
  /* 선택된 아이템 그리드 */
  .selected-items-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 8px;
  }
  
  .selected-item-slot {
    width: 60px;
    height: 80px;
  }
  
  .selected-item-slot .item-image {
    width: 35px;
    height: 35px;
  }
  
  .selected-item-slot .item-name {
    font-size: 8px;
  }
  
  /* 확률 바 */
  .probability-bar {
    padding: 8px 10px;
    flex-direction: column;
    text-align: center;
    gap: 5px;
  }
  
  .prob-type {
    font-size: 12px;
  }
  
  .prob-value {
    font-size: 16px;
    font-weight: bold;
  }
  
  /* 직업 선택 그리드 - 3열로 조정 */
  .job-selection-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  
  .job-option {
    padding: 8px;
  }
  
  .job-thumbnail {
    width: 35px;
    height: 35px;
    margin-bottom: 3px;
  }
  
  .job-name {
    font-size: 9px;
  }
  
  /* 보석 레벨 그리드 */
  .jewel-level-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .jewel-level-option {
    width: 75px;
    height: 90px;
  }
  
  .jewel-level-image {
    width: 35px;
    height: 35px;
  }
  
  .jewel-grade-name {
    font-size: 10px;
  }
  
  /* 아이템 선택 그리드 */
  .item-selection-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .item-option {
    padding: 8px;
  }
  
  .item-option .item-image {
    width: 35px;
    height: 35px;
  }
  
  .item-option .item-name {
    font-size: 9px;
  }
  
  /* 버튼들 */
  .select-items-btn {
    padding: 10px 15px;
    font-size: 12px;
    min-height: 40px;
  }
  
  .confirm-btn {
    padding: 10px 20px;
    font-size: 13px;
    min-height: 40px;
  }
  
  .jewel-remove-btn {
    width: 24px;
    height: 24px;
    font-size: 14px;
  }
  
  .close {
    font-size: 1.3rem;
  }
}

/* 다크모드 지원 */
[data-theme="dark"] {
  .results-panel {
    background: #2c3e50;
    color: #ecf0f1;
  }
  
  .results-panel h3 {
    color: #ecf0f1;
  }
  
  .probability-bar {
    background: #34495e;
    color: #ecf0f1;
  }
  
  .prob-type {
    color: #ecf0f1;
  }
  
  .modal-content {
    background: #2c3e50;
    color: #ecf0f1;
  }
  
  .modal-header h3 {
    color: #ecf0f1;
  }
  
  .jewel-option {
    background: #34495e;
    border-color: #4a5f7a;
    color: #ecf0f1;
  }
  
  .jewel-option:hover {
    background: #4a5f7a;
    border-color: #3498db;
  }
}

/* 직업 선택 그리드 스타일 */
.job-selection-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  max-width: 900px;
  gap: 15px;
  margin-top: 20px;
}

.job-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px;
  border: 2px solid #444;
  border-radius: 12px;
  background: #2a2a2a;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.job-option:hover {
  border-color: #007acc;
  transform: translateY(-2px);
  background: #333;
}

.job-thumbnail {
  width: 60px;
  height: 60px;
  margin-bottom: 8px;
  border-radius: 8px;
}

.job-name {
  font-size: 12px;
  font-weight: bold;
  color: #ecf0f1;
}

/* 레벨 선택 헤더 */
.level-selection-header {
  margin-bottom: 20px;
}

.back-to-job-btn {
  background: #6c757d;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  margin-bottom: 10px;
  transition: background 0.3s ease;
}

.back-to-job-btn:hover {
  background: #5a6268;
}

.modal-step-title {
  margin: 0;
  color: #ecf0f1;
  font-size: 18px;
  text-align: center;
}

/* 보석 레벨 그리드 (4x4) */
.jewel-level-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-top: 20px;
}

.jewel-level-option {
  width: 80px;
  height: 80px;
  border: 2px solid #444;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2a2a2a;
  cursor: pointer;
  transition: all 0.3s ease;
}

.jewel-level-option:hover {
  border-color: #007acc;
  transform: scale(1.05);
  background: #333;
}

.level-number {
  font-size: 12px;
  font-weight: bold;
  color: #f39c12;
}

/* 아이템 선택 모달 스타일 */
.item-selection-modal-content {
  max-width: 800px;
  max-height: 80vh;
  overflow-y: auto;
}

.item-selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.item-option {
  border: 2px solid #444;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  cursor: pointer;
  background: #2a2a2a;
  transition: all 0.3s ease;
  position: relative;
}

.item-option:hover {
  border-color: #007acc;
  transform: translateY(-2px);
}

.item-option.selected {
  border-color: #f39c12;
  background: rgba(243, 156, 18, 0.2);
}

.item-option .item-image {
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
}

.item-option .item-name {
  font-size: 12px;
  font-weight: bold;
}

.selected-indicator {
  position: absolute;
  top: 5px;
  right: 5px;
  background: #f39c12;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

/* 보석 슬롯 - 클릭 가능 */
.jewel-slot.clickable {
  cursor: pointer;
  transition: all 0.3s ease;
}

.jewel-slot.clickable:hover {
  border-color: #007acc;
  transform: translateY(-2px);
}

/* 보석 미리보기 컨테이너 */
.jewel-preview-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  margin: 20px 0;
}

.jewel-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.preview-label {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #ecf0f1;
}

.preview-slot {
  width: 100px;
  height: 100px;
  border: 2px solid #444;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2a2a2a;
  margin-bottom: 8px;
}

.preview-jewel-image {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.preview-arrow {
  font-size: 24px;
  color: #f39c12;
  font-weight: bold;
}

.preview-info {
  text-align: center;
}

.preview-grade {
  font-size: 12px;
  font-weight: bold;
  color: #ecf0f1;
}

.preview-level {
  font-size: 11px;
  color: #bbb;
}

/* 보석 레벨 선택 옵션 업데이트 */
.jewel-level-option {
  width: 100px;
  height: 120px;
  border: 2px solid #444;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #2a2a2a;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 8px;
}

.jewel-level-image {
  width: 50px;
  height: 50px;
  object-fit: contain;
  margin-bottom: 5px;
}

.jewel-grade-name {
  font-size: 14px;
  font-weight: bold;
  color: #ecf0f1;
  text-align: center;
  margin-bottom: 2px;
}


/* 스킨 필요 표시 */
.skin-required {
  font-size: 10px;
  color: #e74c3c;
  margin-top: 5px;
  text-align: center;
  font-weight: bold;
}

/* 보석 선택 모드 */
.jewel-selection-mode {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 150px;
}

.jewel-selection-mode .jewel-slot {
  width: 150px;
  height: 150px;
  border: 3px dashed #666;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #1a1a1a;
  transition: all 0.3s ease;
}

.jewel-selection-mode .jewel-slot:hover {
  border-color: #007acc;
  background: #2a2a2a;
}

.jewel-selection-mode .slot-placeholder {
  font-size: 16px;
  color: #666;
  text-align: center;
}

/* 보석 미리보기 모드 */
.jewel-preview-mode {
  display: flex;
  justify-content: center;
}

.jewel-preview.current {
  position: relative;
}

.jewel-remove-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  background: #e74c3c;
  color: white;
  border: none;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.jewel-remove-btn:hover {
  background: #c0392b;
}

/* 선택된 아이템 그리드 */
.selected-items-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin: 15px 0;
  min-height: 100px;
  padding: 15px;
  border: 2px dashed #444;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.1);
}

.selected-item-slot {
  width: 80px;
  height: 100px;
  border: 2px solid #444;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #2a2a2a;
  position: relative;
}

.selected-item-slot.filled {
  border-color: #f39c12;
  background: rgba(243, 156, 18, 0.1);
}

.selected-item-slot .item-image {
  width: 48px;
  height: 48px;
  margin-bottom: 5px;
}

.selected-item-slot .item-name {
  font-size: 10px;
  text-align: center;
  color: #ecf0f1;
}

.selected-item-slot .remove-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  background: #e74c3c;
  color: white;
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 12px;
  cursor: pointer;
  display: none;
}

.selected-item-slot.filled:hover .remove-btn {
  display: block;
}

/* 모바일에서는 항상 표시 */
@media (max-width: 768px) {
  .selected-item-slot.filled .remove-btn {
    display: block;
    width: 20px;
    height: 20px;
    font-size: 13px;
  }
}

.select-items-btn {
  background: #3498db;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
  width: 100%;
}

.select-items-btn:hover {
  background: #2980b9;
}

/* 확률 표시 색상 업데이트 */
.prob-type.down {
  color: #f39c12;
}