﻿@font-face {
    font-family: 'Pretendard';
    src: url('/fonts/Pretendard-Regular.woff2') format('woff2'), url('/fonts/Pretendard-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    font-family: 'Pretendard Variable', Pretendard;
    box-sizing: border-box;
}

body {
    background: radial-gradient(circle at center, #202020 0%, #000000 100%);
    min-height: 100vh;
    height: 100vh;
    min-width: 850px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #f5f5f5;
}

.register-container {
    background: rgba(8, 8, 10, 0.9);
    border-radius: 20px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.02);
    width: 100%;
    max-width: 450px;
    padding: 40px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(18px);
}

.logo {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3f7cff 0%, #7a5cff 100%);
    border-radius: 50%;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(80, 120, 255, 0.6);
}

    .logo i {
        color: white;
        font-size: 24px;
    }

.title {
    font-size: 28px;
    font-weight: 700;
    color: #f5f5f5;
    margin-bottom: 8px;
}

.subtitle {
    color: #9ea2b3;
    margin-bottom: 32px;
}

.form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.form-group-half {
    flex: 1;
    text-align: left;
}

    .form-group-half .form-label {
        display: block;
        font-weight: 600;
        color: #d0d3dd;
        margin-bottom: 6px;
        font-size: 14px;
    }

    .form-group-half .form-control {
        width: 100%;
        padding: 8px 8px;
        border-radius: 8px;
        font-size: 12px;
        background: rgba(20, 20, 24, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.06);
        color: #f5f5f5;
        transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    }

        .form-group-half .form-control::placeholder {
            color: #6f7280;
        }

        .form-group-half .form-control:focus {
            outline: none;
            border-color: #4f8cff;
            background-color: #121218;
            box-shadow: 0 0 0 1px rgba(79, 140, 255, 0.45);
        }

    .form-group-half .field-validation-error {
        color: #ff9aa6;
        font-size: 12px;
        margin-top: 4px;
    }

.form-group {
    margin-bottom: 16px;
    text-align: left;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #d0d3dd;
    margin-bottom: 6px;
    font-size: 14px;
}

.form-control {
    width: 100%;
    height: 30px;
    padding: 8px 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    font-size: 12px;
    background: rgba(20, 20, 24, 0.95);
    color: #f5f5f5;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

    .form-control::placeholder {
        color: #6f7280;
    }

    .form-control:focus {
        outline: none;
        border-color: #4f8cff;
        background-color: #121218;
        box-shadow: 0 0 0 1px rgba(79, 140, 255, 0.45);
    }

/* 기존 .form-select 스타일 주석처리 (Select2로 대체) */
/*
.form-select {
    width: 100%;
    height: 32px;
    padding: 8px 8px;
    border: 0px;
    border-radius: 8px;
    font-size: 12px;
    background: #F2F2F2;
    cursor: pointer;
    position: relative;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

    .form-select:focus {
        outline: none;
        border: 2px solid #2980FF;
        background: white;
    }

    .form-select.input-validation-error {
        border: 2px solid #dc2626 !important;
        border-color: #dc2626;
    }
*/

/* 기존 일반 select용 화살표 주석처리 */
/*
.form-group {
    position: relative;
}

    .form-group .form-select {
        padding-right: 30px;
    }

    .form-group:has(select:not(.select2-hidden-accessible))::after {
        content: '▼';
        position: absolute;
        top: 27px;
        right: 11px;
        transform: translateY(-50%);
        color: #666;
        font-size: 12px;
        pointer-events: none;
        z-index: 1;
        margin-top: 12px;
        transition: color 0.2s ease;
    }

    .form-group:has(select:not(.select2-hidden-accessible)):hover::after {
        color: #2980FF;
    }
*/

.btn-primary {
    width: 60%;
    background: linear-gradient(135deg, #3f7cff 0%, #7a5cff 100%);
    border: none;
    color: white;
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    margin-top: 8px;
    box-shadow: 0 8px 20px rgba(80, 120, 255, 0.45);
}

    .btn-primary:hover {
        background: linear-gradient(135deg, #5a8dff 0%, #9a7cff 100%);
        box-shadow: 0 10px 26px rgba(80, 120, 255, 0.6);
        transform: translateY(-1px);
    }

.login-link {
    margin-top: 24px;
    color: #9ea2b3;
    font-size: 14px;
}

    .login-link a {
        color: #c2d0ff;
        text-decoration: none;
        font-weight: 600;
    }

        .login-link a:hover {
            text-decoration: underline;
        }

.error-message {
    background: rgba(42, 16, 20, 0.98);
    border: 1px solid rgba(255, 75, 107, 0.7);
    color: #ffb9c0;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: left;
}

.field-validation-error {
    color: #ff9aa6;
    font-size: 12px;
    margin-top: 4px;
}

.form-control.input-validation-error {
    border-color: #ff4b6b;
}

.required {
    color: #ff4b6b;
}

.form-check {
    display: flex;
    align-items: flex-start;
    margin: 16px 0;
    text-align: left;
}

.form-check-input {
    margin-right: 8px;
    margin-top: 2px;
}

.form-check-label {
    color: #9ea2b3;
    font-size: 13px;
    line-height: 1.4;
}

/* 컨테이너 기본 설정 */
.select2-container {
    width: 100% !important;
}

/* 단일선택용 Select2 스타일 (Country, Industry) */
.select2-container--default .select2-selection--single {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(20, 20, 24, 0.95);
    height: 32px;
    font-size: 12px;
    line-height: 1.2;
}

    .select2-container--default .select2-selection--single .select2-selection__rendered {
        color: #f5f5f5;
        line-height: 30px; /* 32px 높이에 맞춰 수직 정렬 */
        padding-left: 8px;
        padding-right: 30px; /* 화살표 공간 */
        font-size: 12px;
    }

    .select2-container--default .select2-selection--single .select2-selection__placeholder {
        color: #6f7280;
        font-size: 12px;
        line-height: 30px;
        padding-left: 4px;
    }

/* 단일선택 포커스 상태 */
.select2-container--default.select2-container--focus .select2-selection--single {
    border: 1px solid #4f8cff;
    background: #121218;
    outline: none;
    box-shadow: 0 0 0 1px rgba(79, 140, 255, 0.45);
}

/* 단일선택 기본 화살표 숨기기 */
.select2-container--default .select2-selection--single .select2-selection__arrow {
    display: none;
}

/* 단일선택용 커스텀 화살표 (Country, Industry) */
#countrySelect + .select2-container::after,
#industrySelect + .select2-container::after {
    content: '▼';
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    color: #9ea2b3;
    font-size: 12px;
    pointer-events: none;
    z-index: 2;
    transition: transform 0.2s ease, color 0.2s ease;
}

#countrySelect + .select2-container:hover::after,
#industrySelect + .select2-container:hover::after {
    color: #4f8cff;
}

#countrySelect + .select2-container.select2-container--open::after,
#industrySelect + .select2-container.select2-container--open::after {
    transform: translateY(-50%) rotate(180deg);
}

/* 다중선택용 Select2 스타일 (Role) */
.select2-container--default .select2-selection--multiple {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(20, 20, 24, 0.95);
    padding: 2px 8px;
    min-height: 32px;
    font-size: 12px;
    position: relative;
    color: #f5f5f5;
}

/* Role Select2 커스텀 화살표 */
#roleSelect + .select2-container::after {
    content: '▼';
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    color: #9ea2b3;
    font-size: 12px;
    pointer-events: none;
    z-index: 2;
    transition: transform 0.2s ease, color 0.2s ease;
}

#roleSelect + .select2-container:hover::after {
    color: #4f8cff;
}

#roleSelect + .select2-container.select2-container--open::after {
    transform: translateY(-50%) rotate(180deg);
}

.select2-container--default.select2-container--focus .select2-selection--multiple {
    border: 1px solid #4f8cff;
    background: #121218;
    outline: none;
    box-shadow: 0 0 0 1px rgba(79, 140, 255, 0.45);
}

/* 다중선택 검색 입력 필드 */
.select2-container--default .select2-search--inline .select2-search__field {
    border: none;
    outline: none;
    font-size: 12px;
    background: transparent;
    margin: 0;
    padding: 6px 0 2px 0;
    min-height: 16px;
    color: #f5f5f5;
}

/* 다중선택의 선택된 항목들 (Role용) */
.select2-container--default .select2-selection__choice {
    background: #4f8cff;
    border: 1px solid #4f8cff;
    border-radius: 4px;
    color: #050711;
    font-size: 12px;
    padding: 2px 6px;
    margin: 2px 4px 2px 0;
    line-height: 1.2;
}

.select2-container--default .select2-selection__choice__remove {
    color: #050711;
    margin-right: 4px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
}

    .select2-container--default .select2-selection__choice__remove:hover {
        color: #ffcccc;
    }

/* 드롭다운 공통 스타일 */
.select2-dropdown {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.75);
    font-size: 12px;
    z-index: 9999;
    background: #101018;
    color: #f5f5f5;
}

/* 검색 입력 필드 (드롭다운 내부) */
.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    padding: 8px;
    font-size: 12px;
    background: #14141c;
    color: #f5f5f5;
}

.select2-container--default .select2-results > .select2-results__options {
    max-height: 300px; /* 원하는 높이로 조정 */
}

/* 드롭다운 옵션들 */
.select2-results__option {
    padding: 8px 12px;
    font-size: 12px;
    color: #d0d3dd;
}

/* 옵션 호버 상태 */
.select2-results__option--highlighted[aria-selected] {
    background-color: #1c2234;
    color: #f5f5f5;
}

/* 선택된 옵션 */
.select2-results__option[aria-selected=true] {
    background-color: #1e2a45;
    color: #c2d0ff;
    font-weight: 600;
}

/* 에러 상태 스타일링 */
.input-validation-error + .select2-container .select2-selection--single,
.input-validation-error + .select2-container .select2-selection--multiple {
    border: 1px solid #ff4b6b !important;
    background: rgba(26, 8, 11, 0.95);
}

/* 반응형 */
@media (max-width: 768px) {
    .select2-container--default .select2-selection--single,
    .select2-container--default .select2-selection--multiple {
        min-height: 36px;
    }

    .select2-container--default .select2-search--inline .select2-search__field {
        font-size: 16px; /* iOS에서 줌 방지 */
    }
}

/* 전체 동의 체크박스 스타일 */
.form-check.select-all {
    border: 1px solid #2c2f3c;
    border-radius: 8px;
    padding: 12px;
    margin: 20px 0 16px 0;
    background-color: rgba(26, 28, 36, 0.95);
}

.select-all-label {
    font-weight: 600;
    color: #d0d3dd;
    font-size: 14px;
}

/* 구분선 */
.checkbox-separator {
    height: 1px;
    background-color: #2c2f3c;
    margin: 16px 0;
}

/* 개별 체크박스들 */
.form-check:not(.select-all) {
    margin-left: 8px;
    position: relative;
}

/* Terms of Service Modal Styles */
.terms-link {
    color: #4f8cff;
    text-decoration: underline;
    cursor: pointer;
}

    .terms-link:hover {
        color: #5a8dff;
    }

.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.6);
    display: none !important;
}

    .modal.show {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

.modal-content {
    background-color: #14141c;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.85);
    width: 90%;
    max-width: 500px;
    position: relative;
    z-index: 1001;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #f5f5f5;
}

.terms-modal-content {
    max-width: 600px;
    max-height: 85vh;
}

.modal-header {
    padding: 20px 24px 0 24px;
    text-align: center;
    position: relative;
    border-bottom: 1px solid #262636;
    padding-bottom: 15px;
}

    .modal-header h3 {
        margin: 0;
        color: #f5f5f5;
        font-size: 20px;
        font-weight: 600;
    }

.modal-close-btn {
    position: absolute;
    right: 15px;
    top: 15px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .modal-close-btn:hover {
        color: #ddd;
    }

.btn-accept {
    background: linear-gradient(135deg, #3f7cff 0%, #7a5cff 100%);
    color: white;
}

    .btn-accept:hover {
        background: linear-gradient(135deg, #5a8dff 0%, #9a7cff 100%);
    }

.modal-body {
    padding: 20px 24px;
    flex: 1;
}

.terms-modal-body {
    overflow-y: auto;
    max-height: 60vh;
}

.terms-content {
    text-align: left;
}

    .terms-content h4 {
        color: #f5f5f5;
        font-size: 16px;
        font-weight: 600;
        margin: 20px 0 10px 0;
    }

        .terms-content h4:first-child {
            margin-top: 0;
        }

    .terms-content p {
        color: #b0b3c5;
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 15px;
    }

    .terms-content ul {
        color: #b0b3c5;
        font-size: 14px;
        line-height: 1.6;
        margin: 10px 0 15px 20px;
    }

    .terms-content li {
        margin-bottom: 5px;
    }

.modal-footer {
    padding: 15px 24px 20px 24px;
    text-align: center;
    border-top: 1px solid #262636;
    display: flex;
    gap: 10px;
    justify-content: center;
}

    .modal-footer .btn {
        border: none;
        padding: 10px 20px;
        border-radius: 6px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        width: 100px;
        transition: background-color 0.2s ease, box-shadow 0.2s ease;
    }

.btn-secondary {
    background: #2c2f3c;
    color: #f5f5f5;
}

    .btn-secondary:hover {
        background: #363a4a;
    }

.modal-footer .btn-primary {
    background: linear-gradient(135deg, #3f7cff 0%, #7a5cff 100%);
    color: white;
}

    .modal-footer .btn-primary:hover {
        background: linear-gradient(135deg, #5a8dff 0%, #9a7cff 100%);
    }

/* 스크롤바 스타일링 */
.terms-modal-body::-webkit-scrollbar {
    width: 6px;
}

.terms-modal-body::-webkit-scrollbar-track {
    background: #15151e;
    border-radius: 3px;
}

.terms-modal-body::-webkit-scrollbar-thumb {
    background: #333749;
    border-radius: 3px;
}

    .terms-modal-body::-webkit-scrollbar-thumb:hover {
        background: #444a62;
    }

/* Terms checkbox error styling */
.terms-checkbox-error {
    border: 2px solid #ff4b6b !important;
    box-shadow: 0 0 0 2px rgba(255, 75, 107, 0.2) !important;
    outline: none !important;
}

    .terms-checkbox-error + label {
        color: #ff4b6b !important;
    }

/* 체크박스 크기 조정 (에러 표시가 더 잘 보이도록) */
.form-check-input {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    margin-top: 2px;
}

/* Language buttons styling */
.language-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 10px;
}

.lang-btn {
    padding: 6px 12px;
    border: 1px solid #333749;
    background: #15151e;
    color: #9ea2b3;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .lang-btn:hover {
        background: #1f2130;
        border-color: #4f8cff;
        color: #c2d0ff;
    }

    .lang-btn.active {
        background: #4f8cff;
        color: white;
        border-color: #4f8cff;
    }

        .lang-btn.active:hover {
            background: #5a8dff;
            border-color: #5a8dff;
        }

/* 비밀번호 유효성 검사 메시지 스타일 (기존 field-validation-error와 동일) */
.password-validation {
    color: #ff9aa6;
    font-size: 12px;
    margin-top: 4px;
}

/* 비밀번호 확인 검사 메시지 스타일 (기존 field-validation-error와 동일) */
.confirm-password-validation {
    color: #ff9aa6;
    font-size: 12px;
    margin-top: 4px;
}

/* 에러 텍스트 스타일 (아이콘 포함) */
.validation-error {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 포커스 상태 우선순위 조정 */
.form-control:focus:not(.input-validation-error) {
    border-color: #4f8cff !important;
}

.form-control.input-validation-error {
    border-color: #ff4b6b !important;
}

    .form-control.input-validation-error:focus {
        border-color: #ff4b6b !important;
    }
