/* ------------------------------------
    공통 스타일 (모든 페이지에 적용)
   ------------------------------------ */

/* --- 기본 리셋 및 Body --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #fef7ed;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  color: #374151;
}

/* --- 헤더 --- */
.header {
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 30px;
  margin: 0;
  padding: 0;
}

.nav-menu li {
  display: block;
}

.nav-menu a {
  text-decoration: none;
  color: #374151;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-menu a:hover {
  color: #f59e0b;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: bold;
  color: #f59e0b;
  text-decoration: none;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  background: #f59e0b;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: white;
}

.logout-btn {
  background: #ef4444;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s ease;
}

.logout-btn:hover {
  background: #dc2626;
}

/* --- 메인 컨텐츠 --- */
.main {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 20px;
  flex-grow: 1;
}

.page-header {
  text-align: center;
  margin-bottom: 40px;
}

.page-header h1 {
  font-size: 36px;
  color: #1f2937;
}

/* --- 푸터 --- */
.footer {
  background: white;
  border-top: 1px solid #e5e7eb;
  padding: 40px 0;
  margin-top: 60px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}

.footer-content p {
  color: #6b7280;
  margin-bottom: 10px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.footer-links a {
  color: #f59e0b;
  text-decoration: none;
  font-size: 14px;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* --- 챗봇 --- */
.chatbot-toggler {
  position: fixed;
  bottom: 30px;
  right: 35px;
  width: 60px;
  height: 60px;
  background: #f59e0b;
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
  z-index: 1000;
}

.chatbot-toggler:hover {
  transform: scale(1.1);
}

.chatbot-container {
  position: fixed;
  bottom: 100px;
  right: 35px;
  width: 350px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 0 128px 0 rgba(0, 0, 0, 0.1), 0 32px 64px -48px rgba(0, 0, 0, 0.5);
  transform: scale(0.5);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  transform-origin: bottom right;
  z-index: 1000;
}

.chatbot-container.show {
  transform: scale(1);
  opacity: 1;
  pointer-events: auto;
}

.chatbot-header {
  background: #f59e0b;
  color: white;
  padding: 16px 20px;
  text-align: center;
  border-radius: 15px 15px 0 0;
  position: relative;
}

.chatbot-header h2 {
  font-size: 1.4rem;
}

.chatbot-close-btn {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

.chatbox {
  height: 350px;
  overflow-y: auto;
  padding: 20px;
}

.chat {
  display: flex;
  margin-bottom: 15px;
}

.chat p {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 0.95rem;
  word-wrap: break-word;
}

.chat.outgoing {
  justify-content: flex-end;
}

.chat.outgoing p {
  background: #f59e0b;
  color: white;
  border-radius: 18px 18px 0 18px;
}

.chat.incoming p {
  background: #f3f4f6;
  color: #374151;
  border-radius: 18px 18px 18px 0;
}

.chat-input {
  display: flex;
  gap: 5px;
  padding: 10px 20px;
  border-top: 1px solid #e5e7eb;
}

.chat-input textarea {
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  padding: 12px 15px;
  font-size: 0.95rem;
  border-radius: 6px;
  background: #f3f4f6;
}

.chat-input button {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #f59e0b;
}
