﻿/**
 * planner.css - 거울 던전 플래너 관련 스타일
 * 
 * 섹션 구성:
 * 1. 플래너 헤더
 * 2. 탭 스타일
 * 3. 탭 페이지 레이아웃
 * 4. 탭 컨텐츠
 * 5. 팩 이미지 박스
 * 6. 기프트 선택 영역
 * 7. 저장된 플랜 목록
 * 8. 플래너 모달
 */

/* ============================================
   1. 플래너 헤더
   ============================================ */
.planner-header {
  display: flex;
  flex-direction: column;
  gap: 0.9375rem;
  margin-bottom: 1.875rem;
  padding: 1.25rem;
  background: #f9f9f9;
  border-radius: 0.625rem;
  min-width: 50rem;
}

.planner-title-area {
  display: flex;
  align-items: center;
  gap: 0.9375rem;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.planner-title-area h2 {
  margin: 0;
  font-size: 1.5em;
}

.plan-name-input {
  flex: 1;
  max-width: 25rem;
  min-width: 15rem;
  padding: 0.625rem 0.9375rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  font-size: 1em;
  transition: border-color 0.2s;
}

.plan-name-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.1875rem rgba(0, 123, 255, 0.1);
}

/* 플랜 설명 영역 */
.planner-description-area {
  width: 100%;
  margin-top: 0.5rem;
}

.plan-description-input {
  width: 100%;
  min-height: 8rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  font-size: 1rem;
  font-family: inherit;
  line-height: 1.6;
  transition: border-color 0.2s;
  color: #333;
  background: #fff;
  resize: vertical;
  box-sizing: border-box;
}

.plan-description-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.1875rem rgba(0, 123, 255, 0.1);
}

.plan-description-input::placeholder {
  color: #999;
}

.planner-actions {
  display: flex;
  gap: 0.625rem;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

/* Floors Container */
.floors-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
  min-width: 50rem;
}

.floor-plan {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 0.625rem;
  overflow: hidden;
  transition: all 0.2s;
}

.floor-plan:hover {
  box-shadow: var(--card-shadow);
  border-color: var(--primary-color);
}

.floor-header {
  background: #f9f9f9;
  padding: 0.9375rem 1.25rem;
  color: #333;
  border-bottom: 1px solid #e0e0e0;
}

.floor-header.normal .floor-number {
  color: #2e7d32;
  text-shadow: none;
}

.floor-header.hard .floor-number {
  color: #d84315;
  text-shadow: none;
}

.floor-header.extreme .floor-number {
  color: #c62828;
  text-shadow: none;
}

.floor-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.625rem;
}

.floor-number {
  font-size: 1.5em;
  font-weight: 700;
  font-family: 'Noto Sans KR', sans-serif;
}

.delete-floor-btn {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #666;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.delete-floor-btn:hover {
  background: #ffebee;
  border-color: #ffcdd2;
  color: #c62828;
}

.floor-memo {
  width: 100%;
  min-height: 3.125rem;
  padding: 0.625rem;
  border: 1px solid #ddd;
  border-radius: 0.3125rem;
  background: #fff;
  color: #333;
  font-size: 0.95em;
  resize: vertical;
  font-family: inherit;
}

.floor-memo::placeholder {
  color: #999;
}

.floor-memo:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0.3125rem rgba(212, 175, 55, 0.3);
}

.floor-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: row;
  gap: 1.25rem;
  color: #333;
}

.floor-left {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-shrink: 0;
}

.floor-left label {
  font-weight: 600;
  color: #333;
}

.pack-image-box {
  width: 21.25rem;
  min-width: 18rem;
  flex: 1;
  aspect-ratio: 2 / 3;
  border: 0.1875rem solid var(--border-color, #5a4a35);
  border-radius: 0.75rem;
  background: linear-gradient(145deg, #2a2419 0%, #1a1612 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
  flex-shrink: 0;
  padding: 0.9375rem;
  position: relative;
  box-shadow: 
    inset 0 0.125rem 0.25rem rgba(0, 0, 0, 0.3),
    0 0.25rem 0.75rem rgba(0, 0, 0, 0.4);
}

.pack-image-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 0.625rem;
  border: 1px solid rgba(212, 175, 55, 0.15);
  pointer-events: none;
}

.pack-image-box:hover {
  border-color: var(--primary-color, #d4af37);
  box-shadow: 
    inset 0 0.125rem 0.25rem rgba(0, 0, 0, 0.3),
    0 0 1.25rem rgba(212, 175, 55, 0.4),
    0 0.375rem 1rem rgba(0, 0, 0, 0.5);
  transform: translateY(-0.125rem);
}

.pack-image-box:hover::before {
  border-color: rgba(212, 175, 55, 0.4);
}

/* 팩 선택 안됐을 때 안내 텍스트 표시 */
.pack-image-box:empty::after,
.pack-image-box:not(:has(img))::after {
  content: '클릭하여 테마 팩 선택';
  color: rgba(212, 175, 55, 0.6);
  font-size: 0.95em;
  font-weight: 500;
  text-align: center;
  padding: 1.25rem;
}

.pack-image-box img {
  max-width: 100%;
  max-height: 95%;
  object-fit: contain;
  border-radius: 0.375rem;
  filter: drop-shadow(0 0.25rem 0.5rem rgba(0, 0, 0, 0.5));
}

.floor-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  min-width: 25rem;
}

.floor-right label {
  font-weight: 600;
  color: #333;
}

/* 목표 기프트 영역 - 2줄 고정 */
.target-gifts-area {
  height: 17.5rem;
  overflow-y: auto;
}

/* 재료 기프트 영역 - 1줄 고정 */
.material-gifts-area {
  height: 8.75rem;
  overflow-y: auto;
}

.pack-selection {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pack-selection label {
  font-weight: 600;
  color: #333;
}

.pack-select {
  padding: 0.625rem 0.9375rem;
  border: 1px solid #ddd;
  border-radius: 0.5rem;
  font-size: 1em;
  background: #fff;
  color: #333;
  cursor: pointer;
  transition: border-color 0.2s;
}

.pack-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.1875rem rgba(212, 175, 55, 0.1);
}

.target-gifts {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.target-gifts label {
  font-weight: 600;
  color: #333;
}

.selected-gifts {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  align-content: flex-start;
  gap: 0.625rem;
  min-height: 3.75rem;
  padding: 0.625rem;
  background: #f9f9f9;
  border: 0.125rem dashed #ddd;
  border-radius: 0.5rem;
}

.add-gift-btn {
  background: #fff;
  border: 0.125rem dashed var(--primary-color);
  color: transparent;
  padding: 0.5rem;
  border-radius: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.125rem;
  transition: all 0.2s;
  font-size: 0.85em;
  text-align: center;
  box-sizing: border-box;
  flex-shrink: 0;
  position: relative;
  width: 6.25rem;
  height: auto;
}

/* 가상의 투명 기프트 이미지 영역으로 크기 맞춤 */
.add-gift-btn::before {
  content: '';
  width: 5.3125rem;
  height: 5.3125rem;
  display: block;
}

/* 플러스 텍스트 가운데 배치하기 */
.add-gift-btn::after {
  content: '+\A기프트 추가';
  white-space: pre;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.75em;
  text-align: center;
  line-height: 1.4;
}

/* 버튼 호버 효과 */
.add-gift-btn:hover {
  background: #fff8e1;
  border-style: solid;
  box-shadow: 0 0.125rem 0.3125rem rgba(0,0,0,0.1);
}

/* 합성 기프트 추가 버튼 (동일 스타일) */
.add-synthesis-btn {
  background: #fff;
  border: 0.125rem dashed var(--primary-color);
  color: transparent;
  padding: 0.5rem;
  border-radius: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.125rem;
  transition: all 0.2s;
  font-size: 0.85em;
  text-align: center;
  box-sizing: border-box;
  flex-shrink: 0;
  position: relative;
  width: 6.25rem;
  height: auto;
}

/* 가상의 투명 기프트 이미지 영역으로 크기 맞춤 */
.add-synthesis-btn::before {
  content: '';
  width: 5.3125rem;
  height: 5.3125rem;
  display: block;
}

/* 텍스트를 가운데에 위치시키기 */
.add-synthesis-btn::after {
  content: '+\A기프트 추가';
  white-space: pre;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.75em;
  text-align: center;
  line-height: 1.4;
}

/* 버튼 호버 효과 */
.add-synthesis-btn:hover {
  background: #fff8e1;
  border-style: solid;
  box-shadow: 0 0.125rem 0.3125rem rgba(0,0,0,0.1);
}

.selected-gift-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--primary-color);
  color: #fff;
  border-radius: 1.25rem;
  font-size: 0.9em;
}

.selected-gift-chip .remove-gift {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9em;
  padding: 0;
}

.selected-gift-chip .remove-gift:hover {
  background: rgba(255, 100, 100, 0.8);
}

/* Selected Gift Card (Image Style) */
.selected-gift-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding: 0.5rem;
  background: #fff;
  border-radius: 0.75rem;
  border: 0.125rem solid #e0e0e0;
  box-shadow: 0 0.125rem 0.3125rem rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  width: 6.25rem;
  box-sizing: border-box;
}

.selected-gift-card:hover {
  transform: translateY(-0.25rem);
  border-color: var(--primary-color);
  box-shadow: 0 0.25rem 0.5rem rgba(0,0,0,0.15);
}

.selected-gift-card .gift-tier-badge {
  position: absolute;
  top: -0.25rem;
  left: 0.25rem;
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 900;
  font-size: 1.5rem;
  color: #ffae00;
  z-index: 2;
  text-shadow: 0 0 0.3125rem rgba(255, 174, 0, 0.5), 0.125rem 0.125rem 0 rgba(0, 0, 0, 0.8);
  letter-spacing: -0.0625rem;
}

.selected-gift-card .gift-tier-badge.tier-EX {
  color: #ccff00;
  text-shadow: 0 0 0.3125rem rgba(204, 255, 0, 0.5), 0.125rem 0.125rem 0 rgba(0, 0, 0, 0.8);
}

.selected-gift-card .gift-image-container {
  width: 5.3125rem;
  height: 5.3125rem;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: filter 0.3s ease;
}

.selected-gift-card .gift-image-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../기타/에고기프트_테두리.webp');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none;
  z-index: 0;
}

.selected-gift-card .gift-image-placeholder {
  width: 65%;
  height: 65%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.selected-gift-card .gift-image-placeholder img {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0.125rem 0.25rem rgba(0,0,0,0.2));
}

.selected-gift-card .gift-attribute-icon {
  position: absolute;
  bottom: 0.125rem;
  right: 0.125rem;
  width: 1.25rem;
  height: 1.25rem;
  z-index: 2;
  filter: drop-shadow(0 0.0625rem 0.125rem rgba(0,0,0,0.2));
}

.selected-gift-card .gift-attribute-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.selected-gift-card .gift-name {
  margin-top: 0.125rem;
  font-size: 0.75em;
  text-align: center;
  color: #333;
  line-height: 1.2;
  word-break: keep-all;
  width: 100%;
  height: 3em;
  min-height: 3em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.selected-gift-card .remove-gift {
  position: absolute;
  top: -0.5rem;
  right: -0.5rem;
  background: #dc3545;
  border: 0.125rem solid #fff;
  color: #fff;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8em;
  padding: 0;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 10;
}

.selected-gift-card .remove-gift:hover {
  background: #c82333;
  transform: scale(1.1);
}

/* Synthesis Gift Card (합성 기프트) - 일반 기프트와 동일 스타일 */
.synthesis-gift-card {
  width: 6.25rem !important;
  padding: 0.5rem !important;
  box-sizing: border-box !important;
}

.synthesis-gift-card .gift-image-container {
  width: 5.3125rem !important;
  height: 5.3125rem !important;
}

.synthesis-gift-card .gift-name {
  font-size: 0.75em !important;
  height: 3em !important;
  min-height: 3em !important;
  width: 100% !important;
  line-height: 1.2 !important;
}

/* Saved Plans Section */
.saved-plans-section {
  margin-top: 2.5rem;
  padding: 1.25rem;
  background: #f9f9f9;
  border-radius: 0.625rem;
  min-width: 50rem;
}

.saved-plans-section h3 {
  margin: 0 0 1.25rem 0;
  font-size: 1.3em;
  color: #333;
}

.saved-plans-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr));
  gap: 0.9375rem;
  min-width: 40rem;
}

.saved-plan-item {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 0.5rem;
  padding: 0.9375rem;
  cursor: pointer;
  transition: all 0.2s;
  max-width: 21.875rem;
  position: relative;
}

.saved-plan-item .plan-export-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 1.75rem;
  height: 1.75rem;
  border: none;
  background: rgba(33, 150, 243, 0.1);
  color: #1976d2;
  border-radius: 0.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.saved-plan-item .plan-export-btn:hover {
  background: rgba(33, 150, 243, 0.2);
  color: #1565c0;
}

.saved-plan-item:hover {
  border-color: var(--primary-color);
  box-shadow: 0 0.125rem 0.5rem rgba(0, 123, 255, 0.2);
}

.saved-plan-item .plan-name {
  font-weight: 600;
  font-size: 1.1em;
  margin-bottom: 0.5rem;
  color: #333;
  padding-right: 2.1875rem;
  word-break: break-word;
}

.saved-plan-item .plan-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85em;
  color: #666;
}

.saved-plan-item .plan-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.625rem;
  padding-top: 0.625rem;
  border-top: 1px solid #f0f0f0;
}

.saved-plan-item .plan-action-btn {
  flex: 1;
  padding: 0.375rem 0.75rem;
  background: #f4f4f4;
  border: 1px solid #d0d0d0;
  border-radius: 0.3125rem;
  font-size: 0.85em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.saved-plan-item .plan-action-btn:hover {
  background: #e9f2ff;
  border-color: var(--primary-color);
}

.saved-plan-item .plan-action-btn.execute {
  background: #e8f5e9;
  border-color: #a5d6a7;
  color: #2e7d32;
}

.saved-plan-item .plan-action-btn.execute:hover {
  background: #c8e6c9;
  border-color: #66bb6a;
}

.saved-plan-item .plan-action-btn.delete {
  background: #ffe5e5;
  border-color: #ffcccc;
  color: #c00;
}

.saved-plan-item .plan-action-btn.delete:hover {
  background: #ffcccc;
}

/* 새 플랜 만들기 카드 */
.new-plan-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 7.5rem;
  border: 0.125rem dashed #555;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.new-plan-card:hover {
  border-color: var(--primary-color);
  background: rgba(201, 162, 39, 0.05);
}

.new-plan-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: #888;
  width: 100%;
  height: 100%;
}

.new-plan-card:hover .new-plan-content {
  color: var(--primary-color);
}

.new-plan-icon {
  font-size: 2em;
  font-weight: 300;
  line-height: 1;
}

.new-plan-text {
  font-size: 0.95em;
  font-weight: 500;
}

/* Difficulty Toggle */
.difficulty-toggle {
  display: flex;
  background: #e0e0e0;
  border-radius: 1.25rem;
  padding: 0.1875rem;
  width: fit-content;
}

.diff-btn {
  padding: 0.625rem 1.5rem;
  border: none;
  background: transparent;
  border-radius: 1.0625rem;
  font-weight: 600;
  font-size: 1rem;
  color: #666;
  cursor: pointer;
  transition: all 0.2s;
}

.diff-btn.active {
  background: #fff;
  box-shadow: 0 0.125rem 0.3125rem rgba(0,0,0,0.1);
}

.diff-btn[data-diff="normal"].active {
  color: #2e7d32;
}

.diff-btn[data-diff="hard"].active {
  color: #d32f2f;
}

.diff-btn[data-diff="extreme"].active {
  color: #DC143C;
}

/* Global Sections */
.global-planner-sections {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.875rem;
}

.global-gifts-section, .recipe-section {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 0.625rem;
  padding: 1.25rem;
  min-width: 50rem;
}

.recipe-section {
  margin-top: 1.875rem;
}

.global-gifts-section h3, .recipe-section h3 {
  margin-top: 0;
  margin-bottom: 0.9375rem;
  font-size: 1.2em;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: #333;
}

.selected-gifts-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

/* Pack Selection Display */
.selected-pack-display {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem;
  background: #f5f5f5;
  border-radius: 0.375rem;
  border: 1px solid #ddd;
  color: #333;
}

.selected-pack-display .pack-name {
  font-weight: 600;
  flex: 1;
}

.select-pack-btn {
  padding: 0.3125rem 0.625rem;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 0.25rem;
  cursor: pointer;
  font-size: 0.9em;
  color: #333;
}

.select-pack-btn:hover {
  background: #f0f0f0;
  border-color: #bbb;
}

.clear-pack-btn {
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  background: #ff6b6b;
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9em;
  transition: all 0.2s;
}

.clear-pack-btn:hover {
  background: #ff4444;
  transform: scale(1.1);
}

/* Recipe Section */
.acquisition-order-container {
  display: flex;
  flex-direction: column;
  gap: 0.9375rem;
}

.acquisition-order-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.acquisition-order-row {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.75rem;
  background: #f8f8f8;
  border: 1px solid #e0e0e0;
  border-radius: 0.5rem;
}

.order-row-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.625rem;
  background: #333;
  color: #fff;
  border-radius: 0.375rem;
  font-weight: 600;
  font-size: 0.85em;
  white-space: nowrap;
}

.order-row-header .row-number {
  color: var(--primary-color);
}

.order-priorities {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}

.order-priority-group {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.625rem;
  background: #fff;
  border: 1px dashed #ccc;
  border-radius: 0.375rem;
  min-height: 3.125rem;
}

.priority-label {
  font-weight: 600;
  font-size: 0.8em;
  color: #666;
  padding: 0.25rem 0.5rem;
  background: #e9e9e9;
  border-radius: 0.25rem;
  white-space: nowrap;
}

.priority-gifts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  align-items: flex-start;
}

.priority-gift-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 6.25rem;
  padding: 0.5rem;
  background: #fff;
  border-radius: 0.75rem;
  border: 0.125rem solid #e0e0e0;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 0.125rem 0.3125rem rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
}

.priority-gift-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-0.25rem);
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

.priority-gift-card .gift-image-container {
  position: relative;
  width: 5.3125rem;
  height: 5.3125rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.priority-gift-card .gift-image-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../기타/에고기프트_테두리.webp');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 0;
}

.priority-gift-card .gift-tier-badge {
  position: absolute;
  top: -0.25rem;
  left: 0.25rem;
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 900;
  font-size: 1.5rem;
  color: #ffae00;
  z-index: 3;
  text-shadow: 0 0 0.3125rem rgba(255, 174, 0, 0.5), 0.125rem 0.125rem 0 rgba(0, 0, 0, 0.8);
  letter-spacing: -0.0625rem;
  background: none;
  padding: 0;
}

.priority-gift-card .gift-tier-badge.tier-EX {
  color: #ccff00;
  text-shadow: 0 0 0.3125rem rgba(204, 255, 0, 0.5), 0.125rem 0.125rem 0 rgba(0, 0, 0, 0.8);
}

.priority-gift-card .gift-image-placeholder {
  width: 3.4375rem;
  height: 3.4375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.priority-gift-card .gift-image-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.priority-gift-card .gift-attribute-icon {
  position: absolute;
  bottom: 0.125rem;
  right: 0.125rem;
  width: 1.25rem;
  height: 1.25rem;
  z-index: 2;
  filter: drop-shadow(0 0.0625rem 0.125rem rgba(0,0,0,0.2));
}

.priority-gift-card .gift-attribute-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.priority-gift-card .name {
  margin-top: 0.125rem;
  font-size: 0.75em;
  color: #333;
  text-align: center;
  width: 100%;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: keep-all;
  height: 3em;
  min-height: 3em;
}

.priority-gift-card .remove-priority {
  position: absolute;
  top: -0.5rem;
  right: -0.5rem;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #dc3545;
  border: 0.125rem solid #fff;
  border-radius: 50%;
  font-size: 0.6em;
  color: #fff;
  cursor: pointer;
  z-index: 10;
}

.priority-gift-card .remove-priority:hover {
  background: #c82333;
  transform: scale(1.1);
}

.priority-gift-chip {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.5rem;
  background: #333;
  color: #fff;
  border-radius: 0.375rem;
  font-size: 0.8em;
  cursor: pointer;
  transition: all 0.2s;
}

.priority-gift-chip img {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
  border-radius: 0.25rem;
}

.priority-gift-chip .priority-gift-name {
  max-width: 5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.priority-gift-chip:hover {
  background: #555;
}

.priority-gift-chip .remove-priority {
  width: 1rem;
  height: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #dc3545;
  border-radius: 50%;
  font-size: 0.7em;
  cursor: pointer;
}

.priority-gift-chip .remove-priority:hover {
  background: #c82333;
}

.add-priority-btn {
  padding: 0.375rem 0.625rem;
  background: transparent;
  border: 1px dashed #aaa;
  border-radius: 0.25rem;
  color: #666;
  font-size: 0.8em;
  cursor: pointer;
  transition: all 0.2s;
}

.add-priority-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: rgba(212, 175, 55, 0.1);
}

.order-arrow {
  color: #999;
  font-size: 1.2em;
}

.remove-row-btn {
  padding: 0.375rem 0.625rem;
  background: #dc3545;
  border: none;
  border-radius: 0.25rem;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
  align-self: center;
}

.remove-row-btn:hover {
  background: #c82333;
}

.add-order-row-btn {
  padding: 0.625rem 1.25rem;
  background: #f0f0f0;
  border: 0.125rem dashed #ccc;
  border-radius: 0.5rem;
  color: #666;
  font-size: 0.9em;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.add-order-row-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: rgba(212, 175, 55, 0.1);
}

.empty-order-state {
  color: #888;
  font-style: italic;
  text-align: center;
  padding: 1.25rem;
}

/* Difficulty Badge in Saved Plans */
.difficulty-badge {
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.8em;
  font-weight: bold;
}

.difficulty-badge.normal {
  background: #e8f5e9;
  color: #2e7d32;
}

.difficulty-badge.hard {
  background: #ffebee;
  color: #c62828;
}

.difficulty-badge.extreme {
  background: #fce4ec;
  color: #DC143C;
}

/* Floor Navigation */
.floor-navigation-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  padding: 0.9375rem;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 0.625rem;
  box-shadow: 0 0.125rem 0.3125rem rgba(0,0,0,0.05);
  min-width: 50rem;
}

.floor-pagination {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.floor-page-btn {
  width: 4.5rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 0.375rem;
  font-weight: 700;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 1.1rem;
  color: #555;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: none;
}

.floor-page-btn:hover {
  background: #f5f5f5;
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-0.125rem);
}

.floor-page-btn.active {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
  box-shadow: 0 0.125rem 0.3125rem rgba(0, 123, 255, 0.3);
  text-shadow: none;
}

/* Floor Page Button Styles based on Difficulty */

/* Normal Style */
.floor-page-btn.normal {
  color: #2e7d32;
  border: 1px solid #a5d6a7;
  background: #e8f5e9;
}

.floor-page-btn.normal:hover {
  background: #c8e6c9;
  box-shadow: 0 0.125rem 0.3125rem rgba(0,0,0,0.1);
  color: #1b5e20;
  border-color: #81c784;
}

.floor-page-btn.normal.active {
  background: #4caf50;
  color: #fff;
  border-color: #4caf50;
  box-shadow: 0 0.125rem 0.3125rem rgba(76, 175, 80, 0.4);
}

/* Hard Style */
.floor-page-btn.hard {
  color: #d84315;
  border: 1px solid #ffccbc;
  background: #fbe9e7;
}

.floor-page-btn.hard:hover {
  background: #ffccbc;
  box-shadow: 0 0.125rem 0.3125rem rgba(0,0,0,0.1);
  color: #bf360c;
  border-color: #ff8a65;
}

.floor-page-btn.hard.active {
  background: #ff5722;
  color: #fff;
  border-color: #ff5722;
  box-shadow: 0 0.125rem 0.3125rem rgba(255, 87, 34, 0.4);
}

/* Extreme Style (11-15층 */
.floor-page-btn.extreme {
  color: #DC143C;
  border: 1px solid #f8bbd9;
  background: #fce4ec;
}

.floor-page-btn.extreme:hover {
  background: #f8bbd9;
  box-shadow: 0 0.125rem 0.3125rem rgba(0,0,0,0.1);
  color: #b71c3c;
  border-color: #f48fb1;
}

.floor-page-btn.extreme.active {
  background: #DC143C;
  color: #fff;
  border-color: #DC143C;
  box-shadow: 0 0.125rem 0.3125rem rgba(220, 20, 60, 0.4);
}

/* 거울 던전 플랜 탭 */
.plans-header {
  margin-bottom: 1.875rem;
}

.plans-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.25rem;
  flex-wrap: nowrap;
}

.plans-header-actions {
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.plans-header-actions > .action-btn {
  margin-top: 0;
}

.launcher-download-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.125rem;
}

.launcher-update-date {
  font-size: 0.7em;
  color: #888;
  white-space: nowrap;
}

.plans-header h2 {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 0.625rem;
}

.plans-header h2 i {
  color: var(--gold-accent);
}

.plans-description {
  color: #8b7355;
  font-size: 0.95em;
}

.electron-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.125rem;
  background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.9em;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 0.125rem 0.5rem rgba(21, 101, 192, 0.3);
}

.electron-download-btn:hover {
  background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
  transform: translateY(-0.125rem);
  box-shadow: 0 0.25rem 0.75rem rgba(21, 101, 192, 0.4);
}

.electron-download-btn i {
  font-size: 1.1em;
}

.new-plan-section {
  margin-top: 1.875rem;
  text-align: center;
}

.saved-plan-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.9375rem;
}

.saved-plan-item .plan-info {
  flex: 1;
  min-width: 12.5rem;
}

.saved-plan-item .plan-actions {
  display: flex;
  gap: 0.5rem;
}

.plan-action-btn.edit {
  background: linear-gradient(135deg, #2196f3, #1976d2);
  color: white;
}

.plan-action-btn.edit:hover {
  background: linear-gradient(135deg, #1976d2, #1565c0);
}

/* 동적 탭 스타일*/
.tab-btn.dynamic-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-right: 0.75rem;
}

.tab-btn.dynamic-tab .tab-name {
  max-width: 9.375rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tab-btn.dynamic-tab .tab-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.1);
  transition: all 0.2s;
}

.tab-btn.dynamic-tab .tab-close:hover {
  background: rgba(220, 53, 69, 0.8);
  color: white;
}

.tab-btn.dynamic-tab.active .tab-close {
  background: rgba(0, 0, 0, 0.2);
}

.tab-btn.dynamic-tab.active .tab-close:hover {
  background: rgba(220, 53, 69, 0.9);
}

/* 편집 창 콘텐츠*/
.edit-tab-content {
  animation: fadeIn 0.3s ease-in;
}

.edit-close-btn {
  background: linear-gradient(135deg, #dc3545, #c82333) !important;
}

.edit-close-btn:hover {
  background: linear-gradient(135deg, #c82333, #bd2130) !important;
}

.action-btn.danger {
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: white;
}

.action-btn.danger:hover {
  background: linear-gradient(135deg, #c82333, #bd2130);
}

/* 일반 목표 기프트 - 최대 3줄 + 스크롤*/
#general-target-gifts {
  max-height: 28.125rem; /* 3줄 + 이름 + 여백 */
  overflow-y: auto;
  align-content: flex-start;
  padding-top: 0.625rem; /* X 버튼이 가리지 않도록*/
}

#general-target-gifts::-webkit-scrollbar {
  width: 0.375rem;
}

#general-target-gifts::-webkit-scrollbar-track {
  background: #1a1a1a;
  border-radius: 0.1875rem;
}

#general-target-gifts::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 0.1875rem;
}

#general-target-gifts::-webkit-scrollbar-thumb:hover {
  background: #777;
}
