#simplemodal-overlay {background-color:#000;}
#modal_content{top:0px; width:98%;display:none;margin:50px auto;background:#ffffff;}

/* 버튼 스타일 */
.btn-primary {
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background-color: #2563eb;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-primary:hover {
  background-color: #1d4ed8;
}

/* 모달 배경 (Overlay) */
.modal-overlay {
  display: none; /* 기본 숨김 */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  /*z-index: 1000;*/
  z-index: 99999;
  justify-content: center;
  align-items: center;
  padding: 20px;

}

.modal-overlay.active {
  display: flex; /* active 클래스 추가 시 표시 */
}

/* 모달 창 */
.modal-window {
  background-color: #fff;
  width: 100%;
  max-width: 1000px;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalFadeIn 0.25s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 모달 헤더 */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #002168;
  margin-bottom: 0;
}

.close-btn {
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: #6b7280;
  cursor: pointer;
}

.close-btn:hover {
  color: #111827;
}

/* 모달 바디 (스크롤 영역) */
.modal-body {
  /*padding: 24px;*/
  padding: 54px; 
  overflow-y: auto;
  flex: 1;
}

/* 게시판 상단 검색 및 카운트 */
.board-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.total-count {
  font-size: 14px;
  color: #4b5563;
}

.total-count strong {
  color: #2563eb;
}

.search-box {
  display: flex;
  gap: 6px;
}

.search-box input {
  padding: 7px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
}

.search-box input:focus {
  border-color: #2563eb;
}

.search-box button {
  padding: 7px 14px;
  background-color: #374151;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}

.search-box button:hover {
  background-color: #1f2937;
}

/* 게시판 테이블 */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.board-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  font-size: 14px;
  border-top: 2px solid #1f2937;
}

.board-table th {
  background-color: #f9fafb;
  padding: 12px 8px;
  font-weight: 600;
  color: #374151;
  border-bottom: 1px solid #e5e7eb;
}

.board-table td {
  padding: 12px 8px;
  border-bottom: 1px solid #e5e7eb;
  color: #4b5563;
}

.board-table tbody tr:hover {
  background-color: #f3f4f6;
}

/* 컬럼 너비 설정 */
.col-num { width: 60px; }
.col-title { width: auto; }
.col-author { width: 100px; }
.col-date { width: 110px; }
.col-views { width: 60px; }

/* 제목 셀 왼쪽 정렬 및 말줄임표 */
.title-cell {
  text-align: left;
  max-width: 350px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.title-cell a {
  text-decoration: none;
  color: #111827;
  font-weight: 500;
}

.title-cell a:hover {
  text-decoration: underline;
  color: #2563eb;
}

.badge-notice {
  display: inline-block;
  padding: 2px 6px;
  font-size: 12px;
  font-weight: 600;
  color: #dc2626;
  background-color: #fee2e2;
  border-radius: 4px;
}

.comment-cnt {
  color: #2563eb;
  font-size: 12px;
  font-weight: 600;
  margin-left: 4px;
}

/* 페이지네이션 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
}

.page-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  text-decoration: none;
  color: #374151;
  font-size: 14px;
}

.page-link:hover {
  background-color: #f3f4f6;
}

.page-link.active {
  background-color: #2563eb;
  color: #fff;
  border-color: #2563eb;
  font-weight: 600;
}

/* 모달 푸터 */
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 24px;
  background-color: #f9fafb;
  border-top: 1px solid #e5e7eb;
}

.btn-write {
  padding: 8px 16px;
  background-color: #2563eb;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.btn-write:hover {
  background-color: #1d4ed8;
}

.btn-secondary {
  padding: 8px 16px;
  background-color: #e5e7eb;
  color: #374151;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.btn-secondary:hover {
  background-color: #d1d5db;
}

/* 모바일 반응형 처리 */
@media (max-width: 640px) {
  .col-author, .col-views,
  .board-table td:nth-child(3),
  .board-table td:nth-child(5) {
    display: none; /* 모바일에서는 작성자, 조회수 숨김 */
  }
}



/****/
/* 전체 컨테이너 */
.write-container {
  max-width: 800px;
  margin: 0 auto;
  background-color: #ffffff;
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.write-container h2 {
  font-size: 24px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
}

.write-desc {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 30px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 16px;
}



/* 상단 배너 섹션 */
.story-banner {
  text-align: center;
  background: linear-gradient(135deg, #f0fdf4 0%, #eff6ff 100%);
  padding: 20px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  margin-bottom: 20px;
}

.banner-badge {
  display: inline-block;
  background-color: #2563eb;
  color: #fff;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 500;
  margin-bottom: 6px;
}

.story-banner h3 {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
}

.banner-desc {
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
}

.banner-desc strong {
  color: #2563eb;
}


/* 이벤트 및 상품 정보 박스 */
.event-info-box {
  background-color: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 25px;
}

.period-badge {
  display: flex;
  justify-content: space-around;
  font-weight: 600;
  color: #b91c1c;
  font-size: 14px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #cbd5e1;
  margin-bottom: 12px;
}

.prize-info h4 {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
}

.prize-info ul {
  list-style: none;
  padding-left: 0;
  font-size: 14px;
  color: #475569;
  line-height: 1.6;
}

.notice-text {
  margin-top: 10px;
  font-size: 14px;
  color: #2563eb;
  font-weight: 600;
}


/* 폼 그룹 공통 */
.form-group {
  margin-bottom: 20px;
  border-bottom: 1px solid #eeeeee;
  padding-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 16px;
  font-weight: 800;
  color: #001f4b;
  margin-bottom: 8px;
}


.form-label span {
  font-weight: 400;
  color: #64748b;
  font-size: 12px;
  margin-left: 4px;
}

/* 입력 필드 공통 */
.form-input, .form-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background-color: #f8fafc;
}

.form-input:focus, .form-textarea:focus {
  border-color: #2563eb;
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-textarea {
  resize: vertical;
}

/* 라디오 버튼 그룹 */
.radio-group {
  display: flex;
  gap: 20px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  color:#334155;

}

.radio-label input[type="radio"] {
  accent-color: #2563eb;
  width: 16px;
  height: 16px;
}

/* 3분할 행 (작성자, 연락처, 비밀번호) */
.form-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

/* 보안문자 영역 디자인 */
.captcha-wrapper {
  display: flex;
  gap: 15px;
  align-items: center;
  background-color: #f8fafc;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}

.captcha-img-box {
  background-color: #334155;
  color: #fff;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 3px;
  user-select: none;
}

.captcha-input-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.captcha-btns {
  display: flex;
  gap: 12px;
}

.captcha-btn {
  font-size: 12px;
  color: #2563eb;
  text-decoration: none;
}

.captcha-btn:hover {
  text-decoration: underline;
}

/* 하단 버튼 영역 */
.form-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
  border-top: 1px solid #e2e8f0;
  padding-top: 20px;
}

.btn-save, .btn-list {
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  transition: background-color 0.2s;
}

.btn-save {
  background-color: #2563eb;
  color: #fff;
}

.btn-save:hover {
  background-color: #1d4ed8;
}

.btn-list {
  background-color: #e2e8f0;
  color: #475569;
}

.btn-list:hover {
  background-color: #cbd5e1;
}



/* 전체 래퍼 */
.captcha-wrap {
  margin-top: 20px;
  font-family: 'Pretendard', 'Malgun Gothic', sans-serif;
}

.captcha-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #333;
  margin-bottom: 8px;
}

/* 외곽 박스 */
.captcha-box {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 20px;
  border: 1px solid #e0e4e8;
  border-radius: 8px;
  background-color: #f9fafb;
}

/* 좌측 영역 (이미지 + 유틸 버튼) */
.captcha-left {
  display: flex;
  flex-direction: column;
  width: 250px;
  flex-shrink: 0;
}

.captcha-img-area {
  width: 100%;
  height: 100px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.captcha-img-area img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.captcha-tools {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.btn-tool {
  flex: 1;
  padding: 6px 0;
  font-size: 12px;
  color: #555;
  background-color: #fff;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-tool:hover {
  background-color: #f1f3f5;
  color: #111;
}

/* 우측 영역 (입력창 + 확인 버튼 + 메시지) */
.captcha-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 4px;
}

.captcha-input-group {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 340px;
}

.captcha-input {
  flex: 1;
  height: 42px;
  padding: 0 12px;
  font-size: 14px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background-color: #fff;
  outline: none;
  transition: border-color 0.2s;
}

.captcha-input:focus {
  border-color: #1a6dff;
}

.btn-captcha-check {
  height: 42px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 600;
  color: #1a6dff;
  background-color: #eef4ff;
  border: 1px solid #b6d0ff;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.btn-captcha-check:hover {
  background-color: #1a6dff;
  color: #fff;
}

/* 상태 메시지 */
.captcha-msg {
  margin: 8px 0 0 2px;
  font-size: 13px;
  font-weight: 500;
}

.captcha-msg.error {
  color: #e03131;
}

.captcha-msg.success {
  color: #2f9e44;
}

/* 모바일 반응형 처리 */
@media (max-width: 600px) {
  .captcha-box {
    flex-direction: column;
    gap: 14px;
    padding: 16px;
  }
  .captcha-left {
    width: 100%;
    max-width: 240px;
  }
  .captcha-input-group {
    max-width: 100%;
  }
}


/* 반응형 디자인 (태블릿 및 모바일) */
@media (max-width: 768px) {
  .modal-body{
	padding:34px !important;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
  
  .captcha-wrapper {
    flex-direction: column;
    align-items: stretch;
  }
  
  .write-container {
    padding: 20px;
  }
}
/****/