* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
}

/* 헤더 */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  z-index: 100;
  padding: 15px 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}

.nav-menu {
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  color: #666;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 20px;
  transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #667eea;
  background: rgba(102, 126, 234, 0.1);
}

.auth-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-login,
.btn-signup {
  padding: 8px 20px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
}

.btn-login {
  color: #667eea;
  background: transparent;
  border: 1px solid #667eea;
}

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

.btn-signup {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-signup:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* 구글 로그인 버튼 */
.google-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  color: #333;
  border: 1px solid #dadce0;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.google-login-btn:hover {
  background: #f8f9fa;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.google-login-btn img {
  width: 16px;
  height: 16px;
}

.dropdown-menu {
  position: absolute;
  top: 50px;
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  padding: 10px 0;
  display: none;
  z-index: 1000;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-item {
  display: block;
  padding: 10px 20px;
  text-decoration: none;
  color: #333;
  transition: background 0.3s ease;
}

.dropdown-item:hover {
  background: #f5f5f5;
}

.user-menu {
  position: relative;
  display: none;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  cursor: pointer;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
  padding: 8px;
}

.mobile-menu-toggle:hover {
  color: #667eea;
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
}

.mobile-nav.active {
  display: block;
}

.mobile-nav-content {
  position: absolute;
  top: 0;
  right: 0;
  width: 280px;
  height: 100%;
  background: white;
  padding: 20px 0;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-nav.active .mobile-nav-content {
  transform: translateX(0);
}

.mobile-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  margin-bottom: 30px;
  border-bottom: 1px solid #eee;
  padding-bottom: 20px;
}

.mobile-nav-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
  padding: 8px;
}

.mobile-nav-links,
.mobile-user-links {
  padding: 0 20px;
}

.mobile-nav-link {
  display: block;
  padding: 15px 0;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  border-bottom: 1px solid #f5f5f5;
  transition: color 0.3s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: #667eea;
}

.mobile-auth-section {
  margin-top: 30px;
  padding: 20px;
  border-top: 1px solid #eee;
}

.mobile-user-section {
  margin-top: 20px;
}

.mobile-logout-btn {
  width: 100%;
  padding: 12px;
  background: #ef4444;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.mobile-logout-btn:hover {
  background: #dc2626;
}

.mobile-google-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: #fff;
  color: #333;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.mobile-google-login-btn:hover {
  border-color: #c7d2fe;
  color: #4f46e5;
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .nav-container {
    padding: 0 15px;
  }

  .auth-buttons {
    display: none !important;
  }

  .user-menu {
    display: none !important;
  }
}

/* 메인 콘텐츠 */
.main-content {
  padding-top: 120px;
  padding-bottom: 60px;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.hero-section {
  text-align: center;
  margin-bottom: 60px;
}

.session-toggle {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 10px 12px;
  margin: 0 auto 24px;
  width: fit-content;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.session-toggle-btn {
  flex: 0 0 auto;
  white-space: nowrap;
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.3s ease;
}

.session-toggle-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
}

.session-toggle-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  box-shadow: 0 8px 16px rgba(118, 75, 162, 0.25);
}

.session-panel {
  display: none;
}

.session-panel.active {
  display: block;
}

.hero-title {
  font-size: 4rem;
  font-weight: 800;
  color: white;
  margin-bottom: 20px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  letter-spacing: -0.02em;
  line-height: 1.1;
  display: inline-block;
  text-align: center;
  position: relative;
}

.hero-title::before {
  content: "✨";
  position: absolute;
  left: -60px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  animation: sparkle 2s ease-in-out infinite;
}

.hero-title::after {
  content: "🎨";
  position: absolute;
  right: -60px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  animation: sparkle 2s ease-in-out infinite reverse;
}

@keyframes sparkle {
  0%,
  100% {
    transform: translateY(-50%) scale(1) rotate(0deg);
    opacity: 0.8;
  }
  50% {
    transform: translateY(-50%) scale(1.2) rotate(180deg);
    opacity: 1;
  }
}

.hero-subtitle {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 600px;
  margin: 0 auto;
}

/* 갤러리 섹션 */
.gallery-section {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 40px;
}

.section-subtitle {
  margin: 12px 0 24px;
  color: #64748b;
  font-size: 0.95rem;
}

.diary-gallery-grid .gallery-item {
  transition: transform 0.2s ease;
}

.diary-gallery-grid .gallery-item:hover {
  transform: translateY(-4px);
}

.gallery-error {
  padding: 20px;
  border-radius: 16px;
  background: rgba(239, 68, 68, 0.08);
  color: #b91c1c;
  text-align: center;
}

.bulk-actions {
  display: none;
  align-items: center;
  gap: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.bulk-actions.visible {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

.bulk-count {
  font-size: 0.85rem;
  color: #475569;
}

.bulk-delete-btn,
.bulk-clear-btn {
  padding: 6px 14px;
  border-radius: 14px;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.bulk-delete-btn {
  background: #ef4444;
  color: white;
}

.bulk-delete-btn:hover {
  background: #dc2626;
}

.bulk-clear-btn {
  background: rgba(15, 23, 42, 0.06);
  color: #334155;
}

.bulk-clear-btn:hover {
  background: rgba(15, 23, 42, 0.12);
}

.gallery-item {
  position: relative;
}

.gallery-item.is-deleting {
  opacity: 0.6;
  pointer-events: none;
}

.gallery-item.is-deleting .gallery-overlay {
  opacity: 1;
}

.gallery-item.is-deleting .view-btn,
.gallery-item.is-deleting .edit-btn {
  display: none;
}

.bulk-select-checkbox {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
}

.bulk-select-checkbox input {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.button-loading {
  position: relative;
  pointer-events: none;
}

.button-loading::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 8px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: white;
  text-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
  position: relative;
  display: inline-block;
  padding: 0 30px;
}

.section-title::before,
.section-title::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 60px;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.5),
    transparent
  );
  border-radius: 2px;
}

.section-title::before {
  left: -80px;
}

.section-title::after {
  right: -80px;
}

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

.infinite-scroll-sentinel {
  width: 100%;
  height: 1px;
}

.infinite-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  color: #2d3748;
  font-weight: 500;
  opacity: 0;
  visibility: hidden;
  min-height: 48px;
  transition: opacity 0.2s ease;
}

.infinite-loading.visible {
  opacity: 1;
  visibility: visible;
  color: #1a202c;
}

.infinite-loading[data-theme="dark"] {
  color: rgba(255, 255, 255, 0.85);
}

.infinite-loading[data-theme="dark"].visible {
  color: #ffffff;
}

.infinite-loading .spinner {
  width: 24px;
  height: 24px;
  margin: 0;
}

.gallery-item {
  background: white;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}

.gallery-item.return-highlight {
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.55),
    0 20px 40px rgba(249, 115, 22, 0.18);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-5px);
}

.gallery-image {
  width: 100%;
  height: 200px;
  background: #f8fafc;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: #9ca3af;
  font-size: 3rem;
}

.gallery-prompt {
  color: #444;
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 카테고리 필터 */
.category-filter {
  margin-bottom: 40px;
  text-align: center;
}

.category-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

.category-btn {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 14px 28px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  font-size: 1rem;
  letter-spacing: 0.5px;
}

.category-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.category-btn:hover::before {
  left: 100%;
}

.category-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.category-btn.active {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  color: #667eea;
  border-color: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.25);
  font-weight: 700;
}

.category-btn.active:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 35px rgba(102, 126, 234, 0.35);
}

/* 갤러리 헤더 */
.gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  color: #1f2937;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 20px 30px;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.gallery-header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.gallery-header h3 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sort-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sort-select {
  background: rgba(102, 126, 234, 0.1);
  color: #374151;
  border: 2px solid rgba(102, 126, 234, 0.2);
  padding: 12px 20px;
  border-radius: 25px;
  cursor: pointer;
  outline: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.sort-select:hover {
  background: rgba(102, 126, 234, 0.15);
  border-color: rgba(102, 126, 234, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

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

.sort-select option {
  background: white;
  color: #374151;
  padding: 10px;
  font-weight: 500;
}

/* 갤러리 아이템 개선 */
.gallery-item {
  background: white;
  border-radius: 16px;
  padding: 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  overflow: hidden;
  position: relative;
}

.gallery-image-wrapper {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #f8fafc;
}

.gallery-image-wrapper .gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}

.image-label {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(102, 126, 234, 0.9);
  color: white;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.gallery-item:hover .gallery-image {
  transform: scale(1.05);
}

.gallery-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;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.view-btn,
.edit-btn,
.delete-overlay-btn {
  background: white;
  color: #667eea;
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 5px;
}

.view-btn:hover {
  background: #667eea;
  color: white;
  transform: scale(1.05);
}

.edit-btn {
  background: #f59e0b;
  color: white;
}

.edit-btn:hover {
  background: #d97706;
  transform: scale(1.05);
}

.delete-overlay-btn {
  background: #ef4444;
  color: white;
}

.delete-overlay-btn:hover {
  background: #dc2626;
  transform: scale(1.05);
}

.gallery-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.admin-action-buttons {
  display: flex;
  gap: 8px;
}

.gallery-info {
  padding: 20px;
}

.gallery-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  margin-top: 12px;
  gap: 8px;
}

.meta-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.category-tag {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 500;
}

.download-count {
  color: #999;
}

.deform-info {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-weight: 500;
  font-size: 0.75rem;
}

/* 로딩 및 상태 */
.loading-spinner {
  text-align: center;
  padding: 60px 20px;
  color: #667eea;
  font-weight: 500;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(102, 126, 234, 0.2);
  border-top: 3px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

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

.error-message,
.no-samples {
  text-align: center;
  padding: 60px 20px;
  color: white;
}

.error-message button {
  background: white;
  color: #667eea;
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 20px;
  transition: all 0.3s ease;
}

/* 샘플 모달 */
.sample-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.6);
}

.sample-modal.show {
  opacity: 1;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  display: none;
  justify-content: center;
  align-items: center;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.modal-content {
  position: relative;
  background: white;
  border-radius: 20px;
  width: 95vw;
  max-width: 1200px;
  max-height: 90vh;
  min-width: 800px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  border-bottom: 1px solid #eee;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.3s ease;
}

.modal-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.modal-image-section {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  padding: 20px;
}

.modal-image-wrapper {
  position: relative;
  width: 100%;
  max-width: 480px;
  border-radius: 12px;
  overflow: hidden;
  background: #e2e8f0;
  box-shadow: 0 18px 36px rgba(148, 163, 184, 0.35);
}

.modal-image-wrapper .modal-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #f8fafc;
}

.modal-image-label {
  position: absolute;
  bottom: 12px;
  left: 12px;
  padding: 6px 12px;
  background: rgba(30, 41, 59, 0.85);
  color: #f8fafc;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25);
}



.modal-info-section {
  width: 400px;
  padding: 30px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.sample-description {
  font-size: 1.1rem;
  color: #333;
  line-height: 1.6;
  margin-bottom: 25px;
}

.sample-meta .meta-item {
  margin-bottom: 10px;
  font-size: 0.9rem;
  color: #666;
}

.prompt-text {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 10px;
  font-size: 0.9rem;
  color: #555;
  line-height: 1.5;
  border-left: 4px solid #667eea;
}

.prompt-container {
  position: relative;
}

.sample-prompt {
  margin-bottom: 10px;
  line-height: 1.6;
  word-break: break-word;
}

.sample-prompt.collapsed {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prompt-toggle-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.prompt-toggle-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.download-btn {
  flex: 1;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.purchase-btn {
  flex: 1;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.purchase-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.3);
}

.close-btn {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), #f5f9ff);
  color: #1f2a37;
  border: 1px solid rgba(99, 102, 241, 0.18);
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 16px rgba(148, 163, 184, 0.18);
}

.close-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(99, 102, 241, 0.28);
  background: linear-gradient(135deg, #e8edff, #f7faff);
}

.deform-section {
  margin-top: 80px;
}

.purchase-summary {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.purchase-summary h4 {
  margin-bottom: 8px;
  font-size: 1rem;
  color: #047857;
}

.purchase-summary dl {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 6px 12px;
  font-size: 0.9rem;
  color: #0f172a;
}

.purchase-summary dt {
  font-weight: 600;
}

.purchase-form {
  display: grid;
  gap: 12px;
}

.purchase-form label {
  font-size: 0.85rem;
  color: #475569;
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}

.purchase-form input,
.purchase-form textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #cbd5f5;
  font-size: 0.95rem;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.purchase-form input:focus,
.purchase-form textarea:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
  outline: none;
}

.purchase-form textarea {
  min-height: 64px;
  resize: vertical;
}

.address-zip {
  display: flex;
  gap: 8px;
  align-items: center;
}

.address-zip input {
  flex: 1;
}

.address-search-btn {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  min-width: 80px;
}

.address-search-btn:hover {
  background: linear-gradient(135deg, #5b50f1 0%, #7c3aed 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.purchase-actions {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

.purchase-price {
  font-weight: 700;
  color: #0f172a;
}

/* 알림 */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 15px 25px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  z-index: 1001;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.notification.show {
  transform: translateX(0);
}

/* 다운로드 선택 모달 */
.download-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.download-modal.show {
  opacity: 1;
}

.download-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.download-content {
  background: white;
  border-radius: 20px;
  padding: 30px;
  max-width: 400px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.download-content h3 {
  margin-bottom: 20px;
  color: #333;
  font-size: 1.5rem;
}

.download-options {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 20px;
}

.purchase-form .download-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.download-option-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 15px 20px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
}

.download-option-btn.purchase-btn {
  background: linear-gradient(
    135deg,
    #10b981 0%,
    #059669 100%
  ) !important;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
}

.download-option-btn.purchase-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.3) !important;
}

/* 다운로드 모달 강제 스타일 적용 */
.download-modal .purchase-summary {
  background: rgba(16, 185, 129, 0.08) !important;
  border: 1px solid rgba(16, 185, 129, 0.2) !important;
  border-radius: 12px !important;
  padding: 16px !important;
  margin-bottom: 16px !important;
}

.download-modal .purchase-summary h4 {
  margin-bottom: 8px !important;
  font-size: 1rem !important;
  color: #047857 !important;
}

.download-modal .purchase-summary dl {
  display: grid !important;
  grid-template-columns: 120px 1fr !important;
  gap: 6px 12px !important;
  font-size: 0.9rem !important;
  color: #0f172a !important;
}

.download-modal .purchase-summary dt {
  font-weight: 600 !important;
}

.download-modal .purchase-form {
  display: grid !important;
  gap: 12px !important;
}

.download-modal .form-field label {
  font-size: 0.85rem !important;
  color: #475569 !important;
  font-weight: 600 !important;
  display: block !important;
  margin-bottom: 6px !important;
}

/* 파일 미리보기 스타일 - galleryPurchaseModal 디자인 적용 */
.download-content.file-preview-style {
  max-width: 700px;
  max-height: 90vh;
  padding: 0;
  border-radius: 20px;
  overflow-y: auto;
  background: white;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
}

.download-content.file-preview-style .modal-actions {
  padding: 20px 30px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  background: #f8fafc;
}

/* 새로운 purchase-summary-compact 스타일 */
.purchase-summary-compact {
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 12px;
  padding: 20px;
  margin: 0;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  color: #374151;
}

.summary-row.total {
  border-top: 1px solid rgba(16, 185, 129, 0.2);
  margin-top: 8px;
  padding-top: 12px;
  font-weight: 600;
  font-size: 16px;
  color: #047857;
}

.summary-row span:last-child {
  font-weight: 500;
}

/* 디폼블럭 구매 모달 스크롤 스타일 */
.download-modal.deform-purchase {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}

.download-modal.deform-purchase .modal-content {
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 20px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 700px;
}

.download-modal.deform-purchase .purchase-content {
  flex: 1;
  overflow-y: auto;
  padding: 0 20px;
  max-height: calc(90vh - 120px); /* 헤더와 푸터 공간 확보 */
}

.download-modal.deform-purchase .modal-header {
  position: sticky;
  top: 0;
  background: white;
  z-index: 10;
  border-bottom: 1px solid #e2e8f0;
  padding: 20px 20px 15px 20px;
  flex-shrink: 0;
  color: #333;
}

.download-modal.deform-purchase .modal-actions {
  position: sticky;
  bottom: 0;
  background: white;
  z-index: 10;
  border-top: 1px solid #e2e8f0;
  padding: 15px 20px;
  flex-shrink: 0;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.download-modal.deform-purchase .purchase-form {
  padding: 20px 0;
}

.file-preview-container {
  display: flex;
  align-items: flex-start;
  padding: 30px;
  background: white;
  gap: 25px;
  border-bottom: 1px solid #e2e8f0;
}

.file-icon-large {
  position: relative;
  flex: 0 0 200px;
  width: 200px;
  height: auto;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.preview-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

.file-format-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(59, 130, 246, 0.95);
  color: white;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  text-transform: uppercase;
}

.file-info-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
  min-height: 0;
}

.file-title {
  font-size: 20px;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 10px 0;
  line-height: 1.3;
}

.file-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.file-meta span {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
}

.file-status.premium {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: white;
}

.file-status.free {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

/* 디폼 가격 정보 박스 */
.deform-info-box {
  margin-top: 16px;
  background: linear-gradient(145deg, #f8fafc, #e2e8f0);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  font-size: 0.9rem;
}

.price-breakdown {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.price-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
}

.price-item.addon {
  color: #4f46e5;
  font-size: 0.85rem;
}

.price-label {
  font-weight: 500;
  color: #374151;
}

.price-value {
  font-weight: 600;
  color: #1f2937;
}

.price-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, #d1d5db, transparent);
  margin: 8px 0;
}

.price-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  padding: 12px 16px;
  margin: 4px -4px;
}

.total-label {
  font-weight: 600;
  color: #1e40af;
  font-size: 1rem;
}

.total-value {
  font-weight: 700;
  color: #1e40af;
  font-size: 1.1rem;
}

.block-summary {
  text-align: center;
  margin-top: 8px;
  padding: 6px 0;
  color: #6b7280;
  font-size: 0.8rem;
  font-weight: 500;
}

.download-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  padding: 20px 30px;
  background: #f8fafc;
}

.download-option-card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.download-option-card.available {
  border-color: #e2e8f0;
}

.download-option-card.available:hover {
  border-color: #6366f1;
  transform: translateY(-4px);
  box-shadow: 0 12px 25px rgba(99, 102, 241, 0.15);
}

.download-option-card.premium-only {
  background: linear-gradient(145deg, #f9fafb, #f3f4f6);
  opacity: 0.7;
  cursor: not-allowed;
}

.option-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.option-info h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 6px 0;
}

.option-info p {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
}

.premium-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 1.2rem;
}

.modal-actions {
  padding: 20px 30px;
  background: white;
  border-top: 1px solid #e2e8f0;
  text-align: center;
}

.close-btn-modern {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.close-btn-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.purchase-btn-modern {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 25px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
  margin-right: 12px;
}

.purchase-btn-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(5, 150, 105, 0.4);
  background: linear-gradient(135deg, #047857 0%, #065f46 100%);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 20px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 0 0 20px 20px;
}

/* 갤러리 구매 모달 스타일 */
#galleryPurchaseModal .modal-content {
  max-width: 700px;
  width: 90%;
}

.purchase-content {
  padding: 0 20px 20px;
}

.purchase-info {
  display: flex;
  gap: 25px;
  align-items: flex-start;
}

.purchase-image-container {
  flex: 0 0 200px;
}

.purchase-preview {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.purchase-details {
  flex: 1;
}

.purchase-details h3 {
  color: #1e293b;
  margin-bottom: 10px;
  font-size: 20px;
}

.purchase-details p {
  color: #64748b;
  margin-bottom: 20px;
  line-height: 1.6;
}

.purchase-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 25px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f1f5f9;
  border-radius: 8px;
  font-size: 14px;
}

.feature-icon {
  font-size: 16px;
}

.pricing-details {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
}

.price-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
  color: #64748b;
}

.price-total {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
  font-weight: 600;
  font-size: 16px;
  color: #1e293b;
}

.block-color-summary {
  text-align: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
  font-size: 12px;
  color: #64748b;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
  .purchase-info {
    flex-direction: column;
    gap: 15px;
  }

  .purchase-image-container {
    flex: none;
    align-self: center;
  }

  .purchase-features {
    grid-template-columns: 1fr;
  }
}

/* 모바일 반응형 */
@media (max-width: 768px) {
  .file-preview-container {
    flex-direction: column;
    text-align: center;
    padding: 20px;
    gap: 16px;
  }

  .file-icon-large {
    flex: none;
    width: 150px;
    align-self: center;
  }

  .file-title {
    font-size: 1.2rem;
  }

  .download-options-grid {
    grid-template-columns: 1fr;
    padding: 16px 20px;
  }
}

.download-option-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.download-option-btn.secondary {
  background: linear-gradient(135deg, #48c6ef 0%, #6f86d6 100%);
}

.download-cancel-btn {
  background: #f8f9fa;
  color: #666;
  border: 1px solid #ddd;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

.download-cancel-btn:hover {
  background: #e9ecef;
}

/* 편집 모달 */
.edit-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.edit-modal.show {
  opacity: 1;
}

.edit-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.edit-content {
  background: white;
  border-radius: 20px;
  max-width: 90vw;
  max-height: 90vh;
  width: 800px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.edit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  border-bottom: 1px solid #eee;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

.edit-header h3 {
  margin: 0;
  font-size: 1.5rem;
}

.edit-body {
  padding: 30px;
  overflow-y: auto;
  flex: 1;
}

.edit-form {
  max-width: none;
}

.edit-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 20px 30px;
  border-top: 1px solid #eee;
  background: #f8f9fa;
}

.save-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.save-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.save-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.delete-btn {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.delete-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
}

/* 편집 모달 이미지 관련 스타일 */
.edit-image-container {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.current-image {
  flex: 1;
  text-align: center;
}

.current-image-preview {
  width: 100%;
  max-width: 200px;
  height: 150px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid #e1e5e9;
  margin-bottom: 8px;
}

.current-image-label {
  font-size: 0.9rem;
  color: #666;
  margin: 0;
}

.edit-image-upload {
  flex: 1;
  min-height: 150px;
}

.edit-image-upload .upload-placeholder {
  padding: 20px;
}

.edit-image-upload .upload-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.edit-image-upload .upload-placeholder p {
  font-size: 0.9rem;
  margin-bottom: 5px;
}

.edit-image-upload .upload-placeholder small {
  font-size: 0.8rem;
}

.edit-image-upload .upload-preview img {
  max-width: 100%;
  max-height: 120px;
  object-fit: contain;
}

/* 관리자 업로드 섹션 */
.admin-section-removed {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 40px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.upload-toggle-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 16px 32px;
  border-radius: 50px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.upload-toggle-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.upload-toggle-btn:hover::before {
  left: 100%;
}

.upload-toggle-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 40px rgba(102, 126, 234, 0.5);
  background: linear-gradient(135deg, #5b5ff1 0%, #6c47cc 100%);
}

.upload-toggle-btn:active {
  transform: translateY(-1px) scale(1.02);
}

.upload-form-container {
  background: white;
  border-radius: 15px;
  padding: 30px;
  margin-top: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.upload-form {
  max-width: 800px;
}

.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  flex: 1;
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e1e5e9;
  border-radius: 10px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  outline: none;
}

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

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

/* 파일 업로드 영역 */
.file-upload-area {
  position: relative;
  border: 2px dashed #d1d5db;
  border-radius: 10px;
  background: #f9fafb;
  transition: all 0.3s ease;
  cursor: pointer;
  min-height: 150px;
}

.file-upload-area:hover {
  border-color: #667eea;
  background: #f0f4ff;
}

.file-upload-area.dragover {
  border-color: #667eea;
  background: #e0e7ff;
  transform: scale(1.02);
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.upload-icon {
  font-size: 3rem;
  margin-bottom: 15px;
  opacity: 0.5;
}

.upload-placeholder p {
  font-size: 1.1rem;
  color: #6b7280;
  margin-bottom: 8px;
}

.upload-placeholder small {
  color: #9ca3af;
}

.upload-preview {
  position: relative;
  padding: 20px;
  text-align: center;
}

.upload-preview img {
  max-width: 100%;
  max-height: 200px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.remove-image {
  position: absolute;
  top: 25px;
  right: 25px;
  background: #ef4444;
  color: white;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.remove-image:hover {
  background: #dc2626;
  transform: scale(1.1);
}

/* 폼 액션 버튼 */
.form-actions {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.cancel-btn {
  background: rgba(255, 255, 255, 0.9);
  color: #6b7280;
  border: 2px solid rgba(209, 213, 219, 0.6);
  padding: 16px 32px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  backdrop-filter: blur(10px);
  min-width: 140px;
}

.cancel-btn:hover {
  background: rgba(229, 231, 235, 0.95);
  color: #374151;
  border-color: rgba(156, 163, 175, 0.8);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.submit-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  padding: 16px 32px;
  border-radius: 50px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  min-width: 140px;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  box-shadow: 0 6px 25px rgba(16, 185, 129, 0.4);
  overflow: hidden;
}

.submit-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.submit-btn:hover:not(:disabled)::before {
  left: 100%;
}

.submit-btn:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 40px rgba(16, 185, 129, 0.5);
  background: linear-gradient(135deg, #0d9468 0%, #047857 100%);
}

.submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  filter: grayscale(0.5);
}

.btn-loading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-loading::after {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid rgba(102, 126, 234, 0.3);
  border-top: 2px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* 반응형 */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.8rem;
    letter-spacing: -0.01em;
  }

  .hero-title::before,
  .hero-title::after {
    display: none; /* 모바일에서는 이모지 숨김 */
  }

  .section-title {
    font-size: 1.8rem;
    padding: 0 20px;
  }

  .section-title::before,
  .section-title::after {
    width: 40px;
  }

  .section-title::before {
    left: -60px;
  }

  .section-title::after {
    right: -60px;
  }

  .category-btn {
    padding: 12px 20px;
    font-size: 0.9rem;
  }

  .upload-toggle-btn {
    padding: 14px 24px;
    font-size: 1rem;
  }

  .submit-btn,
  .cancel-btn {
    padding: 14px 24px;
    font-size: 1rem;
  }

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

  .gallery-header h3 {
    font-size: 1.5rem;
  }

  .sort-controls {
    justify-content: center;
  }

  .sort-select {
    padding: 10px 16px;
    font-size: 0.9rem;
  }

  .pagination {
    padding: 15px;
    flex-wrap: wrap;
    gap: 6px;
  }

  .pagination-btn,
  .page-number {
    padding: 10px 16px;
    font-size: 0.9rem;
    min-width: 40px;
  }

  .main-content {
    padding-left: 15px;
    padding-right: 15px;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .nav-menu {
    display: none;
  }

  /* 모바일 모달 개선 */
  .modal-content {
    width: 95vw;
    min-width: auto;
    max-height: 95vh;
    margin: 10px;
  }

  .modal-body {
    flex-direction: column;
  }

  .modal-image-section {
    flex: none;
    width: 100%;
    padding: 15px;
  }

  .modal-image-wrapper {
    height: 250px;
    margin-bottom: 20px;
  }

  .modal-info-section {
    width: 100%;
    padding: 15px;
    border-top: 1px solid #eee;
  }

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

  .download-btn,
  .close-btn {
    width: 100%;
  }

  /* 편집 모달 모바일 개선 */
  .edit-content {
    width: 95vw;
    min-width: auto;
    margin: 10px;
  }

  .edit-image-container {
    flex-direction: column;
    gap: 15px;
  }

  .current-image-preview {
    max-width: 150px;
    height: 120px;
  }

  .form-row {
    flex-direction: column;
  }

  /* 모바일 모달 스타일 */
  .modal-content {
    width: 98vw;
    max-width: none;
    min-width: auto;
    max-height: 95vh;
    overflow-y: auto;
    margin: 2.5vh auto;
    transform: none;
    position: relative;
    top: auto;
    left: auto;
  }

  .modal-body {
    flex-direction: column;
    overflow-y: auto;
  }

  .modal-image-section {
    min-height: 300px;
    flex: none;
  }

  .modal-image-wrapper {
    height: 300px;
  }

  .modal-info-section {
    flex: none;
    min-height: auto;
  }

  .modal-header {
    padding: 15px 20px;
  }

  .modal-header h2 {
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.2rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .category-btn {
    padding: 10px 16px;
    font-size: 0.85rem;
  }

  .upload-toggle-btn,
  .submit-btn,
  .cancel-btn {
    padding: 12px 20px;
    font-size: 0.95rem;
  }

  .gallery-header {
    padding: 12px 15px;
  }

  .gallery-header h3 {
    font-size: 1.3rem;
  }

  .sort-select {
    padding: 8px 14px;
    font-size: 0.85rem;
  }

  .pagination {
    padding: 12px;
  }

  .pagination-btn,
  .page-number {
    padding: 8px 12px;
    font-size: 0.85rem;
    min-width: 36px;
  }

  /* 작은 모바일 화면 모달 스타일 */
  .modal-content {
    width: 99vw;
    margin: 1vh auto;
    max-height: 98vh;
    border-radius: 12px;
  }

  .modal-header {
    padding: 12px 15px;
  }

  .modal-header h2 {
    font-size: 1.1rem;
  }

  .modal-image-wrapper {
    height: 250px;
  }

  .purchase-form input,
  .purchase-form textarea {
    padding: 8px 10px;
    font-size: 0.9rem;
  }

  .purchase-actions {
    gap: 8px;
  }

  .purchase-btn,
  .close-btn {
    padding: 12px 16px;
    font-size: 0.9rem;
  }

  /* 다운로드 콘텐츠 모바일 스타일 */
  .download-content {
    max-width: 95vw;
    max-height: 95vh;
    padding: 20px;
    overflow-y: auto;
  }

  .download-content h3 {
    font-size: 1.2rem;
  }

  .purchase-summary {
    padding: 12px;
  }

  .purchase-form input,
  .purchase-form textarea {
    padding: 8px 10px;
    font-size: 0.9rem;
  }
}

/* 사업자 정보 푸터 스타일 */
.business-footer {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  color: white;
  padding: 40px 20px;
  margin-top: 40px;
  width: 100%;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.footer-left {
  margin-bottom: 0;
}

.footer-right {
  text-align: right;
}

.footer-brand h3 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-brand p {
  color: #bdc3c7;
  font-size: 1rem;
  line-height: 1.6;
}

.footer-business-info h4 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: #ecf0f1;
}

.business-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.business-row {
  display: flex;
  gap: 10px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.business-row .label {
  color: #bdc3c7;
  min-width: 140px;
  font-weight: 500;
}

.business-row .value {
  color: #ecf0f1;
  font-weight: 400;
}

.footer-copyright {
  color: #95a5a6;
  font-size: 0.9rem;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 푸터 하단 섹션 스타일 */
.footer-bottom {
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 0;
  margin-top: 30px;
}

.footer-bottom-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.footer-bottom-left .footer-copyright-bottom {
  color: #95a5a6;
  font-size: 0.9rem;
  margin: 0;
}

.footer-bottom-right .footer-links {
  display: flex;
  gap: 25px;
  align-items: center;
}

.footer-link {
  color: #bdc3c7;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
  padding: 5px 0;
}

.footer-link:hover {
  color: #ecf0f1;
}

.footer-link.active {
  color: #667eea;
  font-weight: 600;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
  .footer-bottom-content {
    flex-direction: column;
    gap: 15px;
    text-align: center;

    .footer-brand h3 {
      margin-bottom: 8px;
    }

    .footer-brand p {
      margin-bottom: 20px;
    }

    .footer-business-info h4 {
      text-align: center;
      font-size: 1.1rem;
      margin-bottom: 15px;
    }

    .business-row {
      flex-direction: row;
      justify-content: space-between;
      gap: 10px;
      text-align: left;
      margin-bottom: 8px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
      padding-bottom: 8px;
    }

    .business-row:last-child {
      border-bottom: none;
      margin-bottom: 0;
    }

    .business-row .label {
      min-width: 140px;
      font-weight: 600;
      color: #bdc3c7;
      font-size: 0.85rem;
    }

    .business-row .value {
      color: #ecf0f1;
      font-size: 0.85rem;
      text-align: right;
    }
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
  }
}

/* 모바일 반응형 */
@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    gap: 20px;
    text-align: center;

    .footer-brand h3 {
      margin-bottom: 8px;
    }

    .footer-brand p {
      margin-bottom: 20px;
    }

    .footer-business-info h4 {
      text-align: center;
      font-size: 1.1rem;
      margin-bottom: 15px;
    }

    .business-row {
      flex-direction: row;
      justify-content: space-between;
      gap: 10px;
      text-align: left;
      margin-bottom: 8px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
      padding-bottom: 8px;
    }

    .business-row:last-child {
      border-bottom: none;
      margin-bottom: 0;
    }

    .business-row .label {
      min-width: 140px;
      font-weight: 600;
      color: #bdc3c7;
      font-size: 0.85rem;
    }

    .business-row .value {
      color: #ecf0f1;
      font-size: 0.85rem;
      text-align: right;
    }
  }

  .footer-right {
    text-align: center;
  }

  .business-row {
    flex-direction: column;
    gap: 5px;
    text-align: center;
  }

  .business-row .label {
    min-width: auto;
    font-weight: 600;
    color: #ecf0f1;
  }

  .footer-business-info h4 {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .business-footer {
    padding: 30px 15px;
  }

  .footer-brand h3 {
    font-size: 1.5rem;
  }

  .business-row {
    font-size: 0.8rem;
  }
}

/* =====================
   Nano Banana (Gallery) - FIXED CARD & GRID LAYOUT
   ===================== */
.nano-section {
  padding: 8px 0 0;
}

.nano-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.nano-header-text h3 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nano-subtitle {
  margin-top: 4px;
  color: #6b7280;
  font-size: 0.95rem;
}

.nano-view-all {
  text-decoration: none;
  font-weight: 700;
  color: #4f46e5;
  background: rgba(99, 102, 241, 0.08);
  padding: 10px 14px;
  border-radius: 999px;
  transition: transform 0.15s ease, box-shadow 0.15s ease,
    background 0.15s ease;
  white-space: nowrap;
}

.nano-view-all:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.18);
  background: rgba(99, 102, 241, 0.12);
}

.nano-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.nano-card {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.6);
  display: flex;
  flex-direction: column;
  height: 100%;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nano-card:focus {
  outline: 3px solid rgba(99, 102, 241, 0.35);
  outline-offset: 2px;
}

.nano-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.12);
}

.nano-card-media {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: #f3f4f6;
  aspect-ratio: 16 / 9;
  min-height: 0;
}

.nano-card-media.has-single {
  grid-template-columns: 1fr;
}

.nano-card-media-item {
  position: relative;
  overflow: hidden;
}

.nano-card-media-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nano-card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  text-align: left;
}

.nano-card-category {
  align-self: flex-start;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
}

.nano-card-title {
  margin: 2px 0 0 0;
  font-size: 1rem;
  line-height: 1.35;
  color: #111827;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nano-card-summary {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #6b7280;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nano-card-footer {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
}

.nano-card-more {
  color: #4f46e5;
  font-weight: 600;
  font-size: 0.92rem;
}

.nano-empty-state,
.nano-error-state {
  background: #ffffff;
  border-radius: 16px;
  padding: 28px 20px;
  text-align: center;
  color: #6b7280;
  border: 1px solid rgba(226, 232, 240, 0.6);
}

@media (max-width: 1024px) {
  .nano-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

@media (max-width: 768px) {
  .nano-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
  }

  .nano-card-media {
    aspect-ratio: 4 / 3;
  }
}

/* 작은 화면에서는 탭 4개를 2줄로 배치 */
@media (max-width: 480px) {
  .session-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    width: 100%;
    max-width: 320px;
    border-radius: 24px;
  }
}
