/* ==========================================
   Vell - 认证页面样式
   风格：与主页统一的苹果风格 · 黑白配色
   ========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---------- 返回主页 ---------- */
.back-home {
    position: fixed;
    top: 24px;
    left: 24px;
    color: #888;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid #eee;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    z-index: 100;
}

.back-home:hover {
    color: #1a1a1a;
    border-color: #1a1a1a;
}

/* ---------- 认证容器 ---------- */
.auth-container {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    animation: fadeUp 0.6s ease-out;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-box {
    background: #ffffff;
    padding: 48px 40px;
    border-radius: 20px;
    border: 1px solid #f0f0f0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.04);
    transition: all 0.4s ease;
}

.auth-box:hover {
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.06);
}

/* ---------- Header ---------- */
.auth-header {
    text-align: center;
    margin-bottom: 36px;
}

.auth-brand {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 16px;
}

.auth-brand .brand-icon {
    color: #1a1a1a;
}

.auth-brand .brand-name {
    color: #1a1a1a;
}

.auth-brand .brand-domain {
    color: #888;
    font-weight: 400;
}

.auth-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.auth-header p {
    color: #888;
    font-size: 15px;
}

/* ---------- 表单 ---------- */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    letter-spacing: 0.3px;
}

/* ---------- 手机号输入组 ---------- */
.phone-input-group {
    display: flex;
    align-items: stretch;
    background: #f8f8f8;
    border: 1.5px solid #eee;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.phone-input-group:focus-within {
    border-color: #1a1a1a;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.04);
}

.phone-input-group input[type="tel"] {
    flex: 1;
    padding: 14px 16px;
    border: none;
    background: transparent;
    font-size: 15px;
    outline: none;
    min-width: 0;
    font-family: inherit;
}

.country-code-selector {
    display: flex;
    align-items: center;
    padding: 14px 12px 14px 16px;
    cursor: pointer;
    border-right: 1.5px solid #eee;
    min-width: 80px;
    user-select: none;
    font-size: 14px;
    color: #333;
    transition: background 0.2s ease;
    position: relative;
}

.country-code-selector:hover {
    background: rgba(0, 0, 0, 0.02);
}

.country-code-selector .dropdown-arrow {
    margin-left: 6px;
    font-size: 10px;
    color: #999;
    transition: transform 0.3s ease;
}

.country-dropdown.show ~ .country-code-selector .dropdown-arrow {
    transform: rotate(180deg);
}

/* ---------- 国家下拉菜单 ---------- */
.country-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: #ffffff;
    border: 1px solid #eee;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
    max-height: 240px;
    overflow-y: auto;
    z-index: 1000;
    min-width: 200px;
    padding: 6px 0;
}

.country-dropdown.show {
    display: block;
    animation: dropdownIn 0.2s ease-out;
}

@keyframes dropdownIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.country-dropdown::-webkit-scrollbar {
    width: 4px;
}

.country-dropdown::-webkit-scrollbar-track {
    background: #f8f8f8;
    border-radius: 4px;
}

.country-dropdown::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 4px;
}

.country-item {
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.15s ease;
    font-size: 14px;
    color: #333;
}

.country-item:hover {
    background: #f5f5f5;
}

.country-item:active {
    background: #eee;
}

/* ---------- 验证码输入组 ---------- */
.sms-code-group {
    display: flex;
    gap: 10px;
}

.sms-code-group input {
    flex: 1;
    padding: 14px 16px;
    border: 1.5px solid #eee;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8f8f8;
    font-family: inherit;
}

.sms-code-group input:focus {
    outline: none;
    border-color: #1a1a1a;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.04);
}

.btn-sms {
    padding: 14px 24px;
    background: #f0f0f0;
    color: #333;
    border: 1.5px solid #eee;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
    font-family: inherit;
    min-width: 100px;
}

.btn-sms:hover:not(:disabled) {
    background: #1a1a1a;
    color: #ffffff;
    border-color: #1a1a1a;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.btn-sms:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f0f0f0;
    color: #999;
}

/* ---------- 普通输入框 ---------- */
.form-group input:not(.phone-input-group input):not(.sms-code-group input) {
    padding: 14px 16px;
    border: 1.5px solid #eee;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8f8f8;
    font-family: inherit;
    width: 100%;
}

.form-group input:focus:not(.phone-input-group input):not(.sms-code-group input) {
    outline: none;
    border-color: #1a1a1a;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.04);
}

/* ---------- 按钮 ---------- */
.btn-primary {
    padding: 16px;
    background: #1a1a1a;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    letter-spacing: 0.3px;
    font-family: inherit;
}

.btn-primary:hover {
    background: #000000;
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-block {
    width: 100%;
}

/* ---------- 提示消息 ---------- */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 4px;
    display: none;
}

.alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    display: block !important;
}

.alert-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
    display: block !important;
}

/* ---------- 忘记密码 ---------- */
.form-options {
    text-align: right;
    margin: -8px 0 16px;
}
.forgot-pwd {
    font-size: 13px;
    color: #888;
    text-decoration: none;
    transition: color 0.3s ease;
}
.forgot-pwd:hover {
    color: #1a1a1a;
    text-decoration: underline;
}

/* ---------- Footer ---------- */
.auth-footer {
    text-align: center;
    font-size: 14px;
    color: #888;
    padding-top: 8px;
}

.auth-footer a {
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    color: #666;
}

/* ---------- 响应式 ---------- */
@media (max-width: 480px) {
    .auth-box {
        padding: 32px 24px;
        border-radius: 16px;
    }

    .auth-header h2 {
        font-size: 24px;
    }

    .phone-input-group {
        flex-wrap: wrap;
        border-radius: 12px;
    }

    .country-code-selector {
        width: 100%;
        border-right: none;
        border-bottom: 1.5px solid #eee;
        border-radius: 12px 12px 0 0;
        padding: 12px 16px;
    }

    .phone-input-group input[type="tel"] {
        padding: 12px 16px;
        border-radius: 0 0 12px 12px;
    }

    .sms-code-group {
        flex-direction: column;
    }

    .btn-sms {
        width: 100%;
        min-width: unset;
        padding: 12px;
    }

    .back-home {
        top: 16px;
        left: 16px;
        font-size: 12px;
        padding: 6px 14px;
    }
}