﻿/* 기본 스타일 및 CSS 변수 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
}

:root {
    /* 배경 및 텍스트 */
    --body-bg: #fff;
    --text-color: #111;
    --text-muted: #111;
    /* 컨테이너 */
    --container-bg: rgba(0, 0, 0, 0.75);
    --container-border: rgba(255, 255, 255, 0.15);
    /* 입력 필드 */
    --input-bg: rgba(255, 255, 255, 0.1);
    --input-border: rgba(255, 255, 255, 0.2);
    --input-focus-bg: rgba(255, 255, 255, 0.15);
    --input-focus-border: rgba(255, 255, 255, 0.3);
    /* 레이블 */
    --label-bg: rgba(0, 0, 0, 0.6);
    /* 버튼 (모든 버튼에 동일하게 적용) */
    --button-bg: rgba(240, 240, 240, 0.9);
    --button-color: #000;
    --button-hover-bg: rgba(255, 255, 255, 1);
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* body 스타일 */
body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    -webkit-justify-content: center;
    align-items: center;
    -webkit-align-items: center;
    background: var(--body-bg);
    position: relative;
    overflow: auto;
}

    body .container {
        width: 100%;
    }

/* 배경 캔버스 */
#gradient-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0;
    transition: opacity 2s ease;
    -webkit-transition: opacity 2s ease;
    display: block;
}

.login-header {
    display: flex;
    justify-content: center;
    -webkit-justify-content: center;
    align-items: center;
    -webkit-align-items: center;
    margin-bottom: 2rem;
}

    .login-header img {
        width: auto;
        height: 4rem;
    }


/* 회원가입 페이지 컨테이너 */
.registerpage-container {
    width: 100%;
    padding: 1rem;
}

/* 공통 컨테이너 (로그인/회원가입) - 항상 400px 폭, 작은 화면에서는 95%까지 축소 */
.login-container {
    backdrop-filter: blur(12px);
    border-radius: 24px;
    -webkit-border-radius: 24px;
    border: 1px solid var(--container-border);
    padding: 1rem;
    width: 100%;
    max-width: 400px;
    margin: 1rem auto;
    transform: translateY(20px);
    -webkit-transform: translateY(20px);
    opacity: 0;
    animation: slideUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    -webkit-animation: slideUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: 0.5s;
    -webkit-animation-delay: 0.5s;
}

    .login-container h2 {
        text-align: center;
        color: var(--text-color);
        margin-bottom: 1.5rem;
    }

/* 진행 단계 표시 */
.step-indicator {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--text-color);
}

/* 안내 문구 (instruction) */
.instruction {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    text-align: center;
}

/* 폼 그룹 */
.form-group {
    position: relative;
    margin-bottom: 1rem;
}

    .form-group input {
        width: 100%;
        background: #f0f0f0;
        border: none;
        border-radius: 3.75rem;
        -webkit-border-radius: 3.75rem;
        padding: 0.9rem 1rem;
        color: var(--text-color);
        font-size: 1rem;
        transition: all 0.3s ease;
        -webkit-transition: all 0.3s ease;
    }

        .form-group input:focus {
            outline: none;
            border-color: var(--input-focus-border);
            box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
            -webkit-box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
        }

        .form-group input::placeholder {
        }

    .form-group label {
        display: block;
        color: var(--text-color);
        margin-bottom: 0.5rem;
        font-size: 0.95rem;
        font-weight: 500;
        position: absolute;
        top: -0.7rem;
        left: 1rem;
        background: var(--label-bg);
        padding: 0 0.25rem;
        font-size: 0.8rem;
    }

    .form-group .id-check {
        display: flex;
        justify-content: space-between;
        -webkit-justify-content: space-between;
        align-items: center;
        -webkit-align-items: center;
        gap: 5px;
    }

        .form-group .id-check input {
            flex: 1;
            -webkit-flex: 1;
        }

/* 전화번호 입력 그룹 */
.phone-group {
    position: relative;
}

    .phone-group .btn-phone-verify {
        position: absolute;
        right: 0.5rem;
        top: 50%;
        transform: translateY(-50%);
        -webkit-transform: translateY(-50%);
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
        background: transparent;
        color: var(--button-color);
        border: none;
        border-radius: 20px;
        -webkit-border-radius: 20px;
        cursor: pointer;
        transition: all 0.3s ease;
        -webkit-transition: all 0.3s ease;
    }

        .phone-group .btn-phone-verify:hover {
            background: #7118FF;
            color: #fff;
        }

/* 오류 및 안내 메시지 */
.error {
    color: #ff6b6b;
    font-size: 0.8rem;
    margin: 0.5rem 0;
    display: block;
    text-indent: 10px;
}

.info {
    color: #6e4aff;
    font-size: 0.8rem;
    margin: -0.5rem 0 1rem;
    display: block;
    text-indent: 10px;
}

/* 버튼 스타일 (모든 버튼 동일하게 적용) */
.button-group button,
.btn-next,
.btn-back,
.btn-check,
.btn-login {
    width: 100%;
    background: var(--button-bg);
    color: var(--button-color);
    border: none;
    border-radius: 30px;
    -webkit-border-radius: 30px;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-transition: all 0.3s ease;
    margin-bottom: 1rem;
    text-align: center;
    line-height: 1.2;
}

    .button-group button:hover,
    .btn-next:hover,
    .btn-back:hover,
    .btn-check:hover,
    .btn-login:hover {
        transform: translateY(-2px);
        -webkit-transform: translateY(-2px);
        box-shadow: var(--box-shadow);
        -webkit-box-shadow: var(--box-shadow);
    }

.btn-next, .btn-login {
    color: #fff !important;
    background: #7118FF !important;
}

.button-group {
    margin-top: 2rem;
    display: flex;
    justify-content: space-between;
    -webkit-justify-content: space-between;
    gap: 1rem;
}

.btn-check {
    width: 85px;
    font-size: 15px;
    margin: 0;
}

/* 하단 '로그인창으로 돌아가기' 링크 - 텍스트 링크 스타일 */
.signup-section {
    text-align: center;
    margin-top: 1rem;
}

    .signup-section a.btn-signup {
        background: none;
        border: none;
        border-radius: 0;
        -webkit-border-radius: 0;
        padding: 0;
        color: #111;
        text-decoration: none;
        -webkit-text-decoration: none;
        font-size: 1rem;
        font-weight: normal;
        cursor: pointer;
        transition: color 0.3s ease;
        -webkit-transition: color 0.3s ease;
    }

        .signup-section a.btn-signup:hover {
            color: #6e4aff;
            text-decoration: underline;
        }

/* 애니메이션 */
@keyframes slideUp {
    0% {
        transform: translateY(20px);
        -webkit-transform: translateY(20px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        -webkit-transform: translateY(0);
        opacity: 1;
    }
}

hr {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin: 1rem 0;
}
