/* Analysis Page Styles */

.analysis-page * {
  box-sizing: border-box;
}

.analysis-page {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #fafafa;
  line-height: 1.5;
  margin: 0;
  padding: 0;
}

.app-container {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* 메인 콘텐츠 영역 */
.main-content {
  margin-left: 260px; /* 사이드바 240px + 여백 20px */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: margin-left 0.3s ease;
}

/* 사이드바 collapsed 상태일 때 메인 콘텐츠 조정 */
.sidebar.collapsed ~ .main-content {
  margin-left: 80px; /* 사이드바 60px + 여백 20px */
}

.main-header {
  background: #ffffff;
  border-bottom: 1px solid #e1e5e9;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: between;
  gap: 20px;
}

.breadcrumb {
  flex: 1;
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  color: #8b95a1;
}

.breadcrumb-item.active {
  color: #2d3748;
  font-weight: 600;
}

.breadcrumb-separator {
  margin: 0 8px;
  color: #cbd5e0;
}

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

/* 스크롤 가능한 콘텐츠 영역 */
.content-area {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
}

.content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
}

/* 분석 입력 카드 */
.analysis-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e1e5e9;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 32px;
  overflow: hidden;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
  font-family: inherit;
}

.analysis-submit {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  margin-top: 8px;
}

.analysis-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(90, 103, 216, 0.3);
}

/* 최근 분석 섹션 */
.recent-analyses {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e1e5e9;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.analysis-item {
  display: flex;
  align-items: center;
  justify-content: between;
  padding: 20px 32px;
  border-bottom: 1px solid #f7f9fc;
  transition: all 0.2s;
}

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

.analysis-item:hover {
  background: #fafbfc;
}

.analysis-info {
  flex: 1;
}

.analysis-company {
  font-size: 16px;
  font-weight: 600;
  color: #2d3748;
  margin: 0 0 4px 0;
}

.analysis-meta {
  font-size: 14px;
  color: #8b95a1;
  margin: 0;
}

.analysis-status {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-completed {
  background: #c6f6d5;
  color: #276749;
}

.status-processing {
  background: #bee3f8;
  color: #2c5282;
}

.status-pending {
  background: #ffeaa7;
  color: #744210;
}

/* 메인 타이틀 섹션 */
.main-title-section {
  text-align: center;
  margin-bottom: 32px;
}

.main-title {
  font-size: 48px;
  font-weight: 700;
  color: #1a202c;
  margin: 0;
  line-height: 1.2;
}

/* 카드 바디 중앙 정렬 */
.card-body-centered {
  padding: 48px 32px;
  text-align: center;
}

/* URL 입력 컨테이너 */
.url-input-container {
  max-width: 800px;
  margin: 0 auto;
}

.input-wrapper {
  position: relative;
  background: #ffffff;
  border: 3px solid #a7f3d0;
  border-radius: 16px;
  padding: 16px 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.url-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  background: transparent;
  color: #2d3748;
}

.url-input::placeholder {
  color: #a0aec0;
}

.input-actions {
  display: flex;
  gap: 12px;
}

.input-btn {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
  color: #718096;
}

.input-btn:hover {
  background: #f7fafc;
  color: #2d3748;
}

.input-icon {
  width: 20px;
  height: 20px;
}

/* 폼 컨트롤 */
.form-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

/* 고급 모델 토글 */
.advanced-model-toggle {
  display: flex;
  align-items: center;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
  color: #4a5568;
}

.toggle-switch {
  position: relative;
  width: 48px;
  height: 24px;
}

.toggle-input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #e2e8f0;
  transition: 0.3s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-input:checked + .toggle-slider {
  background-color: #48bb78;
}

.toggle-input:checked + .toggle-slider:before {
  transform: translateX(24px);
}

/* 요약 버튼 */
.summarize-btn {
  background: #48bb78;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.summarize-btn:hover {
  background: #38a169;
  transform: translateX(2px);
}

.btn-icon {
  width: 16px;
  height: 16px;
}

/* Agent 소개 섹션 */
.agent-intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  border-radius: 16px;
  padding: 24px 32px;
  margin: 32px auto;
  max-width: 800px;
  border: 1px solid #e2e8f0;
}

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

.agent-avatar {
  font-size: 24px;
}

.agent-name {
  font-size: 18px;
  font-weight: 600;
  color: #2d3748;
  margin: 0 0 4px 0;
}

.agent-description {
  font-size: 14px;
  color: #718096;
  margin: 0;
}

.pagination-info {
  color: #a0aec0;
  font-size: 14px;
}

/* 콘텐츠 타입 버튼들 */
.content-types {
  max-width: 800px;;
  margin: 32px auto;
}

.example-label {
  font-size: 14px;
  color: #718096;
  margin-bottom: 12px;
  text-align: center;
}

.content-type-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 16px;
}

.additional-types {
  display: flex;
  justify-content: center;
}

.content-type-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-size: 14px;
  color: #4a5568;
  cursor: pointer;
  transition: all 0.2s;
}

.content-type-btn:hover {
  background: #edf2f7;
  border-color: #cbd5e0;
}

.content-icon {
  width: 18px;
  height: 18px;
}

.content-icon.small {
  width: 14px;
  height: 14px;
}

.multi-icon {
  display: flex;
  gap: 2px;
}

/* 브래드크럼 및 헤더 업데이트 */
.breadcrumb-item {
  display: none;
}

.main-header {
  justify-content: flex-start;
}

.header-actions {
  margin-left: auto;
}

.add-knowledge-btn {
  background: #f7fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #718096;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.add-knowledge-btn:hover {
  background: #edf2f7 !important;
  color: #4a5568;
}

/* 반응형 디자인 */
@media (max-width: 1024px) {
  .main-content {
    margin-left: 0;
  }
  
  .content-area {
    padding: 20px;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .card-body {
    padding: 20px;
  }
  
  .main-header {
    padding: 16px 20px;
  }
}