/* ================================
   登录/注册模态框样式 - iOS风格
   ================================ */

/* 模态框遮罩 */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* 模态框容器 */
.auth-modal {
    background: #FFFFFF;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.auth-modal-overlay.active .auth-modal {
    transform: scale(1);
}

/* 模态框头部 */
.auth-modal-header {
    padding: 32px 32px 24px;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
}

.auth-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #86868B;
    font-size: 20px;
}

.auth-modal-close:hover {
    background: rgba(0, 0, 0, 0.08);
    transform: rotate(90deg);
}

.auth-modal-logo {
    max-width: 200px;
    height: auto;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-modal-logo img {
    height: 64px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
}

.auth-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #1D1D1F;
    margin-bottom: 8px;
}

.auth-modal-subtitle {
    font-size: 14px;
    color: #86868B;
}

/* 标签页切换 */
.auth-tabs {
    display: flex;
    padding: 0 32px;
    gap: 8px;
    margin-top: 24px;
}

.auth-tab {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    color: #86868B;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 10px;
}

.auth-tab:hover {
    background: var(--primary-alpha-8);
}

.auth-tab.active {
    background: var(--gradient-primary-soft);
    color: var(--primary-main);
    font-weight: 600;
}

/* 模态框内容 */
.auth-modal-body {
    padding: 32px;
}

.auth-tab-content {
    display: none;
}

.auth-tab-content.active {
    display: block;
}

/* 表单样式 */
.auth-form-group {
    margin-bottom: 20px;
}

.auth-form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1D1D1F;
    margin-bottom: 8px;
}

.auth-form-input {
    width: 100%;
    padding: 14px 16px;
    background: #F5F5F7;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    font-size: 15px;
    color: #1D1D1F;
    transition: all 0.2s ease;
}

.auth-form-input:focus {
    outline: none;
    background: #FFFFFF;
    border-color: var(--primary-main);
    box-shadow: 0 0 0 4px var(--primary-alpha-10);
}

.auth-form-input::placeholder {
    color: #86868B;
}

/* 手机号输入组 */
.auth-phone-group {
    display: flex;
    gap: 12px;
}

.auth-country-select {
    width: 100px;
    padding: 14px 12px;
    background: #F5F5F7;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    font-size: 15px;
    color: #1D1D1F;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-country-select:focus {
    outline: none;
    background: #FFFFFF;
    border-color: var(--primary-main);
    box-shadow: 0 0 0 4px var(--primary-alpha-10);
}

.auth-phone-input {
    flex: 1;
}

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

.auth-code-input {
    flex: 1;
}

.auth-send-code-btn {
    padding: 14px 20px;
    background: #F5F5F7;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    color: var(--primary-main);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.auth-send-code-btn:hover {
    background: var(--primary-alpha-10);
    border-color: var(--primary-alpha-20);
}

.auth-send-code-btn:disabled {
    background: #F5F5F7;
    color: #86868B;
    cursor: not-allowed;
    border-color: rgba(0, 0, 0, 0.06);
}

/* 提交按钮 */
.auth-submit-btn {
    width: 100%;
    padding: 14px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px var(--primary-alpha-30);
    margin-top: 8px;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--primary-alpha-35);
}

.auth-submit-btn:active {
    transform: translateY(0);
}

.auth-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* 辅助文字 */
.auth-helper-text {
    margin-top: 16px;
    text-align: center;
    font-size: 13px;
    color: #86868B;
}

.auth-helper-link {
    color: var(--primary-main);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

.auth-helper-link:hover {
    text-decoration: underline;
}

/* 错误提示 */
.auth-error-message {
    margin-top: 12px;
    padding: 12px 16px;
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid rgba(255, 59, 48, 0.2);
    border-radius: 10px;
    color: #FF3B30;
    font-size: 13px;
    display: none;
}

.auth-error-message.active {
    display: block;
}

/* 成功提示 */
.auth-success-message {
    margin-top: 12px;
    padding: 12px 16px;
    background: rgba(52, 199, 89, 0.1);
    border: 1px solid rgba(52, 199, 89, 0.2);
    border-radius: 10px;
    color: #34C759;
    font-size: 13px;
    display: none;
}

.auth-success-message.active {
    display: block;
}

/* 加载状态 */
.auth-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: auth-spin 0.6s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes auth-spin {
    to { transform: rotate(360deg); }
}

/* 响应式 */
@media (max-width: 480px) {
    .auth-modal {
        width: 95%;
        margin: 20px;
    }

    .auth-modal-header,
    .auth-modal-body {
        padding: 24px 20px;
    }

    .auth-tabs {
        padding: 0 20px;
    }
}