/* ==========================================================================
   다국어 UI 스타일
   ========================================================================== */

/* 언어 토글 버튼 */
.language-toggle {
  display: flex;
  gap: 8px;
  margin: 2rem 0;
  padding: 4px;
  background: var(--color-border-light);
  border-radius: 12px;
  width: fit-content;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

div.language-toggle p {
  margin-bottom: 0 !important;
}

.lang-button {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.lang-button:hover {
  background: var(--color-bg-secondary);
  color: var(--color-text);
}

.lang-button.active {
  background: var(--color-bg);
  color: var(--color-text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  font-weight: 600;
}

/* 다이내믹 콘텐츠 컨테이너 */
#dynamic-content {
  opacity: 1;
  transition: opacity 0.3s ease;
}

#dynamic-content.fade-out {
  opacity: 0;
}

/* 언어별 콘텐츠 섹션 */
.multilang-section {
  display: block;
  animation: fadeIn 0.3s ease;
}

.multilang-section.hidden {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 기능 리스트 스타일 */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.feature-item {
  padding: 1.5rem;
  background: var(--color-bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--color-border-light);
  transition: all 0.2s ease;
}

.feature-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.feature-title {
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.feature-title::before {
  content: "✨";
  font-size: 1.2em;
}

.feature-desc {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* 단계별 가이드 스타일 */
.step-section {
  margin: 3rem 0;
  padding: 2rem;
  background: var(--color-bg-secondary);
  border-radius: 16px;
  border: 1px solid var(--color-border-light);
}

.step-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.step-number {
  background: var(--color-primary);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 600;
}

.step-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.step-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border-light);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.step-item:last-child {
  border-bottom: none;
}

.step-bullet {
  background: var(--color-primary);
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  flex-shrink: 0;
  margin-top: 2px;
}

.step-text {
  color: var(--color-text);
  line-height: 1.6;
  flex: 1;
}

/* 설치 링크 스타일 */
.install-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--color-primary);
  color: white !important;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s ease;
  margin: 1rem 0;
}

.install-link:hover {
  background: var(--color-primary-dark, #0066cc);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
  color: white !important;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .language-toggle {
    width: 100%;
    justify-content: center;
    /* height: 20px; */
  }
  
  .lang-button {
    flex: 1;
    text-align: center;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .step-section {
    padding: 1.5rem;
    margin: 2rem 0;
  }
  
  .step-title {
    font-size: 1.2rem;
  }
  
  .step-item {
    flex-direction: column;
    gap: 8px;
  }
  
  .step-bullet {
    align-self: flex-start;
  }
}

/* 다크모드 지원 */
@media (prefers-color-scheme: dark) {
  .language-toggle {
    background: rgba(255, 255, 255, 0.1);
  }
  
  .lang-button.active {
    background: rgba(255, 255, 255, 0.15);
  }
  
  .feature-item {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
  }
  
  .step-section {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
  }
}

/* 애니메이션 효과 */
.fade-transition {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.fade-enter {
  opacity: 0;
  transform: translateY(20px);
}

.fade-enter-active {
  opacity: 1;
  transform: translateY(0);
}

/* 접근성 향상 */
.lang-button:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.install-link:focus {
  outline: 2px solid white;
  outline-offset: 2px;
}

/* 인쇄 스타일 */
@media print {
  .language-toggle {
    display: none;
  }
  
  #dynamic-content {
    opacity: 1 !important;
  }
}

/* 페이지에 대한 추가 스타일 */
.subtitle {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* 기본 콘텐츠와의 간격 조정 */
#dynamic-content {
    margin-top: 2rem;
}

/* 이미지 스타일링 */
.step-section img {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
    cursor: pointer;
}

.step-section img:hover {
    transform: scale(1.02);
}

/* 폴백 콘텐츠 스타일 */
#fallback-content {
    animation: fadeIn 0.3s ease;
}

/* 로딩 인디케이터 */
.loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.loading-indicator::before {
    content: "";
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-border-light);
    border-top: 2px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

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

/* hr 요소 스타일링 */
.multilang-section hr {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--color-border-light), transparent);
    margin: 3rem 0;
}

/* 블록쿼트 스타일 개선 */
.multilang-section blockquote {
    border-left: 4px solid var(--color-primary);
    background: var(--color-bg-secondary);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
}