/* 注册页面专用样式 */

/* Vue路由视图容器样式 */
#app > div {
    min-height: 100vh;
    width: 100%;
}

/* 登录框样式 */
.v2board-auth-box {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    animation: fadeIn 0.6s ease-out;
    width: 100%;
}

/* 背景样式 */
.v2board-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('https://bing-wallpaper.flashcat.online');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
}

/* 底部链接样式 */
.bg-gray-lighter {
    background-color: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

.text-left {
    text-align: left;
}

/* 注册页面特定样式 */
.register-page .font-size-h1 img {
    height: 65px;
    width: auto;
}

.register-page .font-size-sm {
    color: #6c757d;
    margin-bottom: 1rem;
}

/* 邮箱白名单样式 */
.v2board-email-whitelist-enable {
    position: relative;
}

/* 注册页面表单行样式 */
.form-row {
    display: flex;
    gap: 0;
    align-items: flex-start;
}

.form-row .form-control:first-child:focus {
    border-right: 1px solid #20a53a;
    z-index: 2;
    position: relative;
}

/* 自定义复选框样式 */
.custom-control {
    position: relative;
    display: inline-block;
    padding-left: 1.5rem;
    min-height: 1.5rem;
    line-height: 1.5rem;
    width: auto;
}

.custom-control-input {
    position: absolute;
    left: 0;
    z-index: -1;
    opacity: 0;
}

.custom-control-label {
    position: relative;
    margin-bottom: 0;
    color: #6c757d;
    cursor: pointer;
    font-size: 0.875rem;
    display: inline-block;
    width: auto;
    max-width: 100%;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.custom-control-label::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -1.5rem;
    display: block;
    width: 1rem;
    height: 1rem;
    pointer-events: none;
    background-color: #fff;
    border: 1px solid #adb5bd;
    border-radius: 0.25rem;
    transform: translateY(-50%);
}

.custom-control-label::after {
    content: "";
    position: absolute;
    top: 50%;
    left: -1.5rem;
    display: block;
    width: 1rem;
    height: 1rem;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 0.75rem 0.75rem;
    transform: translateY(-50%);
}

.custom-control-input:checked ~ .custom-control-label::before {
    background-color: #20a53a;
    border-color: #20a53a;
}

.custom-control-input:checked ~ .custom-control-label::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='white' d='M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e");
    background-size: 0.75rem 0.75rem;
}

.custom-control-input:focus ~ .custom-control-label::before {
    box-shadow: 0 0 0 0.2rem rgba(32, 165, 58, 0.25);
}

.custom-control-primary .custom-control-input:checked ~ .custom-control-label::before {
    background-color: #20a53a;
    border-color: #20a53a;
}

/* 自定义下拉选择组件样式 */
.custom-select-wrapper {
    position: relative;
    height: 48px;
    flex-shrink: 0;
}

.custom-select {
    width: 100%;
    height: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-left: none;
    border-radius: 0 8px 8px 0;
    background: #f8f9fa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    color: #333;
    box-sizing: border-box;
    position: relative;
    white-space: nowrap;
}

.custom-select:hover {
    background: #f8f9fa;
}

.custom-select.active {
    background: #fff;
    border-color: #20a53a;
    box-shadow: 0 0 0 3px rgba(32, 165, 58, 0.1);
}

.dropdown-arrow {
    transition: transform 0.3s ease;
    color: #6c757d;
}

.custom-select.active .dropdown-arrow {
    transform: rotate(180deg);
}

.custom-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
}

.custom-option {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 14px;
    color: #333;
}

.custom-option:hover {
    background-color: #f8f9fa;
}

.custom-option.selected {
    background-color: #e8f5e8;
    color: #20a53a;
    font-weight: 500;
}

.custom-option:first-child {
    border-radius: 0;
}

.custom-option:last-child {
    border-radius: 0 0 8px 8px;
}

/* 连接表单的特殊样式 */
.form-row .form-control:first-child {
    border-right: 1px solid #e0e0e0;
}

.form-row .form-control:first-child:focus {
    border-right: 1px solid #20a53a;
    z-index: 2;
    position: relative;
}

.form-row .custom-select-wrapper .custom-select {
    border-left: none;
    position: relative;
    z-index: 1;
}

.form-row .custom-select-wrapper .custom-select:hover {
    background: #fff;
}

.form-row .custom-select-wrapper .custom-select.active::before {
    content: '';
    position: absolute;
    left: -1px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: #20a53a;
    z-index: 3;
}

/* 注册页面底部链接样式 */
.register-i18n-btn {
    float: right;
    cursor: pointer;
}

/* reCAPTCHA 模态框样式 */
.recaptcha-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.recaptcha-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.recaptcha-content {
    position: relative;
    background: white;
    padding: 25px;
    border-radius: 8px;
    max-width: 360px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.recaptcha-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.recaptcha-header h3 {
    margin: 0;
    color: #333;
    font-size: 16px;
}

.recaptcha-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    transition: color 0.2s ease;
}

.recaptcha-close:hover {
    color: #333;
}

#recaptcha-container {
    display: flex;
    justify-content: center;
    transform: scale(0.95);
    transform-origin: center;
}

/* 响应式设计 */
@media (max-width: 576px) {
    .v2board-auth-box {
        padding: 10px;
    }
    .register-page .font-size-h1 {
        font-size: 2rem;
    }
    .v2board-auth-box > div {
        max-width: 100% !important;
    }
    .register-page .block-content > div {
        max-width: 100% !important;
    }
}

@media (max-width: 768px) {
    .v2board-auth-box {
        padding: 15px;
    }
    .register-page .block-content > div {
        max-width: 100% !important;
    }
}

@media (max-width: 480px) {
    .register-page .font-size-h1 img {
        height: 50px !important;
    }
    .register-page .font-size-sm {
        font-size: 0.8rem;
    }
    .register-page .btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    .register-page .form-control {
        padding: 10px 14px;
        font-size: 13px;
    }
}
