/* animation: 로그인 화면 배경과 장식 모션 */
.gradient-custom {
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
    color: rgba(25, 31, 40, 1);
    background:
        radial-gradient(circle at 12% 12%,
            rgba(49, 130, 246, 0.16) 0%,
            rgba(49, 130, 246, 0) 34%),
        radial-gradient(circle at 88% 84%,
            rgba(92, 124, 250, 0.13) 0%,
            rgba(92, 124, 250, 0) 32%),
        linear-gradient(145deg,
            rgba(247, 249, 252, 1),
            rgba(238, 245, 255, 1));
    background-size: 120% 120%;
    animation: gradientAnimation 24s ease-in-out infinite alternate;
}
@keyframes gradientAnimation {
    from { background-position: 0% 0%; }
    to { background-position: 100% 100%; }
}
.gradient-custom::before,
.gradient-custom::after {
    content: '';
    position: fixed;
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    pointer-events: none;
}
.gradient-custom::before {
    top: -8rem;
    right: -7rem;
    width: 22rem;
    height: 22rem;
}
.gradient-custom::after {
    bottom: -6rem;
    left: -5rem;
    width: 16rem;
    height: 16rem;
}

/* layout: 로그인 쉘 레이아웃 */
.login-shell {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* layout: 로그인 카드 섹션 레이아웃 */
.login-card {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    overflow: hidden;
    width: 100%;
    max-width: 62rem;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 2rem;
    background-color: rgba(255, 255, 255, 0.82);
    box-shadow: 0 30px 90px rgba(15, 23, 42, 0.13);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

/* layout: 로그인 카드 내 좌측 섹션 레이아웃 */
.login-story {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    container-type: inline-size; /* 번역 제목 크기를 좌측 영역 너비에 맞춘다. */
    min-height: 36rem;
    padding: clamp(2rem, 5vw, 3.5rem) clamp(2rem, 4vw, 3rem);
    color: rgba(255, 255, 255, 1);
    background:
        radial-gradient(circle at 82% 12%,
            rgba(255, 255, 255, 0.22) 0%,
            rgba(255, 255, 255, 0) 30%),
        linear-gradient(155deg,
            rgba(49, 130, 246, 1),
            rgba(27, 100, 218, 1));
}
.login-story::after {
    content: '';
    position: absolute;
    right: -4rem;
    bottom: -5rem;
    width: 17rem;
    height: 17rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.08);
}
.login-story__eyebrow {
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.75rem;
    font-weight: 750;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.login-story__title {
    width: 100%;
    max-width: none;
    margin-bottom: 1rem;
    font-size: clamp(2.2rem, 14.25cqi, 3.4rem);
    font-weight: 800;
    line-height: 1.14;
    letter-spacing: -0.06em;
}
.login-story__title-line {
    display: block;
    white-space: nowrap;
}
.login-story__description {
    max-width: 22rem;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.75;
}

/* layout: 로그인 카드 내 우측 섹션 레이아웃 */
.login-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 36rem;
    padding: clamp(2rem, 6vw, 4.5rem);
}
.login-panel__eyebrow {
    margin: 2.5rem 0 0.65rem;
    color: rgba(49, 130, 246, 1);
    font-size: 0.76rem;
    font-weight: 750;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.login-panel__title {
    margin-bottom: 0;
    color: rgba(25, 31, 40, 1);
    font-size: clamp(1.85rem, 4vw, 2.65rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.055em;
}

/* layout: 로그인 안내 문구 */
.login-message {
    min-height: 3.3rem;
    margin: 0.9rem 0 2rem;
    color: rgba(107, 118, 132, 1);
    line-height: 1.65;
}

/* layout: Google 로그인 버튼 */
.google-login-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    min-height: 4.6rem;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(15, 23, 42, 0.09);
    border-radius: 1.1rem;
    color: rgba(25, 31, 40, 1);
    background-color: rgba(255, 255, 255, 1);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
    text-align: left;
    text-decoration: none;
    transition: border-color 0.22s ease, box-shadow 0.22s ease,
        transform 0.22s ease;
}
.google-login-link::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 1.1rem;
    background: radial-gradient(circle,
        rgba(49, 130, 246, 0.12) 0%,
        rgba(49, 130, 246, 0) 72%);
    opacity: 0;
    transition: opacity 0.22s ease;
    pointer-events: none;
}

/* interaction: Google 로그인 버튼의 hover·focus glow 상태 */
.google-login-link:hover,
.google-login-link:focus {
    border-color: rgba(49, 130, 246, 0.34);
    color: rgba(25, 31, 40, 1);
    box-shadow: 0 16px 36px rgba(49, 130, 246, 0.14);
    text-decoration: none;
    transform: translateY(-2px);
}
.google-login-link:hover::before {
    opacity: 1;
}
.google-login-link img {
    position: relative;
    z-index: 1;
    width: 2rem;
    height: 2rem;
    object-fit: contain;
}
.google-login-link__copy {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}
.google-login-link__title {
    font-size: 0.95rem;
    font-weight: 720;
}
.google-login-link__description {
    margin-top: 0.15rem;
    color: rgba(107, 118, 132, 1);
    font-size: 0.76rem;
    line-height: 1.35;
}
.google-login-link__arrow {
    position: relative;
    z-index: 1;
    color: rgba(139, 149, 161, 1);
    font-size: 1rem;
    transition: transform 0.22s ease;
}
.google-login-link:hover .google-login-link__arrow {
    transform: translateX(3px);
}

/* 접근성: Google 로그인 버튼의 키보드 포커스 표시 */
.google-login-link:focus-visible {
    outline: 3px solid rgba(49, 130, 246, 0.3);
    outline-offset: 3px;
}

/* animation: Google 로그인 로딩 상태 전환 */
.google-login-link.is-loading {
    pointer-events: none;
    opacity: 0.62;
    transform: none;
}
.google-login-loading {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.25s ease, margin-top 0.35s ease;
    margin-top: 0;
}
.google-login-loading.is-visible {
    max-height: 96px;
    opacity: 1;
    margin-top: 1rem;
}
.google-login-loading__inner {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.75rem 0.9rem;
    border-radius: 0.9rem;
    color: rgba(51, 61, 75, 1);
    background-color: rgba(235, 244, 255, 0.75);
    font-size: 0.85rem;
}
.google-login-loading .spinner-border {
    width: 1.1rem;
    height: 1.1rem;
    border-width: 0.13rem;
    color: rgba(49, 130, 246, 1) !important;
}

/* layout: 로그인 카드 내 우측 보안 안내 */
.login-security-note {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin: 1.5rem 0 0;
    color: rgba(139, 149, 161, 1);
    font-size: 0.75rem;
    line-height: 1.55;
}

/* layout: 로그인 카드 하단의 언어 선택 토글 */
.login-panel > .language-selector {
    align-self: center;
    margin-top: 1.35rem;
}

/* 반응형layout: 태블릿·모바일에서 로그인 카드를 단일 열로 전환 */
@media (max-width: 767.98px) {
    .login-card {
        display: block;
        max-width: 32rem;
        border-radius: 1.5rem;
    }
    .login-story {
        min-height: auto;
        padding: 1.6rem;
    }
    .login-story__title,
    .login-story__description {
        display: none;
    }
    .login-panel {
        min-height: auto;
        padding: 2rem 1.5rem;
    }
    .login-panel__eyebrow {
        margin-top: 0;
    }
}

/* 반응형layout: 소형 모바일에서 Google 로그인 설명을 생략 */
@media (max-width: 375px) {
    .google-login-link__description {
        display: none;
    }
    .google-login-link {
        min-height: 3.8rem;
    }
}

/* 접근성: 사용자가 모션 감소를 선택한 경우 */
@media (prefers-reduced-motion: reduce) {
    .gradient-custom {
        animation: none;
    }
    .google-login-link,
    .google-login-link__arrow,
    .google-login-loading {
        transition: none;
    }
}
