/* 전체 배경 및 기본 폰트 */
body {
    font-family: 'Segoe UI', 'Apple SD Gothic Neo', Arial, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e3e9f7 100%);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    color: #222;
}

/* 컨테이너 */
.container {
    max-width: 800px;
    margin: 40px auto 32px auto;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 32px 0 rgba(60, 80, 180, 0.10), 0 1.5px 6px 0 rgba(0,0,0,0.04);
    padding: 36px 28px 32px 28px;
    position: relative;
    z-index: 1;
}

/* 헤더 이미지 */
.header-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    margin-bottom: 18px;
}
.background-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 로고 */
.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 12px;
}
.logo, .amd-logo {
    max-width: calc(50% - 100px); /* 50% of container minus margins */
    height: auto;
    border-radius: 5%;
    object-fit: contain;
    border: 2.5px solid #e3e9f7;
    box-shadow: 0 2px 8px rgba(60,80,180,0.08);
    margin: 0 5px;
    min-width: 0; /* Allow flexbox to shrink items below content size */
}

/* OEM 기타 텍스트박스 크기 및 정렬 */
#preferredOEMOtherText {
    min-width: 180px;
    height: 38px;
    font-size: 1rem;
    vertical-align: middle;
    padding: 8px 12px;
    margin-left: 8px;
    box-sizing: border-box;
}
/* 제목 */
.form-title {
    text-align: center;
    font-size: 2.1rem;
    font-weight: 700;
    margin-bottom: 18px;
    color: #2a3a5e;
    letter-spacing: -1px;
}

/* 설문 폼 */
.survey-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* 질문 그룹 */
.form-group {
    background: #f6f8fc;
    border-radius: 10px;
    padding: 18px 16px 14px 16px;
    margin-bottom: 0;
    box-shadow: 0 1px 4px 0 rgba(60,80,180,0.04);
    border: 1.5px solid #e3e9f7;
    transition: border 0.2s;
}
.form-group:focus-within {
    border: 1.5px solid #7b9fff;
}

/* 질문 제목 */
.question-title {
    font-size: 1.13rem;
    font-weight: 600;
    margin-bottom: 7px;
    color: #2a3a5e;
}
.question-title.required::after {
    content: " *";
    color: #e74c3c;
    font-weight: 700;
}

/* 설명 */
.description, .sub-description {
    font-size: 0.97rem;
    color: #5a6a8a;
    margin-bottom: 4px;
}
.sub-description {
    font-size: 0.93rem;
    color: #8a98b8;
}

/* 입력 필드 */
.form-input, select, .select-dropdown select {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #dbe3f7;
    border-radius: 7px;
    font-size: 1rem;
    background: #fff;
    margin-top: 2px;
    margin-bottom: 2px;
    transition: border 0.2s;
    outline: none;
}
.form-input:focus, select:focus, .select-dropdown select:focus {
    border: 1.5px solid #7b9fff;
    background: #f0f6ff;
}

/* 라디오/체크박스 그룹 */
.radio-group, .checkbox-group {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
    margin-top: 6px;
}
.radio-label, .checkbox-label {
    display: flex;
    align-items: center;
    font-size: 1rem;
    cursor: pointer;
    user-select: none;
    gap: 7px;
    flex-wrap: wrap;
    min-width: 0;
}

#preferredOEMOther {
    flex-shrink: 0;
}
#preferredOEMOtherText {
    min-width: 180px;
    height: 38px;
    font-size: 1rem;
    vertical-align: middle;
    padding: 8px 12px;
    margin-left: 8px;
    box-sizing: border-box;
    flex: 1 1 180px;
    max-width: 300px;
}
input[type="radio"], input[type="checkbox"] {
    accent-color: #4a6cff;
    width: 18px;
    height: 18px;
    margin-right: 3px;
}

/* 커스텀 라디오/체크박스 (아이콘) */
.radio-custom, .checkbox-custom {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e3e9f7;
    border: 1.5px solid #bfcbe3;
    margin-right: 5px;
}
input[type="checkbox"] + .checkbox-custom {
    border-radius: 5px;
}

/* 드롭다운 */
.select-dropdown {
    width: 100%;
}
.select-dropdown select[multiple] {
    min-height: 60px;
    background: #fafdff;
    border: 1.5px solid #dbe3f7;
    border-radius: 7px;
    font-size: 1rem;
    padding: 8px 10px;
}

/* 제출 버튼 */
.submit-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 18px;
}
.submit-btn {
    background: linear-gradient(90deg, #4a6cff 0%, #7b9fff 100%);
    color: #fff;
    font-size: 1.13rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    padding: 13px 38px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(60,80,180,0.08);
    transition: background 0.2s, box-shadow 0.2s;
}
.submit-btn:hover, .submit-btn:focus {
    background: linear-gradient(90deg, #3a5be0 0%, #5a7fff 100%);
    box-shadow: 0 4px 16px rgba(60,80,180,0.13);
}

/* 개인정보 안내 */
.privacy-notice {
    font-size: 0.93rem;
    color: #8a98b8;
    margin-top: 8px;
    text-align: center;
}

/* 메시지 스타일 */
.success-message, .error-message, .warning-message {
    width: 100%;
    margin: 0 auto 10px auto;
    padding: 13px 0;
    border-radius: 7px;
    font-size: 1.07rem;
    text-align: center;
    font-weight: 500;
}
.success-message {
    background: #e6f9e7;
    color: #1a7f3c;
    border: 1.5px solid #b6e6c7;
}
.error-message {
    background: #fbeaea;
    color: #c0392b;
    border: 1.5px solid #f5b7b1;
}
.warning-message {
    background: #fffbe6;
    color: #b8860b;
    border: 1.5px solid #ffe066;
}

/* 반응형 */
@media (max-width: 700px) {
    .container {
        max-width: 98vw;
        padding: 16px 4vw 18px 4vw;
    }
    .form-title {
        font-size: 1.3rem;
    }
    .header-image {
        height: 120px;
    }
    .logo {
        width: 54px;
        height: 54px;
    }
    .form-group {
        padding: 12px 7px 10px 7px;
    }
    .submit-btn {
        font-size: 1rem;
        padding: 11px 18px;
    }
}
/* 폼 에러 강조 효과 */
.error-highlight {
  outline: 2px solid #e74c3c !important;
  box-shadow: 0 0 0 2px #e74c3c !important;
  border-radius: 6px;
  transition: outline 0.2s, box-shadow 0.2s;
}
/* 폼 그룹 전체에 box-sizing과 padding 적용 */
.form-group {
  box-sizing: border-box;
  padding: 16px 18px 16px 18px;
  margin-bottom: 18px;
  background: #fff;
  border-radius: 8px;
  position: relative;
}

/* 에러 테두리 시에도 내부 여백 유지 */
.form-group.error-highlight {
  box-sizing: border-box;
  padding: 16px 18px 16px 18px;
  border: 2px solid #e74c3c !important;
  background: #fff8f8;
}

/* input, select, textarea는 그룹 내부에서 100% */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
}
/* Custom Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    padding: 30px;
    position: relative;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
    color: #777;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.modal-close-btn:hover {
    background-color: #f0f0f0;
}

.modal-content {
    text-align: center;
    padding: 20px 0;
}

.modal-content p {
    font-size: 1.2rem;
    color: #333;
    margin: 0 0 20px 0;
}

.modal-confirm-btn {
    background: #4a6cff;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 10px;
}

.modal-confirm-btn:hover {
    background: #3a5be0;
}