/* ==================== 登录/注册页面样式 ==================== */

.login-hero {
    padding: 120px 0 80px;
    background: var(--bg-secondary);
    text-align: center;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    padding: 0 22px;
}

.login-logo {
    margin-bottom: 40px;
}

.login-logo .logo-icon {
    font-size: 64px;
    margin-bottom: 14px;
    display: block;
}

.login-logo .logo-text {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.login-card {
    background: var(--tile-bg);
    border-radius: 18px;
    padding: 40px 36px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--nav-border);
}

.login-tabs {
    position: relative;
    display: flex;
    margin-bottom: 32px;
    background: var(--bg-secondary);
    border-radius: 980px;
    padding: 4px;
    overflow: hidden;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.tab-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: var(--tile-bg);
    border-radius: 980px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 0;
    pointer-events: none;
}

.tab-slider.dragging {
    transition: none;
}

.tab-slider.right {
    transform: translateX(100%);
}

.tab-btn {
    position: relative;
    z-index: 1;
    flex: 1;
    padding: 10px 18px;
    background: transparent;
    border: none;
    border-radius: 980px;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s ease;
    font-family: inherit;
    user-select: none;
    -webkit-user-select: none;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--text-primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeInUp 0.4s cubic-bezier(0.34, 1.2, 0.64, 1);
}

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

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.tab-content.active.slide-from-right {
    animation: slideInFromRight 0.4s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.tab-content.active.slide-from-left {
    animation: slideInFromLeft 0.4s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.form-group {
    margin-bottom: 18px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
}

.required {
    color: #ff3b30;
    margin-left: 3px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--nav-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.2s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12);
}

.form-group input::placeholder {
    color: var(--text-tertiary);
}

.form-group input.error {
    border-color: #ff3b30;
}

.form-checkbox {
    margin-bottom: 22px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    user-select: none;
    margin-bottom: 0;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid var(--text-tertiary);
    border-radius: 4px;
    position: relative;
    transition: all 0.2s;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.submit-btn {
    width: 100%;
    padding: 14px 32px;
    background: var(--accent-blue);
    border: none;
    border-radius: 980px;
    color: white;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    margin-top: 8px;
    font-family: inherit;
}

.submit-btn:hover {
    background: var(--accent-blue-hover);
}

.submit-btn:active {
    transform: scale(0.98);
}

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

.submit-btn .spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.error-message {
    color: #ff3b30;
    font-size: 13px;
    margin-top: 5px;
    display: none;
}

.error-message.show {
    display: block;
}

.global-error {
    background: rgba(255, 59, 48, 0.08);
    border: 1px solid rgba(255, 59, 48, 0.2);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 18px;
    color: #ff3b30;
    font-size: 14px;
    display: none;
    text-align: left;
}

.global-error.show {
    display: block;
}

.global-success {
    background: rgba(52, 199, 89, 0.08);
    border: 1px solid rgba(52, 199, 89, 0.2);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 18px;
    color: #34c759;
    font-size: 14px;
    display: none;
    text-align: left;
}

.global-success.show {
    display: block;
}

.back-link {
    text-align: center;
    margin-top: 24px;
}

.back-link a {
    color: var(--accent-blue);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.back-link a:hover {
    text-decoration: underline;
}

.stars-container,
.hero-particles {
    display: none;
}

@media (max-width: 480px) {
    .login-hero {
        padding: 100px 0 60px;
    }

    .login-card {
        padding: 30px 24px;
    }

    .login-logo .logo-icon {
        font-size: 52px;
    }

    .login-logo .logo-text {
        font-size: 24px;
    }

    .submit-btn {
        padding: 13px 28px;
        font-size: 15px;
    }
}
