* {
    box-sizing: border-box;
    font-family: 'NanumSquareAc', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 18% 20%, rgba(119, 94, 255, 0.24), transparent 22%),
        radial-gradient(circle at 82% 18%, rgba(0, 209, 255, 0.17), transparent 24%),
        radial-gradient(circle at 50% 85%, rgba(255, 107, 107, 0.12), transparent 24%),
        linear-gradient(145deg, #08101f 0%, #0e1628 35%, #11192b 65%, #09111d 100%);
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
}

body::before {
    background:
        linear-gradient(rgba(8, 13, 24, 0.56), rgba(7, 11, 20, 0.76)),
        url('https://images.unsplash.com/photo-1516321318423-f06f85e504b3?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
    opacity: 0.44;
    z-index: -2;
}

body::after {
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.36), rgba(0,0,0,0));
    z-index: -1;
}

.signup-page {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

.hero-bg,
.overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.hero-bg {
    background:
        linear-gradient(rgba(8, 13, 24, 0.56), rgba(7, 11, 20, 0.76)),
        url('https://images.unsplash.com/photo-1526378722370-1b9d6d6d0d5d?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
    opacity: 0.42;
    transform: scale(1.04);
    z-index: 0;
}

.overlay {
    background:
        radial-gradient(circle at top right, rgba(255,255,255,0.09), transparent 30%),
        radial-gradient(circle at 20% 80%, rgba(119,94,255,0.15), transparent 30%),
        rgba(4,8,16,0.38);
    z-index: 1;
}

.signup-wrap {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100vh;
    padding: 118px 20px 52px;
}

.signup-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(380px, 470px);
    align-items: stretch;
    gap: 28px;
    width: min(1180px, calc(100% - 40px));
}

.hero-panel,
.signup-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.07));
    box-shadow: 0 30px 60px rgba(0,0,0,0.28);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.hero-panel::before,
.signup-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.18), transparent 30%, transparent 70%, rgba(255,255,255,0.06));
    pointer-events: none;
}

.hero-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px 38px;
    opacity: 0;
    animation: revealHeroPanel 1s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 14px;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.82);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.04em;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.hero-title {
    margin: 0 0 14px;
    font-size: clamp(42px, 5vw, 58px);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.hero-title span {
    color: rgba(255,255,255,0.72);
}

.hero-desc {
    max-width: 540px;
    margin: 0;
    color: rgba(255,255,255,0.74);
    font-size: 16px;
    line-height: 1.85;
}

.hero-points,
.hero-footer {
    display: flex;
    gap: 12px;
}

.hero-points {
    flex-wrap: wrap;
    margin-top: 24px;
}

.hero-point {
    display: inline-flex;
    align-items: center;
    padding: 11px 15px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.88);
    font-size: 14px;
    font-weight: 700;
}

.hero-footer {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 26px;
}

.hero-mini-card {
    min-height: 138px;
    padding: 18px;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 22px;
    background: rgba(255,255,255,0.08);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.mini-label {
    margin-bottom: 10px;
    color: rgba(255,255,255,0.54);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.mini-title {
    margin-bottom: 8px;
    font-size: 17px;
    font-weight: 800;
}

.mini-text {
    color: rgba(255,255,255,0.72);
    font-size: 13px;
    line-height: 1.7;
}

.signup-card {
    opacity: 0;
    animation: revealSignupCard 1s cubic-bezier(0.22, 1, 0.36, 1) 0.16s both;
}

.card-inner {
    position: relative;
    z-index: 1;
    padding: 26px 30px 28px;
}

.signup-title {
    margin: 0 0 20px;
    font-size: 34px;
    font-weight: 800;
    line-height: 1.05;
}

.form-field {
    position: relative;
    margin-bottom: 14px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: rgba(255,255,255,0.9);
    font-size: 14px;
    font-weight: 700;
}

.form-control {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 14px;
    outline: none;
    background: rgba(255,255,255,0.08);
    color: #fff;
    box-shadow: none;
}

.form-control::placeholder {
    color: rgba(255,255,255,0.45);
}

.form-control:focus {
    color: #fff;
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.36);
    box-shadow: 0 0 0 4px rgba(255,255,255,0.08);
}

input[type="password"] {
    font-family: Arial, sans-serif !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    caret-color: #fff !important;
}

.input-popup-hint {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 8;
    width: min(100%, 420px);
    padding: 12px 14px;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 14px;
    background: rgba(15, 22, 36, 0.96);
    color: rgba(255,255,255,0.82);
    font-size: 12px;
    line-height: 1.7;
    box-shadow: 0 18px 34px rgba(0,0,0,0.24);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    pointer-events: none;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.input-popup-hint.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.input-popup-hint strong {
    color: rgba(255,255,255,0.94);
    font-weight: 800;
}

.password-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.agree-field {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
}

.form-check-input {
    width: 16px;
    height: 16px;
    margin-top: 4px;
    border-color: rgba(255,255,255,0.3);
    background-color: rgba(255,255,255,0.1);
    box-shadow: none;
    cursor: pointer;
}

.form-check-label {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    line-height: 1.6;
}

.policy-link-btn {
    display: inline;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    color: #fff;
    font-weight: 800;
    text-decoration: underline;
    cursor: pointer;
}

.policy-link-btn:hover {
    color: rgba(255,255,255,0.82);
}

.btn-signup-submit {
    width: 100%;
    height: 54px;
    margin-top: 8px;
    border: none;
    border-radius: 14px;
    background: rgba(255,255,255,0.92);
    color: #000;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-signup-submit:hover {
    background: #fff;
    transform: translateY(-2px);
}

.bottom-text {
    margin-top: 22px;
    text-align: center;
    color: rgba(255,255,255,0.72);
    font-size: 14px;
}

.bottom-text a {
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

.bottom-text a:hover {
    text-decoration: underline;
}

.back-link {
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 5;
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.75);
    font-size: 14px;
    text-decoration: none;
    opacity: 0;
    animation: revealBackLink 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.92s both;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.back-link:hover {
    color: #000;
    background: rgba(255,255,255,0.95);
}

.message-box {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.7;
}

.message-box.error {
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.message-box.success,
.message-box.duplicate-notice {
    border: 1px solid rgba(255,255,255,0.92);
    background: rgba(255,255,255,0.92);
    color: #000;
}

.modal-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 10px 26px rgba(0,0,0,0.14);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.25s ease;
    cursor: pointer;
}

.modal-action-btn:hover {
    color: #000;
    background: rgba(255,255,255,0.94);
    border-color: rgba(255,255,255,0.94);
    transform: translateY(-2px);
}

/*
 * 모달 기본 숨김 처리
 * --------------------------------------------------------------------------
 * hidden 속성이 붙은 약관/개인정보 모달과 배경은
 * 화면에 보이지 않도록 확실히 숨깁니다.
 */
.modal-backdrop[hidden],
.policy-modal[hidden] {
    display: none !important;
}

/*
 * 모달이 열려 있을 때 배경 페이지가 같이 스크롤되지 않도록 합니다.
 */
body.modal-open {
    overflow: hidden;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(0,0,0,0.52);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.policy-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.policy-modal-panel {
    width: min(760px, 100%);
    max-height: min(760px, calc(100vh - 48px));
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(19,27,44,0.96), rgba(12,18,31,0.96));
    color: #fff;
    box-shadow: 0 30px 60px rgba(0,0,0,0.34);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.policy-modal-header,
.policy-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.policy-modal-footer {
    justify-content: flex-end;
    border-top: 1px solid rgba(255,255,255,0.08);
    border-bottom: none;
}

.policy-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
}

.modal-close-btn {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.policy-body {
    overflow-y: auto;
    padding: 20px 22px;
    color: rgba(255,255,255,0.84);
    font-size: 14px;
    line-height: 1.8;
}

.policy-body h4 {
    margin: 18px 0 8px;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
}

.policy-body h4:first-child {
    margin-top: 0;
}

.policy-body p,
.policy-body li {
    color: rgba(255,255,255,0.78);
}

@keyframes revealHeroPanel {
    0% { opacity: 0; transform: translateX(-28px) translateY(16px) scale(0.985); filter: blur(12px); }
    100% { opacity: 1; transform: translateX(0) translateY(0) scale(1); filter: blur(0); }
}

@keyframes revealSignupCard {
    0% { opacity: 0; transform: translateX(28px) translateY(16px) scale(0.985); filter: blur(12px); }
    100% { opacity: 1; transform: translateX(0) translateY(0) scale(1); filter: blur(0); }
}

@keyframes revealBackLink {
    0% { opacity: 0; transform: translateY(14px) translateX(-10px); filter: blur(8px); }
    100% { opacity: 1; transform: translateY(0) translateX(0); filter: blur(0); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-panel,
    .signup-card,
    .back-link {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
    }
}

@media (max-width: 1100px) {
    body {
        overflow-y: auto;
    }

    .signup-wrap {
        padding: 106px 16px 42px;
    }

    .signup-layout {
        grid-template-columns: 1fr;
        width: min(720px, calc(100% - 12px));
    }

    .hero-panel {
        padding: 30px 24px;
    }

    .hero-footer {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {

    .signup-wrap {
        min-height: 100vh;
        height: auto;
        padding: 96px 12px 90px;
    }

    .signup-layout {
        width: 100%;
    }

    .hero-panel,
    .signup-card {
        border-radius: 24px;
    }

    .hero-panel {
        padding: 24px 18px;
    }

    .card-inner {
        padding: 26px 18px 22px;
    }

    .signup-title {
        font-size: 28px;
    }

    .password-row {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .back-link {
        left: 16px;
        bottom: 18px;
    }
}
