/* public/css/auth.css */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    /* 背景依然保持深色，为了衬托白色的卡片和光斑 */
    background-color: #0b1121; 
    margin: 0;
    height: 100vh;
    overflow: hidden; 
    position: relative; 
}

/* ================= 苹果风：动态弥散光斑背景 ================= */
.ambient-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.color-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.6;
    animation: floatShape 20s infinite ease-in-out alternate;
}

.shape-1 { width: 50vw; height: 50vw; background: #007aff; top: -10vw; left: -10vw; }
.shape-2 { width: 40vw; height: 40vw; background: #5856d6; bottom: -10vw; right: -10vw; animation-delay: -5s; }
.shape-3 { width: 35vw; height: 35vw; background: #34aadc; top: 30%; left: 50%; transform: translate(-50%, -50%); animation-delay: -10s; }

@keyframes floatShape {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(5%, 8%) scale(1.1); }
    100% { transform: translate(-5%, -5%) scale(0.95); }
}

.auth-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.auth-card {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); 
    padding: 40px 32px;
    position: relative;
    overflow: hidden;
    min-height: 370px; 
    width: 100%;
    transition: min-height 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease; 
}

.auth-card.register-mode {
    min-height: 510px; /* 注册页需要的高度 */
}

.auth-form {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 40px;
    left: 32px;
    right: 32px;
    opacity: 0;
    transform: translateX(50px);
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.auth-form.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.auth-form.exit {
    opacity: 0;
    transform: translateX(-50px);
}

h2 {
    color: #1d1d1f;
    margin-bottom: 28px;
    text-align: center;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* 表单控件 */
.input-group {
    margin-bottom: 20px;
}

.input-group input {
    width: 100%;
    padding: 14px 16px;
    background-color: #f2f2f7; 
    border: 1px solid rgba(0, 0, 0, 0.08); 
    border-radius: 12px;
    font-size: 15px;
    color: #1d1d1f;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.input-group input::placeholder {
    color: #86868b;
}

.input-group input:focus {
    outline: none;
    background-color: #ffffff;
    border-color: #007aff;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.15);
}

.input-group input.input-error {
    border-color: #ff3b30;
    background-color: #fffaf9;
    box-shadow: 0 0 0 4px rgba(255, 59, 48, 0.1);
}

/* ================= 按钮与文本 ================= */
.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn:active {
    transform: scale(0.96);
}

.primary-btn {
    background-color: #007aff;
    color: #fff;
    margin-top: 8px;
}

.primary-btn:hover {
    background-color: #0066d6;
}

.switch-tip {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: #86868b;
}

.switch-tip span {
    color: #007aff;
    cursor: pointer;
    font-weight: 500;
    transition: color 0.2s;
}

.switch-tip span:hover {
    color: #0056b3;
}

.msg-box {
    text-align: center;
    margin-top: 15px;
    font-size: 13px;
    min-height: 18px;
}

/* ================= 验证码排版专属样式 ================= */
.captcha-group {
    display: flex; /* 开启 Flex 布局，这是横向排布的核心 */
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.captcha-group input {
    width: 55%; /* 输入框占 55% 宽度 */
    margin-bottom: 0; /* 覆盖默认的底部边距 */
}

.captcha-box {
    width: 40%; /* 图片框占 40% 宽度，留下 5% 的间距 */
    height: 48px; /* 完美对齐左侧苹果风输入框的高度 */
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.3s;
}

/* 鼠标悬浮时给个苹果蓝边框反馈 */
.captcha-box:hover {
    border-color: #007aff;
}

/* 确保 SVG 撑满整个盒子且去除底部默认留白 */
.captcha-box svg {
    width: 100%;
    height: 100%;
    display: block; 
}