﻿.register-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 10000 !important; 
    opacity: 0;
    transition: opacity 0.3s ease;
    visibility: hidden;
}

    .register-modal-overlay.show {
        display: flex !important;
        opacity: 1;
        visibility: visible;
    }

.register-modal-container {
    background: #1e1e1e;
    border-radius: 16px;
    padding: 32px;
    width: 450px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    position: relative !important;
}

.register-modal-overlay.show .register-modal-container {
    transform: scale(1);
}

/* 회원가입 헤더 (기존 스타일 재사용) */
.register-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.register-title {
    color: #fff;
    font-size: 24px;
    font-weight: 600;
    margin: 0;
}

.register-close-btn {
    background: none;
    border: none;
    color: #ccc;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

    .register-close-btn:hover {
        background: #333;
        color: #fff;
    }

/* 회원가입 폼 (기존 스타일 재사용) */
.register-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.register-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .register-input-group label {
        color: #ccc;
        font-size: 14px;
        font-weight: 500;
    }

    .register-input-group input,
    .register-input-group select {
        background: #2a2a2a;
        border: 1px solid #444;
        border-radius: 8px;
        padding: 12px 16px;
        color: #fff;
        font-size: 16px;
        transition: all 0.2s ease;
    }

        .register-input-group input:focus,
        .register-input-group select:focus {
            outline: none;
            border-color: #fa4646;
            box-shadow: 0 0 0 3px rgba(250, 70, 70, 0.1);
        }

        .register-input-group input::placeholder {
            color: #666;
        }

/* 전화번호 입력 (기존 스타일 재사용하되 조금 수정) */
.register-phone-input-wrapper {
    display: flex;
    border: 1px solid #444;
    border-radius: 8px;
    transition: all 0.2s ease;
    overflow: hidden;
    margin-bottom: 10px;
}

    .register-phone-input-wrapper:focus-within {
        border-color: #fa4646;
        box-shadow: 0 0 0 3px rgba(250, 70, 70, 0.1);
    }

.register-country-code {
    background: #2a2a2a;
    border: none;
    color: #fff;
    padding: 12px 10px;
    font-size: 14px;
    width: 140px;
    border-right: 1px solid #444;
    cursor: pointer;
    outline: none;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23ccc" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    flex-shrink: 0;
}

    .register-country-code option {
        background: #2a2a2a;
        color: #fff;
    }

.register-phone-input-wrapper input {
    background: #2a2a2a;
    border: none;
    padding: 12px 16px;
    color: #fff;
    font-size: 16px;
    flex: 1;
    outline: none;
}

    .register-phone-input-wrapper input::placeholder {
        color: #666;
    }

/* 인증번호 관련 (회원가입 전용) */
.verify-btn {
    background: linear-gradient(135deg, #fa4646, #e03e3e);
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    margin-top: 8px;
}

    .verify-btn:hover {
        background: linear-gradient(135deg, #e03e3e, #d63636);
    }

    .verify-btn:disabled {
        background: #666;
        cursor: not-allowed;
        transform: none;
    }

.verify-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

    .verify-input-wrapper input {
        flex: 1;
        margin-bottom: 0;
    }

.verify-timer {
    color: #fa4646;
    font-weight: 600;
    font-size: 14px;
    min-width: 50px;
    text-align: center;
}

/* 체크박스 (회원가입 전용) */
.register-checkbox-group {
    margin-bottom: -5px !important;
}

.register-checkbox-label {
    display: flex;
    align-items: center;
    color: #ccc;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}

    .register-checkbox-label input[type="checkbox"] {
        display: none;
    }

.register-checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #444;
    border-radius: 4px;
    margin-right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.register-checkbox-label input[type="checkbox"]:checked + .register-checkmark {
    background: #fa4646;
    border-color: #fa4646;
}

    .register-checkbox-label input[type="checkbox"]:checked + .register-checkmark::after {
        content: "✓";
        color: #fff;
        font-size: 12px;
        font-weight: bold;
    }

/* 전체 동의 체크박스 강조 */
.register-checkbox-group:first-of-type .register-checkbox-label {
    font-weight: 600;
    color: #fff;
    padding: 10px;
    background: #333;
    border-radius: 8px;
    margin-bottom: 8px;
}

/* 회원가입 버튼 (기존 로그인 버튼 스타일 재사용) */
.register-submit-btn {
    background: linear-gradient(135deg, #fa4646, #e03e3e);
    border: none;
    border-radius: 8px;
    padding: 14px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 16px;
}

    .register-submit-btn:hover {
        background: linear-gradient(135deg, #e03e3e, #d63636);
    }

    .register-submit-btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }

.register-password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

    .register-password-wrapper input {
        background: #2a2a2a;
        border: 1px solid #444;
        border-radius: 8px;
        padding: 12px 45px 12px 16px;
        color: #fff;
        font-size: 16px;
        transition: all 0.2s ease;
        width: 100%;
    }

        .register-password-wrapper input:focus {
            outline: none;
            border-color: #fa4646;
            box-shadow: 0 0 0 3px rgba(250, 70, 70, 0.1);
        }

        .register-password-wrapper input::placeholder {
            color: #666;
        }

.register-password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    z-index: 10;
}

    .register-password-toggle:hover {
        color: #fa4646;
    }

    .register-password-toggle i {
        font-size: 16px;
    }

/* 비밀번호 검증 메시지 */
.password-message {
    font-size: 12px;
    margin-top: 5px;
    padding: 5px 0;
}

    .password-message.error {
        color: #fa4646;
    }

    .password-message.success {
        color: #28a745;
    }

/* 약관 모달 스타일 */
.terms-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.terms-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.terms-modal-content {
    position: relative;
    background: linear-gradient(145deg, #2d2d2d, #1a1a1a);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 500px;
    max-height: 60vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.terms-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: #fa4646;
    color: white;
}

.terms-modal-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: white;
}

.terms-close-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
}

.terms-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background-color: #1a1a1a;
    color: #ffffff;
    line-height: 1.6;
}

    .terms-modal-body::-webkit-scrollbar {
        width: 8px;
    }

    .terms-modal-body::-webkit-scrollbar-track {
        background: #2d2d2d;
        border-radius: 4px;
    }

    .terms-modal-body::-webkit-scrollbar-thumb {
        background: #fa4646;
        border-radius: 4px;
    }

.terms-modal-footer {
    padding: 16px 24px 24px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background-color: #1a1a1a;
    display: flex;
    justify-content: center;
}

.terms-confirm-btn {
    background: #fa4646;
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.terms-link a {
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .terms-modal {
        padding: 10px;
    }

    .terms-modal-content {
        max-height: 90vh;
        border-radius: 12px;
    }

    .terms-modal-header {
        padding: 20px 20px 16px 20px;
    }

    .terms-modal-title {
        font-size: 18px;
    }

    .terms-modal-body {
        padding: 20px;
    }

    .terms-modal-footer {
        padding: 16px 20px 20px 20px;
    }
}