/* 기본 초기화 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
   background-color: #f9fbfb;
  color: #1e293b;
  line-height: 1.6;
  padding: 40px 20px 80px;
}

:root {
    --mint-bg: #f3f8f6;       /* 배경 연민트/아이스톤 */
    --deep-green: #2b9375;    /* 딥 에메랄드 그린 */
    --light-green: #e4f2ed;   /* 아이콘배지/태그 연초록 */
    --text-navy: #18332c;     /* 짙은 네이비 그린 텍스트 */
    --border-color: #d6e8e2;  /* 테두리 컬러 */
}


/* 전체 컨테이너 */
.container {
  max-width: 1080px;
  margin: 0 auto;
}

/* 헤더 스타일 */
.header {
  text-align: center;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.title {
  margin-bottom: 12px;
  line-height: 1;
}

.title a {
  display: inline-block;
  text-decoration: none;
}

.logo-img {
  max-width: 100%;
  height: auto;
  max-height: 60px;
  object-fit: contain;
}

.subtitle {
  font-size: 15px;
  font-weight: 600;
  color: var(--deep-green);
  background-color: #e4f2ed;
  border: 1px solid #e1ebe7;
  padding: 6px 18px;
  border-radius: 20px;
  margin-top: 6px;
}

/* 사용자 정보 입력 영역 */
.user-info-section {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 36px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.info-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
}

.info-desc {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 20px;
}

.input-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}


.input-group {
  display: flex;
  flex-direction: column;
}

.input-group label {
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.input-group label .required {
  color: #ef4444;
}

/* 3개 연락처 전용 그룹 스타일 */
.phone-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.phone-group input {
  flex: 1;
  text-align: center;
  height: 48px;
  font-size: 15px;
  border: 1px solid #e1ebe7;
  border-radius: 8px;
  outline: none;
   background-color: #f9fbfb;
  transition: all 0.2s ease;
}

.phone-group .hyphen {
  color: #94a3b8;
  font-weight: 600;
}

/* 일반 단일 input 스타일 */
.input-group > input {
  height: 48px;
  padding: 0 16px;
  font-size: 15px;
  border: 1px solid #e1ebe7;
  border-radius: 8px;
  outline: none;
   background-color: #f9fbfb;
  transition: all 0.2s ease;
}

.input-group input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.input-group input:focus {
  border-color: var(--deep-green);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* 카드 그리드 레이아웃 (PC 기준 3열) */
.vote-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

/* 숨겨진 라디오 버튼 */
.vote-radio {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* 작품 카드 전체 */
.card {
  cursor: pointer;
  display: block;
}

.card-inner {
  background-color: #ffffff;
  border-radius: 16px;
  border: 2px solid #e2f0eb;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card:hover .card-inner {
  transform: translateY(-4px);
  border-color: #2b9375;
  box-shadow: 0 12px 20px -4px rgba(0, 0, 0, 0.08);
}

.vote-radio:checked + .card-inner {
  border-color: var(--deep-green);
  background-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15), 0 8px 16px rgba(0, 0, 0, 0.06);
}

.vote-radio:checked + .card-inner::after {
  content: "✓ 선택됨";
  position: absolute;
  top: 12px;
  right: 12px;
  background-color: var(--deep-green);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
  z-index: 2;
}

/* 작품 이미지 영역 */
.img-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background-color: #f1f5f9;
  overflow: hidden;
}

.img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.card:hover .img-wrapper img {
  transform: scale(1.03);
}

/* 기호 배지 */
.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background-color: #e4f2ed;
  color: #0b6b52;
  backdrop-filter: blur(4px);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  z-index: 1;
}

/* 카드 정보 (제목 + 설명) */
.card-content {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  border-top: 1px solid #e4f2ed;
}

.art-title {
  font-size: 18px;
  font-weight: 600;
  color: #17644d;
  line-height: 1.3;
  text-align: center;
}

.art-desc {
  font-size: 14px;
  color: #64748b;
  line-height: 1.55;
  word-break: keep-all;
  display: none;
}

/* 하단 버튼 */
.vote-footer {
  text-align: center;
}

.btn-submit {
  background-color: var(--deep-green);
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  padding: 16px 56px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: all 0.2s ease;
}

.btn-submit:hover {
  background-color: #08523f;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.btn-submit:active {
  transform: translateY(1px);
}


/* 개인정보 전체 컨테이너 */
.privacy-container {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
  text-align: left;
}

/* 타이틀 스타일 */
.privacy-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.privacy-title .required {
  color: #ef4444;
}

/* 약관 내용 스크롤 박스 */
.privacy-box {
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 16px;
  max-height: 120px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.6;
  color: #4b5563;
  margin-bottom: 12px;
}

.privacy-box p {
  margin: 0 0 6px 0;
}

.privacy-box ul {
  margin: 0 0 6px 0;
  padding-left: 20px;
}

.privacy-box li {
  margin-bottom: 2px;
}

/* 동의 체크박스 영역 */
.privacy-agree {
  display: flex;
  align-items: center;
  gap: 8px;
}

.privacy-agree input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--deep-green); /* 체크박스 포인트 컬러 */
  cursor: pointer;
}

.privacy-agree label {
  font-size: 14px;
  font-weight: 500;
  color: #1f2937;
  cursor: pointer;
}


/* 버튼 감싸는 영역 및 투표 버튼 스타일 */
.submit-btn-wrap {
  text-align: center;
  margin-top: 20px;
}

.btn-vote-submit {
  width: 100%; /* 너비를 폼 전체 폭에 맞춤 (필요시 px 단위 변경 가능) */
  max-width: 300px;
  padding: 14px 20px;
  background-color: var(--deep-green); /* 버튼 대표 색상 */
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-vote-submit:hover {
  background-color: #08523f; /* 호버 시 더 어두운 파란색 */
}

  /*  ★ 모달 팝업 전용 스타일 ★   */
    .modal-overlay {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0.7);
      backdrop-filter: blur(4px);
      z-index: 9999;
      justify-content: center;
      align-items: center;
      padding: 20px;
      box-sizing: border-box;
      animation: fadeIn 0.25s ease forwards;
    }

    .modal-content-box {
      position: relative;
      background-color: #ffffff;
      width: 100%;
      max-width: 850px;
      border-radius: 20px;
      overflow: hidden;
      box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
      animation: slideUp 0.3s ease forwards;
    }

    .modal-close-btn {
      position: absolute;
      top: 15px;
      right: 15px;
      background: #f0f4f2;
      border: none;
      font-size: 20px;
      color: #555555;
      width: 38px;
      height: 38px;
      border-radius: 50%;
      cursor: pointer;
      z-index: 10;
      transition: all 0.2s ease;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .modal-close-btn:hover {
      background-color: #0b6b52;
      color: #ffffff;
    }

    .modal-body {
      display: flex;
      max-height: 85vh;
      overflow-y: auto;
    }

    .modal-img-area {
      flex: 1.1;
      background-color: #f7faf8;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 30px;
      min-height: 600px;
    }

    .modal-img-area img {
      max-width: 100%;
      /*max-height: 420px;*/
      object-fit: contain;
      border-radius: 12px;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    }

    .modal-info-area {
      flex: 1;
      padding: 35px 30px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      text-align: left;
    }

    .modal-badge {
      display: inline-block;
      background-color: #e4f2ed;
      color: #0b6b52;
      font-size: 13px;
      font-weight: 700;
      padding: 4px 12px;

      border-radius: 20px;
      margin-bottom: 10px;
      align-self: flex-start;
    }

    .modal-work-title {
      font-size: 24px;
      font-weight: 800;
      color: #1e2d4a;
      margin: 0 0 15px 0;
      line-height: 1.3;
    }

    .modal-desc-box {
      background-color: #f9fbfb;
      border: 1px solid #e1ebe7;
      border-radius: 12px;
      padding: 18px;
      margin-bottom: 20px;
      flex-grow: 1;
    }

    .modal-desc-box h5 {
      font-size: 14px;
      font-weight: 700;
      color: #0b6b52;
      margin: 0 0 8px 0;
    }

    .modal-desc-box p {
      font-size: 14px;
      color: #444444;
      line-height: 1.6;
      margin: 0;
      white-space: pre-line;
      word-break: keep-all;
    }

    .modal-select-btn {
      width: 100%;
      padding: 15px 0;
      background-color: #0b6b52;
      color: #ffffff;
      font-size: 16px;
      font-weight: 700;
      border: none;
      border-radius: 30px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      transition: all 0.2s ease;
      box-shadow: 0 6px 18px rgba(11, 107, 82, 0.25);
    }

    .modal-select-btn:hover {
      background-color: #08523f;
      transform: translateY(-2px);
    }

    .card { cursor: pointer; } /* 카드에 마우스 커서 표시 */

    @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
    @keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }



/* ==========================================
   📱 모바일 전용 반응형 강제 적용 (Breakpoints)
   ========================================== */

/* 태블릿 & 모바일 (768px 이하) */
@media screen and (max-width: 768px) {
  .vote-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
  }
  .modal-body { flex-direction: column; }
  .modal-img-area { min-height: auto; padding: 20px; }
  .modal-info-area { padding: 20px; }
  .modal-work-title { font-size: 20px; }	
}

/* 스마트폰 전용 (640px 이하) */
@media screen and (max-width: 640px) {
  body {
    padding: 16px 12px 60px !important;
  }

  /* 1. 컨테이너 여백 최적화 */
  .container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
  }

  /* 2. 👤 사용자 정보 입력 카드 모바일 커스텀 */
  .user-info-section {
    padding: 20px 14px !important;
    border-radius: 12px !important;
    margin-bottom: 24px !important;
  }

  .info-title {
    font-size: 16px !important;
  }

  .info-desc {
    font-size: 12.5px !important;
    margin-bottom: 16px !important;
    line-height: 1.4 !important;
  }

  /* 이름 / 연락처 1열 수직 정렬 */
  .input-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
  }

  .input-group label {
    font-size: 13px !important;
    margin-bottom: 4px !important;
  }

  /* 이름 input */
  .input-group > input {
    height: 48px !important;
    font-size: 16px !important; /* iOS 자동 확대 방지 */
    border-radius: 8px !important;
  }

  /* 3. 📞 연락처 3개 input 배치 비율 최적화 */
  .phone-group {
    display: flex !important;
    width: 100% !important;
    gap: 4px !important;
    align-items: center !important;
  }

  .phone-group input {
    height: 48px !important;
    font-size: 16px !important; /* iOS 자동 확대 방지 */
    padding: 0 2px !important;
    border-radius: 8px !important;
    text-align: center !important;
  }

  /* 010 칸은 슬림하게, 4자리 숫자 입력칸은 여유있게 배치 */
  .phone-group input#phone1 {
    flex: 1 1 28% !important;
    min-width: 0 !important;
  }
  
  .phone-group input#phone2,
  .phone-group input#phone3 {
    flex: 1.2 1 34% !important;
    min-width: 0 !important;
  }

  .phone-group .hyphen {
    font-size: 12px !important;
    color: #94a3b8 !important;
    padding: 0 1px !important;
    flex-shrink: 0 !important;
  }

  /* 4. 🖼️ 작품 카드 1열 배치 */
  .vote-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    margin-bottom: 32px !important;
  }

  /* 5. 버튼 풀사이즈 처리 */
  .btn-submit, 
  .btn-home {
    width: 100% !important;
    height: 52px !important;
    font-size: 16px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 10px !important;
  }

  /* 6. 🎉 완료 페이지 모바일 카드 */
  .complete-card {
    padding: 28px 16px !important;
    border-radius: 14px !important;
    margin-top: 10px !important;
  }

  .complete-title {
    font-size: 19px !important;
  }

  .complete-desc {
    font-size: 13.5px !important;
  }
}




/* ==========================================
   투표 완료 페이지 스타일
   ========================================== */
.complete-card {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 48px 32px;
  text-align: center;
  max-width: 600px;
  margin: 20px auto 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* 체크 아이콘 원 */
.icon-circle {
  width: 80px;
  height: 80px;
  background-color: #eff6ff;
  color: var(--deep-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

/* 타이틀 및 네임 강조 */
.complete-title {
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.4;
  margin-bottom: 12px;
  word-break: keep-all;
}

.complete-title .user-name {
  color: var(--deep-green);
  font-weight: 800;
}

/* 설명 문구 */
.complete-desc {
  font-size: 15px;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 32px;
  word-break: keep-all;
}

/* 요약 정보 상자 */
.summary-box {
   background-color: #f9fbfb;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 36px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  padding: 6px 0;
}

.summary-item:not(:last-child) {
  border-bottom: 1px dashed #e2e8f0;
  margin-bottom: 6px;
  padding-bottom: 10px;
}

.summary-label {
  color: #64748b;
  font-weight: 500;
}

.summary-value {
  color: #1e293b;
  font-weight: 600;
}

.summary-value.status-success {
  color: #16a34a; /* 초록색 완료 표시 */
}

/* 버튼 */
.btn-group {
  display: flex;
  justify-content: center;
}

.btn-home {
  display: inline-block;
  background-color: var(--deep-green);
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  padding: 14px 40px;
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  transition: all 0.2s ease;
}

.btn-home:hover {
  background-color: #08523f;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

/* 모바일 반응형 */
@media (max-width: 640px) {
  .complete-card {
    padding: 32px 20px;
  }
  
  .complete-title {
    font-size: 20px;
  }
  
  .btn-home {
    width: 100%;
  }
}