@charset "utf-8";
/* write.css */
/* ===== 익명게시판 글쓰기 CSS - 모바일 퍼스트 ===== */

/* 기본 리셋 */
* {
  box-sizing: border-box;
}

/* 페이지 컨테이너 */
.page-container {
  width: 100%;
  min-height: 100vh;
  background: #f8f9fa;
}

/* 메인 컨텐츠 */
.main-content {
  padding: 10px;
  max-width: 100%;
}

/* 글쓰기 컨테이너 */
.write-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  overflow: hidden;
}

/* ===== 헤더 영역 ===== */
.write-header {
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  padding: 20px 15px;
  text-align: center;
}

.write-header h1 {
  margin: 0 0 15px 0;
  font-size: 1.4rem;
  font-weight: bold;
}

.write-header h1 i {
  margin-right: 8px;
}

.notice-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(255,255,255,0.1);
  padding: 12px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.4;
}

.notice-box i {
  color: #ffc107;
  margin-top: 2px;
  flex-shrink: 0;
}

/* ===== 폼 영역 ===== */
.write-form {
  padding: 20px 15px;
}

/* 섹션 */
.form-section {
  margin-bottom: 25px;
  border-bottom: 1px solid #e9ecef;
  padding-bottom: 20px;
}

.form-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.form-section h2 {
  color: #495057;
  font-size: 1.1rem;
  margin: 0 0 15px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-section h2 i {
  color: #007bff;
}

/* 폼 그룹 */
.form-group {
  margin-bottom: 15px;
}

.form-group:last-child {
  margin-bottom: 0;
}

/* 라벨 */
label {
  display: block;
  font-weight: 600;
  color: #333;
  margin-bottom: 5px;
  font-size: 14px;
}

label.required::after {
  content: ' *';
  color: #dc3545;
}

/* 입력 필드 */
input[type="text"],
input[type="password"],
input[type="email"],
textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.3s ease;
  background: #fff;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

input:invalid:not(:focus),
textarea:invalid:not(:focus) {
  border-color: #dc3545;
}

textarea {
  resize: vertical;
  min-height: 150px;
  font-family: inherit;
  line-height: 1.5;
}

/* 도움말 텍스트 */
.help-text {
  display: block;
  color: #6c757d;
  font-size: 12px;
  margin-top: 4px;
  line-height: 1.3;
}

/* 글자 수 카운터 */
.char-counter {
  text-align: right;
  margin-top: 5px;
  font-size: 12px;
  color: #6c757d;
}

/* ===== 익명 정보 섹션 ===== */
.anonymous-section {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 6px;
  border-left: 4px solid #007bff;
}

/* ===== 체크박스 ===== */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  font-weight: normal;
  margin: 0;
  padding: 10px;
  background: #fff3cd;
  border-radius: 6px;
  border-left: 4px solid #ffc107;
  transition: background-color 0.3s;
}

.checkbox-label:hover {
  background: #ffeaa7;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin: 0;
  transform: scale(1.2);
}

.checkmark {
  flex-shrink: 0;
}

/* ===== reCAPTCHA 섹션 ===== */
.recaptcha-section {
  text-align: center;
}

.recaptcha-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.g-recaptcha {
  transform: scale(0.9);
  transform-origin: center;
}

/* ===== 버튼 영역 ===== */
.button-section {
  text-align: center;
  padding-top: 10px;
}

.button-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 300px;
  margin: 0 auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 50px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: #007bff;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,123,255,0.3);
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover:not(:disabled) {
  background: #545b62;
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
}

/* ===== 태블릿 반응형 (768px+) ===== */
@media (min-width: 768px) {
  .main-content {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
  }
  
  .write-header {
    padding: 30px 25px;
  }
  
  .write-header h1 {
    font-size: 1.6rem;
  }
  
  .notice-box {
    padding: 15px;
    font-size: 15px;
  }
  
  .write-form {
    padding: 30px 25px;
  }
  
  .form-section {
    margin-bottom: 30px;
    padding-bottom: 25px;
  }
  
  .form-section h2 {
    font-size: 1.2rem;
    margin-bottom: 20px;
  }
  
  .form-group {
    margin-bottom: 20px;
  }
  
  label {
    font-size: 15px;
  }
  
  input[type="text"],
  input[type="password"],
  input[type="email"],
  textarea {
    padding: 14px;
    font-size: 15px;
  }
  
  textarea {
    min-height: 180px;
  }
  
  .anonymous-section {
    padding: 20px;
  }
  
  .g-recaptcha {
    transform: scale(1);
  }
  
  .button-group {
    flex-direction: row;
    max-width: 400px;
  }
  
  .btn {
    flex: 1;
    font-size: 15px;
    padding: 16px 24px;
  }
}

/* ===== 데스크톱 반응형 (1024px+) ===== */
@media (min-width: 1024px) {
  .main-content {
    padding: 30px;
    max-width: 900px;
  }
  
  .write-header {
    padding: 40px 30px;
  }
  
  .write-header h1 {
    font-size: 1.8rem;
  }
  
  .write-form {
    padding: 40px 30px;
  }
  
  .form-section {
    margin-bottom: 35px;
    padding-bottom: 30px;
  }
  
  .form-section h2 {
    font-size: 1.3rem;
  }
  
  input[type="text"],
  input[type="password"],
  input[type="email"],
  textarea {
    padding: 16px;
    font-size: 16px;
  }
  
  textarea {
    min-height: 200px;
  }
  
  .btn {
    font-size: 16px;
    padding: 18px 30px;
  }
}

/* ===== 애니메이션 ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.write-container {
  animation: fadeIn 0.5s ease-out;
}

/* ===== 접근성 개선 ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}