:root {
    --primary-color: #8b7355;
    --primary-light: #f5f0eb;
    --primary-dark: #6b5a45;
    --accent-color: #8b7355;
    --accent-hover: #6b5a45;
    --text-color: #333;
    --text-light: #666;
    --gray-light: #f8f9fa;
    --gray-medium: #e9ecef;
    --gray-border: #ced4da;
    --error-color: #dc3545;
    --success-color: #28a745;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --font-main: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

/* ========== 페이지 컨테이너 ========== */
.page-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
}

/* ========== 헤더 ========== */
.header-content {
    text-align: center;
    margin-bottom: 25px;
    padding-top: 10px;
}

.main-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.sub-title {
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 400;
    margin-bottom: 15px;
}

.logo {
    width: 200px;
    height: auto;
    margin: 10px auto;
    display: block;
}

/* ========== 개인정보 동의 ========== */
.privacy-notice {
    background-color: var(--primary-light);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 1px solid var(--primary-color);
}

.privacy-notice h2 {
    font-size: 1rem;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.privacy-content {
    background: white;
    border: 1px solid var(--gray-border);
    border-radius: 8px;
    padding: 15px;
    max-height: 150px;
    overflow-y: auto;
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--text-light);
}

.privacy-consent {
    display: flex;
    align-items: center;
    margin-top: 15px;
    gap: 10px;
}

.privacy-consent input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--accent-color);
    cursor: pointer;
}

.privacy-consent label {
    font-size: 0.9rem;
    cursor: pointer;
}

/* ========== 폼 그룹 ========== */
.form-group {
    background: white;
    padding: 18px;
    border-radius: 12px;
    margin-bottom: 15px;
    border: 1px solid var(--gray-border);
    box-shadow: var(--shadow);
}

.form-group > label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-color);
    margin-bottom: 10px;
}

.required::after {
    content: " *";
    color: var(--error-color);
}

/* ========== 입력 필드 ========== */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--gray-border);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: var(--font-main);
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.15);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

/* ========== 라디오 버튼 ========== */
.radio-group {
    display: flex;
    gap: 25px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95rem;
}

.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-color);
    cursor: pointer;
}

/* ========== 연락처 입력 ========== */
.phone-input-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.phone-prefix {
    width: 60px !important;
    text-align: center;
    background-color: var(--gray-light);
    font-weight: 600;
    color: var(--text-light);
}

.phone-separator {
    color: var(--text-light);
    font-weight: 500;
}

.phone-number {
    width: 80px !important;
    text-align: center;
}

/* ========== 사이즈 입력 ========== */
.size-inputs {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.size-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.size-label {
    width: 70px;
    font-weight: 500;
    color: var(--text-light);
    font-size: 0.9rem;
}

.size-row input {
    flex: 1;
}

.size-unit {
    width: 30px;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ========== 도움말 텍스트 ========== */
.help-text {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 8px;
    line-height: 1.5;
}

.help-text.highlight {
    background-color: var(--primary-light);
    padding: 10px;
    border-radius: 6px;
    color: var(--primary-dark);
}

/* ========== 업로드 섹션 ========== */
.upload-section {
    margin-top: 15px;
    padding: 15px;
    background: var(--gray-light);
    border-radius: 10px;
    border: 1px solid var(--gray-border);
}

.upload-section-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.guide-btn {
    padding: 6px 14px;
    background: var(--gray-medium);
    border: 1px solid var(--gray-border);
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--text-light);
    cursor: pointer;
    margin-bottom: 10px;
    transition: all 0.2s;
}

.guide-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.upload-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.upload-row.single {
    justify-content: center;
}

.upload-item {
    flex: 1;
    min-width: 100px;
    max-width: 150px;
}

.upload-item.wide {
    max-width: 100%;
    width: 100%;
}

.upload-item label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 5px;
    text-align: center;
}

.preview-container {
    width: 100%;
    height: 100px;
    background: white;
    border: 2px dashed var(--gray-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    overflow: hidden;
    position: relative;
}

.preview-container.multi {
    height: 100px;
    flex-wrap: wrap;
    gap: 5px;
    padding: 5px;
}

.preview-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.preview-container .preview-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.video-preview-container {
    width: 100%;
    height: 120px;
    background: white;
    border: 2px dashed var(--gray-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    overflow: hidden;
}

.video-preview-container video {
    max-width: 100%;
    max-height: 100%;
}

.upload-btn-wrapper {
    position: relative;
    overflow: hidden;
}

.upload-btn-wrapper input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-btn {
    width: 100%;
    padding: 8px 12px;
    background: white;
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    color: var(--primary-color);
    font-size: 0.8rem;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.upload-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* 이미지 삭제 버튼 */
.remove-image {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--error-color);
    border-radius: 50%;
    color: var(--error-color);
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========== 제출 버튼 ========== */
.submit-btn {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 30px auto;
    padding: 15px 30px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(139, 115, 85, 0.3);
}

.submit-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 115, 85, 0.4);
}

/* ========== 확인 페이지 ========== */
.confirm-welcome {
    font-size: 1.5rem;
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 600;
    line-height: 1.4;
}

.confirm-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 25px;
}

.confirm-content {
    background: var(--primary-light);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--primary-color);
}

.confirm-section {
    margin-bottom: 20px;
}

.confirm-section:last-child {
    margin-bottom: 0;
}

.confirm-section h3 {
    font-size: 0.95rem;
    color: var(--primary-color);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--primary-color);
}

.confirm-item {
    display: flex;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.confirm-item.full {
    flex-direction: column;
}

.confirm-label {
    width: 80px;
    font-weight: 500;
    color: var(--text-light);
    flex-shrink: 0;
}

.confirm-value {
    flex: 1;
    color: var(--text-color);
}

.confirm-text {
    margin-top: 5px;
    padding: 10px;
    background: white;
    border-radius: 6px;
    line-height: 1.6;
}

.confirm-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.confirm-images img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--gray-border);
}

.button-group {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 25px 0 40px;
}

.edit-btn {
    padding: 12px 30px;
    background: var(--gray-medium);
    color: var(--text-color);
    border: 1px solid var(--gray-border);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.edit-btn:hover {
    background: #ddd;
}

.complete-btn {
    padding: 12px 30px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.complete-btn:hover {
    background: var(--accent-hover);
}

/* ========== 완료 페이지 ========== */
.complete-message {
    text-align: center;
    padding: 40px 20px;
}

.complete-icon {
    width: 80px;
    height: 80px;
    background: var(--success-color);
    color: white;
    border-radius: 50%;
    font-size: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.complete-message h2 {
    font-size: 1.3rem;
    color: var(--text-color);
    margin-bottom: 10px;
}

.complete-message p {
    color: var(--text-light);
    margin-bottom: 5px;
}

.complete-notice {
    margin-top: 20px;
    padding: 15px;
    background: var(--primary-light);
    border-radius: 8px;
    font-size: 0.9rem;
}

/* ========== 로딩 스피너 ========== */
.spinner-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.spinner-text {
    color: white;
    margin-top: 15px;
    font-size: 0.95rem;
}

/* ========== 모달 ========== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 15px 20px;
    background: var(--primary-color);
    color: white;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.1rem;
    margin: 0;
}

.modal-close {
    font-size: 24px;
    cursor: pointer;
    opacity: 0.8;
}

.modal-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 20px;
}

.modal-body h3 {
    color: var(--primary-color);
    font-size: 1rem;
    margin: 15px 0 10px;
}

.modal-body ul {
    margin-left: 20px;
    line-height: 1.8;
}

.modal-body img {
    width: 100%;
    border-radius: 8px;
    margin: 10px 0;
}

.modal-footer {
    padding: 15px 20px;
    text-align: center;
    border-top: 1px solid var(--gray-border);
}

.modal-footer button {
    padding: 10px 30px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
}

.modal-footer button:hover {
    background: var(--accent-hover);
}

/* ========== 반응형 ========== */
@media (max-width: 480px) {
    .page-container {
        padding: 10px;
    }

    .main-title {
        font-size: 1.6rem;
    }

    .sub-title {
        font-size: 1rem;
    }

    .logo {
        width: 160px;
    }

    .form-group {
        padding: 15px;
    }

    .upload-row {
        justify-content: center;
    }

    .upload-item {
        min-width: 90px;
        max-width: 100px;
    }

    .preview-container {
        height: 80px;
    }

    .confirm-welcome {
        font-size: 1.3rem;
    }
}
