/* 한국어 폰트 및 변수 */
:root {
  --primary-yellow-light: #fbbf24;
  --primary-yellow-medium: #f59e0b;
  --primary-yellow-dark: #d97706;
  --gold-color: #d4af37;
  --background-image: url('../images/dtk-background.jpg');
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  --card-radius: 16px;
  --text-dark: #1f2937;
  --text-light: #374151;
  --white: #ffffff;
}

/* 기본 스타일 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--background-image);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  min-height: 100vh;
  color: var(--text-dark);
  line-height: 1.6;
}

/* 메인 컨테이너 */
.main-container {
  min-height: 100vh;
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

/* 헤더 */
.header {
  margin-bottom: 40px;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(254, 243, 199, 0.95);
  padding: 16px 24px;
  border-radius: var(--card-radius);
  backdrop-filter: blur(10px);
  box-shadow: var(--card-shadow);
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 15px;
}

.company-logo {
  height: 35px;
  width: auto;
  filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.1));
}

.expert-badge {
  background: linear-gradient(135deg, var(--primary-yellow-light), var(--primary-yellow-medium));
  color: var(--text-dark);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
}

.settings-icon {
  font-size: 24px;
  cursor: pointer;
  transition: transform 0.3s ease;
  padding: 8px;
  border-radius: 50%;
  background: rgba(251, 191, 36, 0.1);
}

.settings-icon:hover {
  transform: rotate(180deg);
  background: rgba(251, 191, 36, 0.2);
}

/* 히어로 섹션 */
.hero-section {
  margin-bottom: 40px;
  text-align: center;
}

.hero-card {
  background: rgba(251, 191, 36, 0.15);
  padding: 40px;
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-yellow-light), var(--primary-yellow-medium), var(--primary-yellow-dark));
}

.hero-icon {
  margin-bottom: 20px;
}

.hero-logo {
  height: 45px;
  width: auto;
  filter: drop-shadow(2px 2px 8px rgba(0,0,0,0.1));
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 15px;
  background: linear-gradient(135deg, var(--primary-yellow-light), var(--primary-yellow-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-light);
  margin-bottom: 25px;
}

.expert-info {
  background: rgba(251, 191, 36, 0.1);
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 25px;
  border-left: 4px solid var(--primary-yellow-medium);
}

.expert-name {
  font-weight: 700;
  color: var(--primary-yellow-dark);
  margin-bottom: 5px;
}

.expert-title {
  font-size: 14px;
  color: var(--text-light);
}

/* 주제 입력 섹션 */
.topic-input-section {
  background: rgba(251, 191, 36, 0.12);
  padding: 30px;
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  margin-bottom: 40px;
  text-align: center;
  backdrop-filter: blur(10px);
}

.topic-input-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 15px;
}

.topic-input-description {
  color: var(--text-light);
  margin-bottom: 25px;
}

.topic-form {
  display: flex;
  gap: 15px;
  max-width: 600px;
  margin: 0 auto;
}

.topic-input {
  flex: 1;
  padding: 16px 20px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
  transition: all 0.3s ease;
}

.topic-input:focus {
  outline: none;
  border-color: var(--primary-yellow-medium);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.generate-btn {
  background: linear-gradient(135deg, var(--primary-yellow-medium), var(--primary-yellow-dark));
  color: white;
  border: none;
  padding: 16px 30px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.generate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.3);
}

.generate-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* 기법 선택 섹션 */
.methods-section {
  margin-bottom: 40px;
}

.methods-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.method-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--card-radius);
  padding: 24px;
  box-shadow: var(--card-shadow);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 3px solid transparent;
  position: relative;
  backdrop-filter: blur(8px);
}

.method-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.method-card.active {
  border-color: var(--primary-yellow-medium);
  background: rgba(251, 191, 36, 0.05);
}

.method-icon {
  font-size: 36px;
  margin-bottom: 16px;
  display: block;
}

.method-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.method-description {
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.6;
}

.method-checkbox {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 20px;
  height: 20px;
  border: 2px solid #e5e7eb;
  border-radius: 4px;
  background: white;
  transition: all 0.3s ease;
}

.method-card.active .method-checkbox {
  background: var(--primary-yellow-medium);
  border-color: var(--primary-yellow-medium);
}

.method-card.active .method-checkbox::after {
  content: '✓';
  color: white;
  font-size: 14px;
  font-weight: bold;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* 결과 섹션 */
.results-section {
  display: none;
}

.results-container {
  display: grid;
  gap: 30px;
}

.result-card {
  background: rgba(255, 255, 255, 0.75);
  border-radius: var(--card-radius);
  padding: 30px;
  box-shadow: var(--card-shadow);
  border-top: 4px solid var(--primary-yellow-medium);
  backdrop-filter: blur(10px);
}

/* 5개 박스가 점점 농도가 짙어지도록 */
.result-card:nth-child(1) {
  background: rgba(255, 255, 255, 0.85);
}

.result-card:nth-child(2) {
  background: rgba(255, 255, 255, 0.75);
}

.result-card:nth-child(3) {
  background: rgba(255, 255, 255, 0.65);
}

.result-card:nth-child(4) {
  background: rgba(255, 255, 255, 0.55);
}

.result-card:nth-child(5) {
  background: rgba(255, 255, 255, 0.45);
}

.result-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.result-icon {
  font-size: 32px;
}

.result-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-dark);
}

.result-content {
  background: rgba(251, 191, 36, 0.08);
  padding: 20px;
  border-radius: 12px;
  border-left: 4px solid var(--primary-yellow-light);
}

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

.idea-item {
  background: white;
  padding: 16px 20px;
  margin-bottom: 12px;
  border-radius: 10px;
  border-left: 3px solid var(--primary-yellow-medium);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  font-size: 15px;
  line-height: 1.5;
  transition: all 0.3s ease;
}

.idea-item:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

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

/* 푸터 */
.footer {
  text-align: center;
  background: rgba(255, 255, 255, 0.95);
  padding: 30px;
  border-radius: var(--card-radius);
  backdrop-filter: blur(10px);
  margin-top: 60px;
  box-shadow: var(--card-shadow);
}

.footer-expert {
  font-weight: 700;
  color: var(--primary-yellow-dark);
  margin-bottom: 8px;
}

.footer-description {
  color: var(--text-light);
  font-size: 14px;
  margin-bottom: 20px;
}

.footer-copyright {
  border-top: 1px solid rgba(251, 191, 36, 0.2);
  padding-top: 20px;
  margin-top: 20px;
}

.footer-copyright p {
  color: var(--text-light);
  font-size: 12px;
  margin-bottom: 4px;
}

.footer-copyright p:first-child {
  font-weight: 600;
  color: var(--primary-yellow-dark);
}

/* 헤더 회사 정보 스타일 */
.company-info {
  margin-left: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.company-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.instructor-info {
  font-size: 12px;
  color: var(--text-light);
  font-weight: 500;
}

/* 푸터 강사 정보 스타일 */
.footer-instructor {
  color: var(--primary-yellow-dark);
  font-size: 14px;
  font-weight: 600;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(251, 191, 36, 0.3);
}

/* 로딩 애니메이션 */
.loading {
  display: none;
  text-align: center;
  padding: 40px;
}

.loading-spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--primary-yellow-medium);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

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

.loading-text {
  color: var(--text-light);
  font-style: italic;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .main-container {
    padding: 16px;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .topic-form {
    flex-direction: column;
  }
  
  .methods-container {
    grid-template-columns: 1fr;
  }
  
  .method-card {
    padding: 20px;
  }
  
  .header-content {
    padding: 12px 20px;
  }
  
  .expert-badge {
    font-size: 11px;
    padding: 4px 8px;
  }
}

@media (max-width: 480px) {
  .hero-card {
    padding: 30px 20px;
  }
  
  .topic-input-section {
    padding: 20px;
  }
  
  .method-card {
    padding: 16px;
  }
  
  .result-card {
    padding: 20px;
  }
}

/* 모달 스타일 */
.modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: var(--white);
  padding: 40px;
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  width: 90%;
  max-width: 500px;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-content h2 {
  color: var(--text-dark);
  margin-bottom: 15px;
  font-size: 24px;
  text-align: center;
}

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

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-dark);
}

.form-group input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-yellow-medium);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.submit-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--primary-yellow-medium), var(--primary-yellow-dark));
  color: white;
  border: none;
  padding: 16px 20px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.3);
}

.skip-btn {
  width: 100%;
  background: transparent;
  color: var(--text-light);
  border: 2px solid #e5e7eb;
  padding: 14px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 12px;
}

.skip-btn:hover {
  border-color: var(--primary-yellow-medium);
  color: var(--primary-yellow-dark);
  background: rgba(245, 158, 11, 0.05);
}

@media (max-width: 768px) {
  .modal-content {
    padding: 30px 20px;
  }
}

/* 추가 폼 스타일 */
.form-group small {
  display: block;
  color: var(--text-light);
  font-size: 12px;
  margin-top: 5px;
  font-style: italic;
}

.button-group {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.cancel-btn {
  flex: 1;
  background: transparent;
  color: var(--text-light);
  border: 2px solid #e5e7eb;
  padding: 16px 20px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cancel-btn:hover {
  border-color: var(--primary-yellow-medium);
  color: var(--primary-yellow-dark);
  background: rgba(245, 158, 11, 0.05);
}