/* 
   Color Blindness Simulator - styles.css
   Designed with Premium Glassmorphism & Sleek Slate Dark Theme
   ================================================================== */

:root {
  --bg-dark: #0f172a;
  --surface-dark: rgba(30, 41, 59, 0.7);
  --border-light: rgba(255, 255, 255, 0.08);
  --primary: #38bdf8;
  --primary-hover: #0ea5e9;
  --accent: #f43f5e;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --glass-blur: 12px;
}

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

body {
  font-family: 'Noto Sans KR', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* 메인 레이아웃 컨테이너 */
.app-container {
  max-width: 1200px;
  width: 92%;
  margin: 40px auto;
  flex: 1;
}

/* Glassmorphism 카드 공통 스타일 */
.glass-panel {
  background: var(--surface-dark);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 30px;
  box-shadow: var(--glass-shadow);
  margin-bottom: 30px;
}

/* 헤더 & 네비게이션 */
.header-section {
  text-align: center;
  margin-bottom: 40px;
}

.header-section h1 {
  font-size: 2.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, #f8fafc 30%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
}

.header-section p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* 1. 컨트롤 패널 (색맹 유형 선택 탭) */
.type-selector-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 25px;
}

.tab-btn {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 14px 10px;
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
}

.tab-btn:hover {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.3);
  color: var(--text-main);
}

.tab-btn.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(56, 189, 248, 0.05));
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.15);
}

.tab-btn .badge-lock {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 0.8rem;
  opacity: 0.7;
}

.tab-desc {
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.8;
}

/* 강도 슬라이더 디자인 */
.severity-control-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: rgba(15, 23, 42, 0.3);
  padding: 16px 24px;
  border-radius: 14px;
  border: 1px solid var(--border-light);
  margin-bottom: 20px;
}

.severity-slider-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 1;
}

.severity-slider-wrapper span {
  font-size: 0.9rem;
  color: var(--text-muted);
  width: 45px;
}

input[type="range"].severity-range {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #334155;
  outline: none;
}

input[type="range"].severity-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  transition: transform 0.1s ease;
}

input[type="range"].severity-range::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* 2. 작업 스크린 (업로드 / 실시간 슬라이더 영역) */
.workspace-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

/* 드롭존 */
.dropzone {
  border: 2px dashed rgba(56, 189, 248, 0.3);
  border-radius: 16px;
  padding: 50px 30px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(15, 23, 42, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--primary);
  background: rgba(56, 189, 248, 0.05);
}

.dropzone-icon {
  font-size: 3rem;
  color: var(--primary);
}

.dropzone p {
  font-size: 1rem;
  color: var(--text-muted);
}

.btn-upload-file {
  background: var(--primary);
  color: #0f172a;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-upload-file:hover {
  background: var(--primary-hover);
}

/* Before/After 분할 이미지 슬라이더 */
.slider-viewport {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--glass-shadow);
  border: 1px solid var(--border-light);
  aspect-ratio: 16/10;
  display: none; /* 파일 업로드 완료 시 기동 */
}

/* 배경 격자무늬 패턴 */
.slider-viewport::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: linear-gradient(45deg, #1e293b 25%, transparent 25%),
                    linear-gradient(-45deg, #1e293b 25%, transparent 25%),
                    linear-gradient(45deg, transparent 75%, #1e293b 75%),
                    linear-gradient(-45deg, transparent 75%, #1e293b 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  z-index: 1;
}

.slider-image {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 2;
}

.slider-after-container {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  clip-path: inset(0 0 0 50%); /* 우측 절반 자르기 */
}

/* 슬라이더 바 컨트롤러 */
.slider-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: var(--text-main);
  z-index: 4;
  cursor: ew-resize;
  transform: translateX(-50%);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.slider-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--text-main);
  border: 4px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  cursor: ew-resize;
  transition: background 0.2s, border-color 0.2s;
  color: #0f172a;
  font-size: 1.2rem;
}

.slider-divider:hover .slider-handle,
.slider-handle:hover {
  background: var(--primary);
  border-color: var(--text-main);
  color: var(--text-main);
}

/* 비디오 뷰포트 (웹캠 용) */
.webcam-viewport {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  display: none;
}

.webcam-video {
  display: none; /* 메모리 캡처용으로 숨김 */
}

.webcam-canvas {
  width: 100%;
  height: auto;
  border-radius: 16px;
  display: block;
}

/* 워터마크 안내 마크업 */
.watermark {
  position: absolute;
  bottom: 15px;
  right: 15px;
  background: rgba(15, 23, 42, 0.7);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  color: #38bdf8;
  font-weight: 700;
  border: 1px solid rgba(56, 189, 248, 0.3);
  z-index: 5;
  pointer-events: none;
}

/* 3. 하단 액션 툴바 */
.toolbar-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 25px;
}

.btn-group {
  display: flex;
  gap: 10px;
}

.btn-secondary {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-main);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 12px 22px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-secondary:hover {
  background: rgba(148, 163, 184, 0.2);
}

.btn-premium-action {
  background: linear-gradient(135deg, var(--accent), #e11d48);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 22px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-premium-action:hover {
  box-shadow: 0 0 15px rgba(244, 63, 94, 0.4);
  transform: translateY(-1px);
}

/* 4. 유료 잠금 팝업 모달 */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: #1e293b;
  border: 1px solid var(--border-light);
  border-radius: 24px;
  width: 90%;
  max-width: 500px;
  padding: 40px 30px;
  text-align: center;
  box-shadow: var(--glass-shadow);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.btn-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-icon-crown {
  font-size: 4rem;
  color: #fbbf24;
  margin-bottom: 20px;
  animation: float 3s ease-in-out infinite;
}

.modal-content h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.modal-content p {
  color: var(--text-muted);
  margin-bottom: 25px;
  line-height: 1.6;
}

.feature-benefits-list {
  text-align: left;
  background: rgba(15, 23, 42, 0.3);
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 30px;
  border: 1px solid var(--border-light);
}

.feature-benefit-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.feature-benefit-item:last-child {
  margin-bottom: 0;
}

.feature-benefit-item i {
  color: var(--primary);
}

.modal-action-btns {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-buy-now {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #0f172a;
  border: none;
  border-radius: 10px;
  padding: 14px 20px;
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-buy-now:hover {
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

.btn-watch-ad {
  background: rgba(56, 189, 248, 0.1);
  color: var(--primary);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 10px;
  padding: 12px 20px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-watch-ad:hover {
  background: rgba(56, 189, 248, 0.2);
}

/* 5. 가짜 인터스티셜 (전면) 광고 팝업 */
.ad-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #0b0f19;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.ad-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.ad-card-frame {
  width: 90%;
  max-width: 450px;
  background: white;
  color: #334155;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  position: relative;
  display: flex;
  flex-direction: column;
}

.ad-close-countdown {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  z-index: 10;
}

.ad-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #f43f5e;
  color: white;
  border: none;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  z-index: 10;
  display: none;
}

.ad-close-btn:hover {
  background: #e11d48;
}

.ad-banner-header {
  background: #f8fafc;
  padding: 12px 20px;
  font-size: 0.75rem;
  color: #94a3b8;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #e2e8f0;
}

.ad-banner-body {
  padding: 30px;
  text-align: center;
}

.ad-sponsor-logo {
  font-size: 3rem;
  color: #3b82f6;
  margin-bottom: 15px;
}

.ad-banner-body h4 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 8px;
}

.ad-banner-body p {
  font-size: 0.9rem;
  color: #64748b;
  margin-bottom: 25px;
}

/* 광고 스피너 */
.ad-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

.ad-banner-footer {
  padding: 20px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  text-align: center;
}

.btn-ad-action {
  width: 100%;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-ad-action:hover {
  background: #2563eb;
}

/* 키프레임 애니메이션 */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}

/* 토스트 알림 */
.toast-msg {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-light);
  border-radius: 30px;
  padding: 10px 24px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--glass-shadow);
  z-index: 500;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-msg.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* 반응형 모바일 브레이크포인트 */
@media (max-width: 768px) {
  .header-section h1 {
    font-size: 2rem;
  }
  .glass-panel {
    padding: 20px;
  }
  .type-selector-tabs {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =====================================================
   신규 콘텐츠 섹션 추가 스타일
   ===================================================== */

/* 상단 네비게이션 */
.top-nav {
  margin-bottom: 24px;
}

.back-link {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.2s;
}

.back-link:hover {
  opacity: 0.8;
}

/* 헤더 강화 */
.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--primary);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

.header-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 12px !important;
  letter-spacing: 0.08em;
}

.header-desc {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.8;
  max-width: 700px;
  margin: 0 auto 28px !important;
}

.header-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  padding: 20px 30px;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  max-width: 560px;
  margin: 0 auto;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-num {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary);
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border-light);
}

/* 섹션 공통 */
.content-section {
  margin-bottom: 30px;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
}

.section-title i {
  color: var(--primary);
}

.section-intro {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 28px;
  font-size: 0.97rem;
}

/* 도구 패널 */
.tool-panel {
  border-top: 3px solid var(--primary);
}

/* 탭 아이콘 */
.tab-icon {
  font-size: 1.2rem;
  margin-bottom: 2px;
}

/* 강도 슬라이더 레이블 */
.severity-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
  flex-shrink: 0;
}

.severity-label i {
  color: var(--primary);
}

.severity-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* 슬라이더 뷰포트 레이블 */
.slider-label {
  position: absolute;
  bottom: 12px;
  background: rgba(15, 23, 42, 0.8);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  z-index: 5;
  pointer-events: none;
  border: 1px solid var(--border-light);
}

.left-label {
  left: 12px;
}

.right-label {
  right: 12px;
}

/* 드롭존 강화 */
.dropzone-title {
  font-size: 1.05rem;
  color: var(--text-main);
  font-weight: 600;
  margin-bottom: 6px !important;
}

.dropzone-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0 !important;
}

/* 광고 자리 */
.ad-placeholder {
  margin-bottom: 30px;
  border-radius: 12px;
  overflow: hidden;
  min-height: 90px;
  background: rgba(30, 41, 59, 0.3);
  border: 1px dashed rgba(255, 255, 255, 0.06);
}

/* ===== 색각 이상 유형 카드 ===== */
.type-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.type-card {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.type-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.type-card-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.3rem;
}

.type-card-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
}

.deuteranopia-color { background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.05)); border-bottom: 2px solid #10b981; color: #10b981; }
.protanopia-color { background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.05)); border-bottom: 2px solid #ef4444; color: #ef4444; }
.tritanopia-color { background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(99, 102, 241, 0.05)); border-bottom: 2px solid #6366f1; color: #6366f1; }
.deuteranomaly-color { background: linear-gradient(135deg, rgba(163, 230, 53, 0.2), rgba(163, 230, 53, 0.05)); border-bottom: 2px solid #a3e635; color: #a3e635; }
.protanomaly-color { background: linear-gradient(135deg, rgba(251, 146, 60, 0.2), rgba(251, 146, 60, 0.05)); border-bottom: 2px solid #fb923c; color: #fb923c; }

.type-card-body {
  padding: 18px 20px;
}

.type-card-body p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 14px;
}

.type-card-detail {
  background: rgba(15, 23, 42, 0.4);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  gap: 8px;
}

.detail-label {
  color: var(--text-muted);
  flex-shrink: 0;
}

.detail-value {
  color: var(--text-main);
  font-weight: 600;
  text-align: right;
}

/* ===== 2열 레이아웃 ===== */
.two-col-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.col-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 14px;
}

.col-content p {
  color: var(--text-muted);
  font-size: 0.93rem;
  line-height: 1.8;
  margin-bottom: 14px;
}

/* ===== 통계 바 ===== */
.stats-visual {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stat-bar-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-bar-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.stat-bar-track {
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  height: 8px;
  overflow: visible;
  position: relative;
}

.stat-bar-fill {
  height: 100%;
  border-radius: 4px;
  min-width: 6px;
}

.stat-bar-val {
  font-size: 0.82rem;
  color: var(--text-main);
  font-weight: 700;
}

/* ===== 원인 리스트 ===== */
.cause-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cause-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.cause-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
  font-size: 1.1rem;
}

.cause-item h4 {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 5px;
  color: var(--text-main);
}

.cause-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
}

/* ===== 일상 경험 카드 ===== */
.daily-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.daily-card {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 20px;
  transition: transform 0.2s;
}

.daily-card:hover {
  transform: translateY(-2px);
}

.daily-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 14px;
}

.daily-icon.traffic { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.daily-icon.food { background: rgba(163, 230, 53, 0.15); color: #a3e635; }
.daily-icon.chart { background: rgba(56, 189, 248, 0.15); color: var(--primary); }
.daily-icon.fashion { background: rgba(251, 146, 60, 0.15); color: #fb923c; }
.daily-icon.work { background: rgba(99, 102, 241, 0.15); color: #6366f1; }
.daily-icon.art { background: rgba(244, 63, 94, 0.15); color: var(--accent); }

.daily-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-main);
}

.daily-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
}

/* ===== 가이드 리스트 ===== */
.guide-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

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

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

.guide-number {
  font-size: 2rem;
  font-weight: 900;
  color: rgba(56, 189, 248, 0.25);
  flex-shrink: 0;
  width: 48px;
  line-height: 1;
  padding-top: 2px;
}

.guide-content h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.guide-content p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin: 0;
}

/* ===== 알고리즘 설명 ===== */
.cone-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cone-list li {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-left: 18px;
  position: relative;
  line-height: 1.5;
}

.cone-list li::before {
  content: '•';
  color: var(--primary);
  position: absolute;
  left: 0;
}

.algorithm-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.algo-step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
  color: var(--text-muted);
  background: rgba(15, 23, 42, 0.4);
  padding: 10px 14px;
  border-radius: 10px;
  border-left: 3px solid var(--primary);
}

.step-num {
  width: 24px;
  height: 24px;
  background: var(--primary);
  color: #0f172a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.formula-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 14px 0;
}

.formula-box code {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  color: var(--primary);
}

/* ===== FAQ ===== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.faq-item {
  border-bottom: 1px solid var(--border-light);
}

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

.faq-q {
  padding: 18px 0;
  font-size: 0.97rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: color 0.2s;
}

.faq-q:hover {
  color: var(--primary);
}

.faq-q::after {
  content: '\f078';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: transform 0.3s;
  flex-shrink: 0;
}

details[open] .faq-q::after {
  transform: rotate(180deg);
}

.faq-a {
  padding-bottom: 18px;
}

.faq-a p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin: 0;
}

/* ===== 관련 도구 ===== */
.related-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.related-tool-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 16px;
  text-decoration: none;
  color: var(--text-main);
  transition: all 0.2s;
}

.related-tool-card:hover {
  background: rgba(56, 189, 248, 0.05);
  border-color: rgba(56, 189, 248, 0.25);
  transform: translateY(-2px);
}

.related-tool-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.related-tool-card h3 {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 3px;
}

.related-tool-card p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
}

/* ===== 푸터 ===== */
.site-footer {
  background: rgba(15, 23, 42, 0.8);
  border-top: 1px solid var(--border-light);
  padding: 24px 0;
  margin-top: 20px;
}

.footer-inner {
  max-width: 1200px;
  width: 92%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.site-footer a {
  color: var(--primary);
  text-decoration: none;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--primary);
}

/* ===== 반응형 추가 ===== */
@media (max-width: 900px) {
  .two-col-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .header-stats {
    gap: 20px;
    padding: 16px 20px;
  }
  .stat-divider {
    display: none;
  }
  .guide-item {
    flex-direction: column;
    gap: 10px;
  }
  .guide-number {
    font-size: 1.4rem;
  }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
