/* ─── Register 페이지 전용 Navbar 고정 스타일 ─── */
/* 회원가입 페이지는 항상 navbar 배경이 보여야 함 */
.navbar-main {
    background: rgba(255, 240, 245, 0.96) !important;
    backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(255, 20, 147, 0.15) !important;
    box-shadow: 0 2px 20px rgba(255, 20, 147, 0.08) !important;
}

/* 회원가입 페이지 초기 상태(밝은 배경)에서 흰색 로고 가독성 확보 */
.navbar-main:not(.scrolled) .brand-logo {
    filter: drop-shadow(0 0 1px rgba(0,0,0,0.1)) drop-shadow(0 0 3px rgba(255, 20, 147, 0.1));
}

/* scrolled 상태 (스크롤 내렸을 때) */
.navbar-main.scrolled {
    background: rgba(255, 20, 147, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(255, 0, 255, 0.2) !important;
    box-shadow: 0 4px 30px rgba(255, 20, 147, 0.35) !important;
}

body {
    background: #FFF0F5;
    min-height: 100vh;
    padding-top: 80px;
    color: var(--text-primary, #1A0A00);
}


/* ─── Step Bar ─── */
.step-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 3rem;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 2;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1rem;
    background: #FFFFFF;
    color: #8B5A2B;
    border: 1.5px solid #FF00FF;
    transition: all 0.3s;
}

.step-label {
    font-size: 0.8rem;
    color: #4A2A18;
    transition: 0.3s;
    white-space: nowrap;
}

.step-line {
    width: 60px;
    height: 2px;
    background: #FFE4E1;
    margin: 0 0.75rem 1.5rem;
    border-radius: 2px;
}

@media (max-width: 480px) {
    .step-line {
        width: 30px;
        margin: 0 0.5rem 1.5rem;
    }

    .step-label {
        font-size: 0.75rem;
    }
}

.step-item:has(.active) .step-circle {
    background: linear-gradient(135deg, #FF1493, #C71585);
    color: #FFF0F5;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(255, 20, 147, 0.35);
}

.step-item:has(.active) .step-label {
    color: #FF1493;
    font-weight: 500;
}

/* ─── Card ─── */
.register-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem 5rem;
}

.register-card {
    background: rgba(255, 240, 245, 0.96);
    border: 1px solid rgba(255, 20, 147, 0.12);
    padding: 4rem 3.5rem;
    width: 100%;
    max-width: 700px;
    box-shadow: 0 20px 60px rgba(255, 20, 147, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
}


.card-header-inner {
    text-align: center;
    margin-bottom: 3rem;
}

.card-title {
    font-family: 'Bebas Neue', var(--font-serif), sans-serif;
    font-size: 2.2rem;
    font-weight: 400;
    color: #1A0A00;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

.card-subtitle {
    color: #4A2A18;
    font-size: 0.9rem;
}


/* ─── Field ─── */
.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .field-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .register-card {
        padding: 2.5rem 1.5rem;
    }
}

.field-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.field-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #4A2A18;
    letter-spacing: 0.03em;
}


.input-wrap {
    position: relative;
}

.input-group-custom {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    flex-wrap: nowrap;
}

.input-group-custom .form-select-code {
    width: 110px;
    min-width: 90px;
    flex-shrink: 0;
    border: none !important;
    border-bottom: 1.5px solid #FF00FF !important;
    background-color: transparent !important;
    font-size: 0.82rem;
    height: 2.4rem !important;
    padding: 0.45rem 0 !important;
    border-radius: 0 !important;
    cursor: pointer;
    color: #1A0A00;
    -webkit-appearance: none;
    appearance: none;
}

.input-group-custom .form-select-code:focus {
    border-bottom-color: #FF1493 !important;
    outline: none;
    box-shadow: none;
}

.input-group-custom .input-wrap {
    flex: 1;
    min-width: 0;
}

@media (max-width: 480px) {
    .input-group-custom {
        gap: 0.35rem;
    }

    .input-group-custom .form-select-code {
        width: 95px;
        min-width: 80px;
        font-size: 0.78rem;
    }
}


.input-icon {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #8AACB8;
    font-size: 1.1rem;
    pointer-events: none;
    z-index: 5;
}

/* ─── Password Toggle ─── */
.password-toggle {
    position: absolute;
    right: 32px; /* Before the validate icon if it exists */
    top: 50%;
    transform: translateY(-50%);
    color: #8B5A2B;
    font-size: 1rem;
    cursor: pointer;
    z-index: 6;
    opacity: 0.6;
    transition: opacity 0.2s;
    padding: 0.25rem;
}

.password-toggle:hover {
    opacity: 1;
    color: #FF1493;
}

/* form-control/select override for light bg */
.form-control,
.form-select {
    padding-left: 2rem !important;
    padding-top: 0.45rem !important;
    padding-bottom: 0.45rem !important;
    height: 2.4rem !important;
    border-radius: 0 !important;
    background-color: transparent !important;
    border: none !important;
    border-bottom: 1.5px solid #FF00FF !important;
    color: #1A0A00 !important;
    box-shadow: none !important;
    font-size: 0.85rem !important;
    /* 셀렉트박스 크기 조정 */
}

/* select native dropdown */
.form-select,
select.form-control {
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23D62B2B' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 10px !important;
    /* 아이콘 크기 살짝 축소 */
}

.form-control:focus,
.form-select:focus {
    border-bottom-color: #FF1493 !important;
    box-shadow: none !important;
}

.form-control::placeholder {
    color: #8B5A2B !important;
}

.form-select option {
    background: #FFFFFF;
    color: #1A0A00;
    font-size: 0.85rem;
    padding: 8px;
}

@media (max-width: 576px) {
    .form-select {
        height: 2.4rem !important;
        /* 모바일에서 높이 제한 */
        padding-top: 0.45rem !important;
        padding-bottom: 0.45rem !important;
        font-size: 0.82rem !important;
    }
}


.form-control.is-valid,
.form-control.is-invalid {
    background-image: none !important;
}

/* ─── Validate Icon ─── */
.validate-icon {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: 0.2s;
    pointer-events: none;
    z-index: 5;
}

.validate-icon.show {
    opacity: 1;
}

.validate-icon.ok {
    color: #2e7d32;
}

.validate-icon.err {
    color: #e53935;
}

/* ─── Field Hint / Error ─── */
.field-hint {
    font-size: 0.78rem;
    margin-top: 0.35rem;
    min-height: 1.2em;
    transition: 0.2s;
}

.field-hint.ok {
    color: #2e7d32;
}

.field-hint.err {
    color: #e53935;
}

.field-hint.info {
    color: #8B5A2B;
}

.field-hint-inline {
    padding-left: 2.2rem;
    line-height: 1.5;
    font-size: 0.8rem;
    color: #8B5A2B;
}

/* ─── Password Strength Bar ─── */
.pw-strength-wrap {
    margin-top: 0.5rem;
}

.pw-strength-bar {
    height: 3px;
    background: #FFE4E1;
    position: relative;
    overflow: hidden;
    border-radius: 2px;
}

.pw-strength-fill {
    height: 100%;
    width: 0;
    transition: width 0.4s, background 0.4s;
    border-radius: 2px;
}

.pw-strength-text {
    font-size: 0.75rem;
    margin-top: 0.3rem;
    color: #8B5A2B;
}

/* ─── Email Check Button ─── */
.btn-check-custom {
    background: transparent;
    color: #FF1493;
    border: none;
    border-bottom: 1.5px solid #FF1493;
    font-size: 0.85rem;
    padding: 0 0.5rem;
    border-radius: 0;
    cursor: pointer;
    margin-left: 1rem;
    white-space: nowrap;
    transition: 0.2s;
}

.btn-check-custom:hover {
    color: #C71585;
    border-bottom-color: #C71585;
}

.btn-check-custom:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ─── Section Sep ─── */
.section-sep {
    display: flex;
    align-items: center;
    margin: 3rem 0 1.5rem;
    color: #4A2A18;
    font-size: 1.1rem;
    font-family: var(--font-display);
}

.section-sep::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #FFE4E1;
    margin-left: 1.5rem;
}


/* ─── Agreement Section ─── */
.agreement-block {
    background: rgba(255, 20, 147, 0.04);
    border: 1px solid rgba(255, 20, 147, 0.15);
    padding: 0 1.25rem;
    margin-bottom: 2rem;
    border-radius: 8px;
}


.badge-req {
    font-size: 0.7rem;
    padding: 0.2em 0.5em;
    background: linear-gradient(135deg, #FF1493, #C71585);
    color: #FFF0F5;
    margin-right: 0.5rem;
    border-radius: 3px;
}

.badge-opt {
    font-size: 0.7rem;
    padding: 0.2em 0.5em;
    background: rgba(255, 20, 147, 0.1);
    color: #4A2A18;
    margin-right: 0.5rem;
    border-radius: 3px;
}


/* ─── Magic Link Info ─── */
.magic-info {
    background: rgba(255, 20, 147, 0.04);
    border: 1px solid rgba(255, 20, 147, 0.15);
    border-left: 3px solid #FF1493;
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
    font-size: 0.85rem;
    color: #4A2A18;
    line-height: 1.6;
    border-radius: 0 8px 8px 0;
}


/* ─── Confirm Modal ─── */
.confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(30, 58, 74, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.confirm-overlay.show {
    display: flex;
}

.confirm-box {
    background: #FFFFFF;
    border: 1px solid rgba(255, 20, 147, 0.2);
    padding: 3rem 2.5rem;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(255, 20, 147, 0.15);
    border-radius: 16px;
}


.confirm-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: #1A0A00;
}

.confirm-desc {
    color: #4A2A18;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.confirm-summary {
    border-top: 1px solid #FFE4E1;
    border-bottom: 1px solid #FFE4E1;
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    text-align: left;
}

.confirm-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    font-size: 0.9rem;
}

.confirm-summary-row .k {
    color: #8B5A2B;
}

.confirm-summary-row .v {
    color: #1A0A00;
    font-weight: 500;
}

.confirm-actions {
    display: flex;
    gap: 1rem;
}

.confirm-actions button {
    flex: 1;
    padding: 1rem;
    border: none;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.3s;
    border-radius: 8px;
}

.btn-confirm-cancel {
    background: #FFF0F5;
    color: #4A2A18;
    border: 1px solid #FFE4E1 !important;
}

.btn-confirm-cancel:hover {
    background: #FFE4E1;
}

.btn-confirm-ok {
    background: linear-gradient(135deg, #FF1493, #C71585);
    color: #FFF0F5;
    border: none;
}

.btn-confirm-ok:hover {
    opacity: 0.9;
    box-shadow: 0 4px 20px rgba(255, 20, 147, 0.4);
}


/* ─── Agreement items ─── */
.agreement-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.25rem 0;
    gap: 0.75rem;
}

.agreement-item:not(:last-child) {
    border-bottom: 1px solid rgba(255, 20, 147, 0.1);
}


.agreement-label-wrap {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    flex: 1;
}

.agreement-item input[type="checkbox"] {
    margin-top: 0.25rem;
    flex-shrink: 0;
    width: 1.1rem;
    height: 1.1rem;
    border: 1.5px solid #FF00FF;
    border-radius: 3px;
    background-color: #FFFFFF;
    cursor: pointer;
    transition: all 0.2s;
    accent-color: #FF1493;
}

.agreement-item input[type="checkbox"]:checked {
    border-color: #FF1493;
    background-color: #FF1493;
}

.agreement-item input[type="checkbox"]:focus {
    box-shadow: 0 0 0 3px rgba(255, 20, 147, 0.2);
    outline: none;
}


.agreement-text {
    font-size: 0.82rem;
    line-height: 1.5;
    color: #4A2A18;
    cursor: pointer;
    word-break: keep-all;
}

/* 일본어 환경에서 줄바꿈 처리 (레이아웃 깨짐 방지) */
html:lang(ja) .agreement-text {
    word-break: normal;
    overflow-wrap: break-word;
}


/* ─── Agreement View Button ─── */
.btn-terms-view {
    background: transparent;
    border: none;
    color: #8B5A2B;
    font-size: 0.72rem;
    text-decoration: underline;
    cursor: pointer;
    padding: 0.25rem 0;
    transition: color 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-terms-view:hover {
    color: #FF1493;
}


.email-notify-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 20, 147, 0.08);
    border: 1px solid rgba(255, 20, 147, 0.2);
    padding: 0.25rem 0.75rem;
    font-size: 0.78rem;
    color: #4A2A18;
    margin-bottom: 1rem;
    border-radius: 20px;
}

/* ─── Modal ─── */
.modal-content {
    background: #FFFFFF;
    border: 1px solid rgba(255, 20, 147, 0.15);
    color: #1A0A00;
    border-radius: 12px;
}

.modal-header {
    border-bottom: 1px solid #FFE4E1;
}

.modal-footer {
    border-top: 1px solid #FFE4E1;
}

.btn-close {
    filter: none;
}

.btn-modal-close {
    background: #FFF0F5;
    border: 1px solid #FFE4E1;
    color: #4A2A18;
    padding: 0.5rem 1.5rem;
    cursor: pointer;
    transition: 0.2s;
    border-radius: 6px;
}

.btn-modal-close:hover {
    background: #FFE4E1;
    color: #1A0A00;
}

/* ─── btn-accent for light theme ─── */
.btn-accent {
    border-color: #FF1493 !important;
    color: #FF1493 !important;
    background-image: linear-gradient(to right, transparent 50%, #FF1493 50%) !important;
}

.btn-accent:hover {
    color: #FFF0F5 !important;
    box-shadow: 0 4px 20px rgba(255, 20, 147, 0.3);
}

/* ─── ambient bg soft glow ─── */
/* 로고 배경과의 간섭을 줄이기 위해 배경 장식 제거 */
.register-container::before,
.register-container::after {
    display: none;
}

.register-container>* {
    position: relative;
    z-index: 1;
}

/* ─── Smooth Transition for Custom Inputs ─── */
.custom-input-transition {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: top;
}

.custom-input-transition.d-none {
    display: none !important;
}

.custom-input-transition:not(.d-none) {
    animation: slideDownFade 0.3s forwards;
}

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

#customCountryCode {
    width: 80px;
}
