/**
 * copy-tool.css
 * 복사 도구 페이지 전용 스타일
 */

/* ============================================
   1) 복사 도구 메인 섹션
   ============================================ */
.copy-tool-main {
  padding: 60px 20px;
  background: linear-gradient(180deg, transparent 0%, rgba(102, 126, 234, 0.05) 100%);
  min-height: 100vh;
}

/* ============================================
   2) 제목 섹션
   ============================================ */
.copy-tool-title-section {
  text-align: center;
  margin-bottom: 50px;
  animation: fadeIn 0.6s ease-out;
}

.copy-tool-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #333;
  margin: 0 0 10px 0;
}

.copy-tool-subtitle {
  font-size: 1rem;
  color: #666;
  line-height: 1.6;
  margin: 0;
}

/* ============================================
   3) 복사 도구 래퍼 (사이드바 + 컨텐츠)
   ============================================ */
.copy-tool-wrapper {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 30px;
  margin-bottom: 60px;
}

/* ============================================
   4) 사이드바 카테고리
   ============================================ */
.copy-tool-sidebar {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  height: fit-content;
  animation: slideInLeft 0.6s ease-out;
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: #333;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  text-align: left;
}

.category-btn:hover {
  border-color: #667eea;
  background: #f8f9ff;
  transform: translateX(4px);
}

.category-btn--active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* ============================================
   5) 이모지 카테고리 헤더
   ============================================ */
.emoji-category-header {
  margin-bottom: 30px;
  animation: slideInUp 0.4s ease-out;
}

.emoji-category-title {
  font-size: 1.5rem;
  color: #333;
  margin: 0 0 8px 0;
  font-weight: 700;
}

.emoji-category-desc {
  font-size: 0.9rem;
  color: #666;
  margin: 0;
}

/* ============================================
   6) 이모지 그리드
   ============================================ */
.emoji-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: 12px;
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  animation: fadeIn 0.6s ease-out;
}

.emoji-item-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: #f8f9ff;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.8rem;
  line-height: 1;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  min-height: 60px;
}

.emoji-item-btn:hover {
  border-color: #667eea;
  background: #e8ecff;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.emoji-item-btn:active {
  transform: scale(0.98);
}

/* ============================================
   7) 커스텀 이모지 조합 섹션
   ============================================ */
.custom-combination-section {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
  border-radius: 16px;
  padding: 40px;
  animation: slideUp 0.6s ease-out;
}

.custom-header {
  margin-bottom: 30px;
}

.custom-title {
  font-size: 1.3rem;
  color: #333;
  margin: 0 0 8px 0;
  font-weight: 700;
}

.custom-subtitle {
  font-size: 0.9rem;
  color: #666;
  margin: 0;
}

/* ============================================
   8) 커스텀 입력 영역
   ============================================ */
.custom-input-wrapper {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.custom-input {
  flex: 1;
  padding: 14px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
  background: white;
}

.custom-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.custom-clear-btn {
  padding: 14px 20px;
  border-radius: 8px;
}

/* ============================================
   9) 커스텀 액션 버튼
   ============================================ */
.custom-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 30px;
}

.custom-copy-btn,
.custom-save-btn {
  flex: 1;
  padding: 14px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.custom-copy-btn:hover,
.custom-save-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* ============================================
   10) 빠른 이모지 섹션
   ============================================ */
.quick-emojis {
  margin-top: 30px;
}

.quick-emojis-label {
  font-size: 0.9rem;
  color: #333;
  font-weight: 600;
  margin: 0 0 12px 0;
}

.quick-emoji-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-emoji-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
}

.quick-emoji-btn:hover {
  border-color: #667eea;
  background: #e8ecff;
  transform: scale(1.15);
}

.quick-emoji-btn:active {
  transform: scale(0.95);
}

/* ============================================
   11) 애니메이션
   ============================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   12) 모바일 반응형
   ============================================ */
@media (max-width: 1024px) {
  .copy-tool-wrapper {
    grid-template-columns: 200px 1fr;
    gap: 20px;
  }

  .emoji-grid-container {
    grid-template-columns: repeat(auto-fill, minmax(55px, 1fr));
  }
}

@media (max-width: 768px) {
  .copy-tool-title {
    font-size: 1.8rem;
  }

  .copy-tool-wrapper {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .copy-tool-sidebar {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
  }

  .category-list {
    display: flex;
    flex-direction: row;
    gap: 10px;
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .category-btn {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 10px 12px;
    font-size: 0.8rem;
  }

  .emoji-grid-container {
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    padding: 20px;
    gap: 10px;
  }

  .custom-input-wrapper {
    flex-direction: column;
  }

  .custom-clear-btn {
    width: 100%;
  }

  .custom-actions {
    flex-direction: column;
  }

  .custom-copy-btn,
  .custom-save-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .copy-tool-main {
    padding: 40px 15px;
  }

  .copy-tool-title {
    font-size: 1.5rem;
  }

  .custom-combination-section {
    padding: 25px;
  }

  .emoji-grid-container {
    grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
    padding: 15px;
    gap: 8px;
  }

  .emoji-item-btn {
    font-size: 1.5rem;
    padding: 10px;
    min-height: 50px;
  }

  .quick-emoji-btn {
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
  }
}

/* ============================================
   13) 다크 모드
   ============================================ */
[data-theme="dark"] .copy-tool-title,
[data-theme="dark"] .emoji-category-title,
[data-theme="dark"] .custom-title {
  color: #e0e0e0;
}

[data-theme="dark"] .copy-tool-subtitle,
[data-theme="dark"] .emoji-category-desc,
[data-theme="dark"] .custom-subtitle,
[data-theme="dark"] .quick-emojis-label {
  color: #b0b0c0;
}

[data-theme="dark"] .copy-tool-sidebar,
[data-theme="dark"] .emoji-grid-container,
[data-theme="dark"] .custom-input {
  background: #2a2a3e;
  border-color: #3a3a4e;
}

[data-theme="dark"] .copy-tool-sidebar {
  color: #e0e0e0;
}

[data-theme="dark"] .category-btn {
  background: #2a2a3e;
  border-color: #3a3a4e;
  color: #e0e0e0;
}

[data-theme="dark"] .category-btn:hover {
  background: #333349;
  border-color: #667eea;
}

[data-theme="dark"] .emoji-item-btn {
  background: #333349;
  border-color: #3a3a4e;
}

[data-theme="dark"] .emoji-item-btn:hover {
  background: #404050;
  border-color: #667eea;
}

[data-theme="dark"] .quick-emoji-btn {
  background: #2a2a3e;
  border-color: #3a3a4e;
}

[data-theme="dark"] .quick-emoji-btn:hover {
  background: #333349;
  border-color: #667eea;
}

[data-theme="dark"] .custom-input:focus {
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

/* ============================================
   14) 감소된 동작 모드
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .copy-tool-title-section,
  .copy-tool-wrapper,
  .custom-combination-section,
  .emoji-item-btn,
  .category-btn,
  .quick-emoji-btn,
  .custom-input {
    animation: none !important;
    transition: none !important;
  }
}
