/* QR 코드 생성기 전용 스타일 */

/* 컨테이너 오버라이드 */
.container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

/* 패널 기본 스타일 */
.panel {
  background: var(--surface);
  border-radius: 20px;
  padding: 2rem;
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-2);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
  border-radius: 20px;
}

.panel:hover::before {
  opacity: 0.03;
}

.panel:hover {
  border-color: var(--primary);
  box-shadow: 0 10px 30px var(--shadow);
}

/* 패널 제목 */
.panel-title {
  font-size: 1.5rem;
  font-weight: 600;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.panel-title span {
  font-size: 1.25rem;
  opacity: 0.8;
}

/* 입력 그룹 */
.input-group {
  margin-bottom: 1.5rem;
}

.input-label {
  display: block;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

/* 입력 필드 */
.input-field,
.select-field {
  width: 100%;
  padding: 0.875rem 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 1rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.input-field:focus,
.select-field:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.input-field::placeholder {
  color: var(--text-muted);
}

/* 파일 입력 */
.file-input {
  width: 100%;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 2px dashed var(--border);
  border-radius: 12px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.file-input:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

.file-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* 타입 버튼들 */
.type-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.type-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.type-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-1);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.type-btn:hover::before {
  opacity: 0.1;
}

.type-btn:hover {
  border-color: var(--primary);
  color: var(--text);
  transform: translateY(-2px);
}

.type-btn.active {
  background: var(--gradient-1);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

.type-btn.active::before {
  opacity: 0;
}

.type-btn span {
  font-size: 1rem;
}

/* 고급 설정 섹션 */
.settings-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.settings-grid {
  display: grid;
  gap: 1.5rem;
}

/* QR 코드 표시 패널 */
.qr-display {
  display: flex;
  flex-direction: column;
  min-height: 500px;
}

/* QR 코드 컨테이너 */
.qr-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  position: relative;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 15px;
  border: 1px solid var(--border);
  min-height: 350px;
}

#qr-code {
  display: none;
}

/* QR 코드 플레이스홀더 */
.qr-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  font-weight: 500;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.02);
  border: 2px dashed var(--border);
  border-radius: 15px;
  min-height: 200px;
  position: relative;
}

.qr-placeholder::before {
  content: '📱';
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* 다운로드 섹션 */
.download-section {
  display: flex;
  gap: 1rem;
  margin-top: auto;
}

.download-btn {
  flex: 1;
  padding: 0.875rem 1.5rem;
  background: var(--gradient-1);
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.download-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;
}

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

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

.download-btn:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
  box-shadow: none;
}

.download-btn:disabled:hover {
  transform: none;
  box-shadow: none;
}

.download-btn:disabled::before {
  display: none;
}

/* 토스트 알림 */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 1rem 2rem;
  color: var(--text);
  z-index: 10001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px var(--shadow);
}

.toast.show {
  opacity: 1;
  visibility: visible;
}

.toast.success {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--surface), rgba(6, 182, 212, 0.1));
}

.toast.error {
  border-color: var(--secondary);
  background: linear-gradient(135deg, var(--surface), rgba(236, 72, 153, 0.1));
}

/* 반응형 디자인 */
@media (max-width: 1024px) {
  .container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .qr-display {
    min-height: 400px;
  }
  
  .qr-container {
    min-height: 300px;
  }
}

@media (max-width: 768px) {
  .panel {
    padding: 1.5rem;
  }
  
  .panel-title {
    font-size: 1.3rem;
  }
  
  .type-buttons {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .settings-grid {
    gap: 1rem;
  }
  
  .download-section {
    flex-direction: column;
  }
  
  .qr-container {
    min-height: 250px;
  }
  
  .qr-placeholder {
    font-size: 1rem;
    padding: 1.5rem;
    min-height: 150px;
  }
  
  .qr-placeholder::before {
    font-size: 2.5rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
    gap: 1.5rem;
  }
  
  .panel {
    padding: 1rem;
  }
  
  .panel-title {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
  }
  
  .type-buttons {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .type-btn {
    padding: 0.75rem;
    font-size: 0.85rem;
  }
  
  .input-field,
  .select-field {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
  
  .download-btn {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
  
  .qr-container {
    min-height: 200px;
  }
  
  .qr-placeholder {
    font-size: 0.9rem;
    padding: 1rem;
    min-height: 120px;
  }
  
  .qr-placeholder::before {
    font-size: 2rem;
    margin-bottom: 0.5rem;
  }
  
  .toast {
    bottom: 1rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }
}

/* 다크 모드 호환성 개선 */
@media (prefers-color-scheme: dark) {
  .input-field,
  .select-field {
    background: rgba(255, 255, 255, 0.03);
  }
  
  .file-input {
    background: rgba(255, 255, 255, 0.03);
  }
  
  .qr-container {
    background: rgba(255, 255, 255, 0.01);
  }
}

/* 접근성 개선 */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 고해상도 디스플레이 대응 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .qr-placeholder::before {
    transform: scale(0.8);
  }
}