/* 기본 초기화 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #f8fafc;
  color: #1e293b;
  line-height: 1.6;
  padding: 40px 20px 80px;
}

/* 전체 컨테이너 */
.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: #2563eb;
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  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 #cbd5e1;
  border-radius: 8px;
  outline: none;
  background-color: #f8fafc;
  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 #cbd5e1;
  border-radius: 8px;
  outline: none;
  background-color: #f8fafc;
  transition: all 0.2s ease;
}

.input-group input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.input-group input:focus {
  border-color: #2563eb;
  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(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

/* 숨겨진 라디오 버튼 */
.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 #e2e8f0;
  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: #93c5fd;
  box-shadow: 0 12px 20px -4px rgba(0, 0, 0, 0.08);
}

.vote-radio:checked + .card-inner {
  border-color: #2563eb;
  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: #2563eb;
  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: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  z-index: 1;
}

/* 카드 정보 (제목 + 설명) */
.card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.art-title {
  font-size: 19px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
  line-height: 1.3;
}

.art-desc {
  font-size: 14px;
  color: #64748b;
  line-height: 1.55;
  word-break: keep-all;
}

/* 하단 버튼 */
.vote-footer {
  text-align: center;
}

.btn-submit {
  background-color: #2563eb;
  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: #1d4ed8;
  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: #2563eb; /* 체크박스 포인트 컬러 */
  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: #2563eb; /* 버튼 대표 색상 */
  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: #1d4ed8; /* 호버 시 더 어두운 파란색 */
}

/* ==========================================
   📱 모바일 전용 반응형 강제 적용 (Breakpoints)
   ========================================== */

/* 태블릿 & 모바일 (768px 이하) */
@media screen and (max-width: 768px) {
  .vote-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
  }
}

/* 스마트폰 전용 (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: #2563eb;
  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: #2563eb;
  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: #f8fafc;
  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: #2563eb;
  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: #1d4ed8;
  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%;
  }
}